/plugins/org.eclipse.net4j.tcp/

-sm-19 col-md-20 margin-top-10" id="main-menu-wrapper">
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordavid_williams2006-09-29 20:19:30 +0000
committerdavid_williams2006-09-29 20:19:30 +0000
commitb0935cbc089b1c2b1b3fd59852a28f8c9393ba2c (patch)
tree95aa2349ad0baeb9df53a08f4dc43406d6d56e8b
parent6a3f998d0dff75f4382cdb4c9e25e94b4dd74746 (diff)
downloadwebtools.common-200609292131.tar.gz
webtools.common-200609292131.tar.xz
webtools.common-200609292131.zip
This commit was manufactured by cvs2svn to create tag 'v200609292131'.v200609292131
-rw-r--r--features/org.eclipse.wst.common_core.feature/.cvsignore2
-rw-r--r--features/org.eclipse.wst.common_core.feature/.project17
-rw-r--r--features/org.eclipse.wst.common_core.feature/build.properties5
-rw-r--r--features/org.eclipse.wst.common_core.feature/eclipse_update_120.jpgbin21695 -> 0 bytes
-rw-r--r--features/org.eclipse.wst.common_core.feature/epl-v10.html328
-rw-r--r--features/org.eclipse.wst.common_core.feature/feature.properties144
-rw-r--r--features/org.eclipse.wst.common_core.feature/feature.xml105
-rw-r--r--features/org.eclipse.wst.common_core.feature/license.html93
-rw-r--r--features/org.eclipse.wst.common_core.feature/sourceTemplateFeature/build.properties16
-rw-r--r--features/org.eclipse.wst.common_core.feature/sourceTemplateFeature/eclipse_update_120.jpgbin21695 -> 0 bytes
-rw-r--r--features/org.eclipse.wst.common_core.feature/sourceTemplateFeature/epl-v10.html328
-rw-r--r--features/org.eclipse.wst.common_core.feature/sourceTemplateFeature/feature.properties143
-rw-r--r--features/org.eclipse.wst.common_core.feature/sourceTemplateFeature/feature.xml30
-rw-r--r--features/org.eclipse.wst.common_core.feature/sourceTemplateFeature/license.html79
-rw-r--r--features/org.eclipse.wst.common_core.feature/sourceTemplatePlugin/about.html27
-rw-r--r--features/org.eclipse.wst.common_core.feature/sourceTemplatePlugin/about.ini31
-rw-r--r--features/org.eclipse.wst.common_core.feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--features/org.eclipse.wst.common_core.feature/sourceTemplatePlugin/about.properties26
-rw-r--r--features/org.eclipse.wst.common_core.feature/sourceTemplatePlugin/build.properties2
-rw-r--r--features/org.eclipse.wst.common_core.feature/sourceTemplatePlugin/eclipse32.gifbin1706 -> 0 bytes
-rw-r--r--features/org.eclipse.wst.common_core.feature/sourceTemplatePlugin/eclipse32.pngbin4634 -> 0 bytes
-rw-r--r--features/org.eclipse.wst.common_core.feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--features/org.eclipse.wst.common_sdk.feature/.cvsignore4
-rw-r--r--features/org.eclipse.wst.common_sdk.feature/.project17
-rw-r--r--features/org.eclipse.wst.common_sdk.feature/build.properties6
-rw-r--r--features/org.eclipse.wst.common_sdk.feature/eclipse_update_120.jpgbin21695 -> 0 bytes
-rw-r--r--features/org.eclipse.wst.common_sdk.feature/epl-v10.html328
-rw-r--r--features/org.eclipse.wst.common_sdk.feature/feature.properties144
-rw-r--r--features/org.eclipse.wst.common_sdk.feature/feature.xml28
-rw-r--r--features/org.eclipse.wst.common_sdk.feature/license.html93
-rw-r--r--features/org.eclipse.wst.common_ui.feature/.cvsignore2
-rw-r--r--features/org.eclipse.wst.common_ui.feature/.project17
-rw-r--r--features/org.eclipse.wst.common_ui.feature/build.properties5
-rw-r--r--features/org.eclipse.wst.common_ui.feature/eclipse_update_120.jpgbin21695 -> 0 bytes
-rw-r--r--features/org.eclipse.wst.common_ui.feature/epl-v10.html328
-rw-r--r--features/org.eclipse.wst.common_ui.feature/feature.properties144
-rw-r--r--features/org.eclipse.wst.common_ui.feature/feature.xml127
-rw-r--r--features/org.eclipse.wst.common_ui.feature/license.html93
-rw-r--r--features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/build.properties19
-rw-r--r--features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/eclipse_update_120.jpgbin21695 -> 0 bytes
-rw-r--r--features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/epl-v10.html328
-rw-r--r--features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/feature.properties145
-rw-r--r--features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/feature.xml38
-rw-r--r--features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/license.html79
-rw-r--r--features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/about.html27
-rw-r--r--features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/about.ini31
-rw-r--r--features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/about.properties26
-rw-r--r--features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/build.properties3
-rw-r--r--features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/eclipse32.gifbin1706 -> 0 bytes
-rw-r--r--features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/eclipse32.pngbin4634 -> 0 bytes
-rw-r--r--features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--plugins/org.eclipse.jem.util/.classpath10
-rw-r--r--plugins/org.eclipse.jem.util/.cvsignore1
-rw-r--r--plugins/org.eclipse.jem.util/.options3
-rw-r--r--plugins/org.eclipse.jem.util/.project28
-rw-r--r--plugins/org.eclipse.jem.util/.settings/org.eclipse.jdt.core.prefs289
-rw-r--r--plugins/org.eclipse.jem.util/.settings/org.eclipse.jdt.ui.prefs8
-rw-r--r--plugins/org.eclipse.jem.util/.settings/org.eclipse.pde.prefs12
-rw-r--r--plugins/org.eclipse.jem.util/META-INF/MANIFEST.MF25
-rw-r--r--plugins/org.eclipse.jem.util/PERFMSR_README.txt12
-rw-r--r--plugins/org.eclipse.jem.util/READ_ME_BEFORE_CHANGING_MANIFEST!!!8
-rw-r--r--plugins/org.eclipse.jem.util/about.html25
-rw-r--r--plugins/org.eclipse.jem.util/build.properties23
-rw-r--r--plugins/org.eclipse.jem.util/jemutil-nonworkbnech/org/eclipse/jem/util/logger/LogEntry.java329
-rw-r--r--plugins/org.eclipse.jem.util/jemutil-nonworkbnech/org/eclipse/jem/util/logger/proxy/ILogRenderer.java72
-rw-r--r--plugins/org.eclipse.jem.util/jemutil-nonworkbnech/org/eclipse/jem/util/logger/proxy/ILogRenderer2.java151
-rw-r--r--plugins/org.eclipse.jem.util/jemutil-nonworkbnech/org/eclipse/jem/util/logger/proxy/JDKConsoleRenderer.java247
-rw-r--r--plugins/org.eclipse.jem.util/jemutil-nonworkbnech/org/eclipse/jem/util/logger/proxy/Logger.java843
-rw-r--r--plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/internal/util/emf/workbench/EMFWorkbenchContextFactory.java172
-rw-r--r--plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/internal/util/emf/workbench/ProjectResourceSetImpl.java274
-rw-r--r--plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/internal/util/emf/workbench/WorkspaceResourceHandler.java147
-rw-r--r--plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/internal/util/emf/workbench/WorkspaceResourceNotifier.java73
-rw-r--r--plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/internal/util/emf/workbench/nature/EMFNatureRegistry.java74
-rw-r--r--plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/internal/util/emf/workbench/nls/EMFWorkbenchResourceHandler.java63
-rw-r--r--plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/CharacterUtil.java279
-rw-r--r--plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/NotPresentPerformanceMonitor.java55
-rw-r--r--plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/PerformanceMonitorUtil.java280
-rw-r--r--plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/PresentPerformanceMonitor.java79
-rw-r--r--plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/RegistryReader.java156
-rw-r--r--plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/TimerTests.java352
-rw-r--r--plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/UIContextDetermination.java190
-rw-r--r--plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/UITester.java31
-rw-r--r--plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/EMFWorkbenchContextBase.java193
-rw-r--r--plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/IEMFContextContributor.java46
-rw-r--r--plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/ISynchronizerExtender.java44
-rw-r--r--plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/ProjectResourceSet.java117
-rw-r--r--plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/ProjectUtilities.java754
-rw-r--r--plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/ResourceHandler.java65
-rw-r--r--plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/ResourceSetWorkbenchSynchronizer.java192
-rw-r--r--plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/WorkbenchByteArrayOutputStream.java148
-rw-r--r--plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/WorkbenchResourceHelperBase.java694
-rw-r--r--plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/WorkbenchURIConverter.java154
-rw-r--r--plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/WorkbenchURIConverterImpl.java514
-rw-r--r--plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/nature/EMFNature.java554
-rw-r--r--plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/logger/proxyrender/AbstractWorkBenchRenderer.java472
-rw-r--r--plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/logger/proxyrender/ConsoleLogRenderer.java67
-rw-r--r--plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/logger/proxyrender/DefaultPluginTraceRenderer.java113
-rw-r--r--plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/logger/proxyrender/EclipseLogger.java123
-rw-r--r--plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/logger/proxyrender/IMsgLogger.java26
-rw-r--r--plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/plugin/JEMUtilPlugin.java399
-rw-r--r--plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/.classpath7
-rw-r--r--plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/.cvsignore1
-rw-r--r--plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/.project28
-rw-r--r--plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/PERFMSR.README.txt14
-rw-r--r--plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/about.html32
-rw-r--r--plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/build.properties14
-rw-r--r--plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/perfmsr.jarbin6078 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/perfmsr.jardesc14
-rw-r--r--plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/plugin.properties12
-rw-r--r--plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/plugin.xml17
-rw-r--r--plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/src/org/eclipse/perfmsr/core/IPerformanceMonitor.java195
-rw-r--r--plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/src/org/eclipse/perfmsr/core/PerfMsrCorePlugin.java31
-rw-r--r--plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/src/org/eclipse/perfmsr/core/Upload.java27
-rw-r--r--plugins/org.eclipse.jem.util/plugin.properties18
-rw-r--r--plugins/org.eclipse.jem.util/plugin.xml15
-rw-r--r--plugins/org.eclipse.jem.util/property_files/emfworkbench.properties18
-rw-r--r--plugins/org.eclipse.jem.util/schema/uiContextSensitiveClass.exsd169
-rw-r--r--plugins/org.eclipse.jem.util/schema/uiTester.exsd128
-rw-r--r--plugins/org.eclipse.wst.common.core/.classpath7
-rw-r--r--plugins/org.eclipse.wst.common.core/.cvsignore6
-rw-r--r--plugins/org.eclipse.wst.common.core/.options1
-rw-r--r--plugins/org.eclipse.wst.common.core/.project28
-rw-r--r--plugins/org.eclipse.wst.common.core/.settings/org.eclipse.jdt.core.prefs59
-rw-r--r--plugins/org.eclipse.wst.common.core/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--plugins/org.eclipse.wst.common.core/META-INF/MANIFEST.MF18
-rw-r--r--plugins/org.eclipse.wst.common.core/about.html34
-rw-r--r--plugins/org.eclipse.wst.common.core/build.properties8
-rw-r--r--plugins/org.eclipse.wst.common.core/component.xml6
-rw-r--r--plugins/org.eclipse.wst.common.core/plugin.properties3
-rw-r--r--plugins/org.eclipse.wst.common.core/plugin.xml7
-rw-r--r--plugins/org.eclipse.wst.common.core/schema/searchParticipants.exsd89
-rw-r--r--plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/ISearchOptions.java60
-rw-r--r--plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchEngine.java213
-rw-r--r--plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchMatch.java157
-rw-r--r--plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchParticipant.java281
-rw-r--r--plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchPlugin.java103
-rw-r--r--plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchRequestor.java47
-rw-r--r--plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/ComponentDeclarationEntry.java50
-rw-r--r--plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/ComponentReferenceEntry.java39
-rw-r--r--plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/Entry.java58
-rw-r--r--plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/FileReferenceEntry.java58
-rw-r--r--plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/SearchDocument.java120
-rw-r--r--plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/SearchDocumentSet.java33
-rw-r--r--plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/Messages.java37
-rw-r--r--plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/SearchDocumentSetImpl.java111
-rw-r--r--plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/SearchParticipantDescriptor.java89
-rw-r--r--plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/SearchParticipantRegistry.java116
-rw-r--r--plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/SearchParticipantRegistryReader.java69
-rw-r--r--plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/messages.properties15
-rw-r--r--plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/ComponentDeclarationPattern.java40
-rw-r--r--plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/ComponentReferencePattern.java43
-rw-r--r--plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/ComponentSearchPattern.java72
-rw-r--r--plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/FileReferencePattern.java42
-rw-r--r--plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/QualifiedName.java226
-rw-r--r--plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/SearchPattern.java85
-rw-r--r--plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/ContentTypeSearchScope.java105
-rw-r--r--plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/ProjectSearchScope.java55
-rw-r--r--plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/SearchScope.java49
-rw-r--r--plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/SearchScopeImpl.java133
-rw-r--r--plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/SelectionSearchScope.java67
-rw-r--r--plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/WorkingSetSearchScope.java81
-rw-r--r--plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/WorkspaceSearchScope.java51
-rw-r--r--plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/util/CollectingSearchRequestor.java58
-rw-r--r--plugins/org.eclipse.wst.common.emf/.classpath8
-rw-r--r--plugins/org.eclipse.wst.common.emf/.cvsignore8
-rw-r--r--plugins/org.eclipse.wst.common.emf/.project28
-rw-r--r--plugins/org.eclipse.wst.common.emf/META-INF/MANIFEST.MF17
-rw-r--r--plugins/org.eclipse.wst.common.emf/about.html34
-rw-r--r--plugins/org.eclipse.wst.common.emf/build.properties22
-rw-r--r--plugins/org.eclipse.wst.common.emf/component.xml1
-rw-r--r--plugins/org.eclipse.wst.common.emf/plugin.properties3
-rw-r--r--plugins/org.eclipse.wst.common.emf/plugin.xml35
-rw-r--r--plugins/org.eclipse.wst.common.emf/prepareforpii.xml37
-rw-r--r--plugins/org.eclipse.wst.common.emf/schema/packageURIMap.exsd113
-rw-r--r--plugins/org.eclipse.wst.common.emf/schema/translatorExtension.exsd103
-rw-r--r--plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/ResourceSynchronizedIsLoadingAdapter.java112
-rw-r--r--plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/ResourceSynchronizedIsLoadingAdapterFactory.java28
-rw-r--r--plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/plugin/EcoreUtilitiesPlugin.java55
-rw-r--r--plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/plugin/PackageURIMapReader.java71
-rw-r--r--plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/plugin/PluginRendererFactoryDefaultHandler.java52
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/AbstractRendererImpl.java152
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/AttributeTranslatorFilter.java35
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CacheEventNode.java585
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CacheEventPool.java149
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CacheEventStack.java59
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityPackageMappingRegistry.java53
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityResourceFactory.java61
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilitySAXXMIHandler.java55
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityURIConverter.java17
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityXMILoadImpl.java48
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityXMIResource.java41
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityXMIResourceImpl.java338
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityXMISaveImpl.java127
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ConstantAttributeTranslator.java54
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/DefaultTranslatorFactory.java101
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/DependencyTranslator.java95
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMAdapter.java68
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMAdapterImpl.java1751
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMRenderer.java264
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMRendererFactory.java29
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMRendererFactoryDefaultHandler.java46
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2SAXDocumentHandler.java210
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2SAXRenderer.java175
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2SAXRendererFactory.java42
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2SAXWriter.java387
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/FileNameResourceFactoryRegistry.java88
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/GenericTranslator.java110
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/IDTranslator.java75
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/LinkUpdaterTarget.java59
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/MappedXMIHelper.java295
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/MultiObjectTranslator.java83
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/NamespaceTranslator.java112
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ObjectTranslatorFilter.java35
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ReadAheadHelper.java92
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ReferencedResource.java128
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ReferencedXMIFactoryImpl.java100
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ReferencedXMIResourceImpl.java401
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/Renderer.java62
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/RendererFactory.java157
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/RendererFactoryDefaultHandler.java30
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ResourceFactoryDescriptor.java60
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/RootTranslator.java62
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/SourceLinkTranslator.java72
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/StaticResourceFactoryDescriptor.java42
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/Translator.java792
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorFilter.java220
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorPath.java94
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorResource.java79
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorResourceFactory.java68
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorResourceImpl.java396
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/UnsupportedFeature.java43
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/VariableTranslatorFactory.java42
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/XMLEncoderDecoder.java170
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/AdapterFactoryDescriptor.java17
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/AdapterFactoryUtil.java45
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/ArrayUtil.java46
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/Assert.java131
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/AssertionFailedException.java39
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/Association.java68
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/CloneablePublic.java24
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/CommandContext.java85
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/CopyGroup.java320
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DOMLoadOptions.java80
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DOMUtilities.java680
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DanglingHREFException.java35
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DefaultFeatureValueConverter.java321
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DefaultOverridableResourceFactoryRegistry.java70
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DeferredReferenceUtilityAction.java75
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/EncoderDecoder.java30
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/EncoderDecoderAdapter.java35
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/EncoderDecoderRegistry.java111
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/EtoolsCopySession.java184
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/EtoolsCopyUtility.java669
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/ExceptionHelper.java70
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/ExtendedEcoreUtil.java272
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/FeatureValueConversionException.java29
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/FeatureValueConverter.java32
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/ICommand.java37
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/ICommandContext.java37
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/IDUtil.java70
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/InvalidPasswordCipherException.java16
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/InvalidPasswordDecodingException.java16
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/InvalidPasswordEncodingException.java16
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/IsLoadingDetector.java41
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/IsLoadingProxyAdapter.java93
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/Namespace.java42
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/NamespaceAdapter.java205
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/PassthruEncoderDecoder.java41
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/PasswordCipherUtil.java66
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/PasswordEncoderDecoder.java28
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/PasswordUtil.java331
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/PleaseMigrateYourCodeError.java25
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/ResourceDependencyRegister.java213
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/ResourceIsLoadingAdapter.java103
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/ResourceIsLoadingAdapterFactory.java22
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/Revisit.java43
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/StringUtil.java39
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/TranslatorManager.java168
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/TranslatorService.java95
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/UnsupportedCryptoAlgorithmException.java16
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/WFTUtilsResourceHandler.java46
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/WriteBackHelper.java136
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/XMLValueEncoderDecoder.java111
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/wftutils.properties28
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/.classpath8
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/.cvsignore7
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/.project28
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/META-INF/MANIFEST.MF24
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/about.html34
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/build.properties19
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/plugin.properties16
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/plugin.xml37
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/prepareforpii.xml37
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/property_file/emftosed.properties13
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/property_file/emfworkbenchedit.properties21
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/rose/ModuleCore.genmodel47
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/rose/moduleCore.cat1065
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/rose/moduleCore.ecore47
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/rose/moduleCore.mdl8839
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/schema/adapterFactory.exsd144
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/schema/editModel.exsd198
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/schema/editModelExtension.exsd130
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/schema/modifierHelperFactory.exsd160
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/CompatibilityWorkbenchURIConverterImpl.java90
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/DynamicGrowthModel.java88
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/EMFWorkbenchContext.java418
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/EMFWorkbenchEditResourceHandler.java53
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/EditModelLeastUsedCache.java99
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/EmfPackagePropertyTester.java17
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/EmfValidationHandler.java61
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/PassthruResourceSet.java144
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/WorkbenchResourceHelper.java531
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/AdapterFactoryDescriptor.java162
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/AdapterFactoryRegistry.java116
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/ChildCommand.java103
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/ClientAccessRegistry.java102
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/ClientAccessRegistryException.java152
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EMFWorkbenchEditContextFactory.java102
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EditModelExtension.java69
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EditModelExtensionRegistry.java98
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EditModelRegistry.java370
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EditModelResource.java115
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EditModelRetriever.java48
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/ExtendedComposedAdapterFactory.java103
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/InvertedCommand.java68
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/ParentCommand.java156
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/ReadOnlyClientAccessRegistry.java51
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/Snapshot.java45
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/WrappingCommandStack.java39
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/AbstractEditModelCommand.java58
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ComposedAccessorKey.java56
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ComposedEditModel.java279
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/CompoundingCommandStack.java152
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/DynamicAdapterFactory.java642
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EMFWorkbenchEditPlugin.java78
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModel.java1608
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModelCommand.java48
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModelEvent.java122
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModelFactory.java62
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModelListener.java24
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModelNature.java64
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/IEditModelFactory.java31
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/LooseComposedEditModel.java37
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ModelModifier.java615
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ModifierHelper.java363
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ModifierHelperChainer.java49
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ModifierHelperFactory.java34
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ModifierHelperRegistry.java273
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/OwnerProvider.java31
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ProjectResourceSetEditImpl.java53
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/ResourceSetWorkbenchEditSynchronizer.java451
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/validateedit/IValidateEditContext.java30
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/validateedit/ResourceStateInputProvider.java60
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/validateedit/ResourceStateValidator.java57
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/validateedit/ResourceStateValidatorImpl.java446
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/validateedit/ResourceStateValidatorPresenter.java50
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/validateedit/ValidateEditHeadlessContext.java97
-rw-r--r--plugins/org.eclipse.wst.common.environment/.classpath7
-rw-r--r--plugins/org.eclipse.wst.common.environment/.cvsignore6
-rw-r--r--plugins/org.eclipse.wst.common.environment/.options25
-rw-r--r--plugins/org.eclipse.wst.common.environment/.project28
-rw-r--r--plugins/org.eclipse.wst.common.environment/.settings/org.eclipse.jdt.core.prefs57
-rw-r--r--plugins/org.eclipse.wst.common.environment/.settings/org.eclipse.pde.prefs12
-rw-r--r--plugins/org.eclipse.wst.common.environment/META-INF/MANIFEST.MF18
-rw-r--r--plugins/org.eclipse.wst.common.environment/about.html34
-rw-r--r--plugins/org.eclipse.wst.common.environment/build.properties7
-rw-r--r--plugins/org.eclipse.wst.common.environment/plugin.properties13
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/environment/Choice.java103
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/environment/EnvironmentException.java60
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/environment/EnvironmentService.java89
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/environment/IEnvironment.java52
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/environment/ILog.java130
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/environment/IStatusHandler.java54
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/environment/NullStatusHandler.java70
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/environment/StatusException.java74
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/environment/uri/IURI.java227
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/environment/uri/IURIFactory.java52
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/environment/uri/IURIFilter.java31
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/environment/uri/IURIScheme.java75
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/environment/uri/IURIVisitor.java29
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/environment/uri/SimpleURIFactory.java130
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/environment/uri/URIException.java83
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/internal/environment/eclipse/ConsoleEclipseEnvironment.java67
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/internal/environment/eclipse/EclipseLog.java165
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/internal/environment/eclipse/EclipseScheme.java197
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/internal/environment/eclipse/EclipseURI.java518
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/internal/environment/eclipse/FileResourceOutputStream.java145
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/internal/environment/eclipse/FileResourceUtils.java550
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/internal/environment/eclipse/Messages.java39
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/internal/environment/eclipse/environment.properties40
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/internal/environment/plugin/EnvironmentPlugin.java45
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/internal/environment/relative/RelativeScheme.java87
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/internal/environment/relative/RelativeURI.java271
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/internal/environment/uri/file/FileScheme.java106
-rw-r--r--plugins/org.eclipse.wst.common.environment/src/org/eclipse/wst/common/internal/environment/uri/file/FileURI.java297
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/.classpath8
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/.cvsignore7
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/.project28
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/META-INF/MANIFEST.MF21
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/about.html34
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/build.properties20
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/plugin.properties19
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/plugin.xml53
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/prepareforpii.xml38
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/property_files/messages.properties13
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/property_files/wtpcommonui.properties37
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/schema/DataModelWizardExtension.exsd113
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/schema/extendableWizard.exsd103
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/schema/extendableWizardPage.exsd143
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/schema/extendedViewer.exsd138
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/schema/wtpuiAction.exsd367
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/datamodel/ui/AddablePageGroup.java16
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/datamodel/ui/DataModelSynchHelper.java569
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/datamodel/ui/DataModelWizard.java378
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/datamodel/ui/DataModelWizardFactory.java65
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/datamodel/ui/DataModelWizardPage.java463
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/datamodel/ui/IDMPageGroup.java32
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/datamodel/ui/IDMPageGroupHandler.java63
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/datamodel/ui/IDMPageHandler.java59
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/datamodel/ui/SimplePageGroup.java102
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/dialog/ui/ErrorDialog.java99
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/dialog/ui/InfoDialog.java98
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/dialog/ui/MessageDialog.java636
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/dialog/ui/OptionsDialog.java107
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/dialog/ui/StatusDialogConstants.java51
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/dialog/ui/WarningDialog.java103
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/eclipse/ui/EclipseEnvironment.java79
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/eclipse/ui/EclipseStatusHandler.java133
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/eclipse/ui/Messages.java25
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/eclipse/ui/environment.properties17
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/CommonUIPluginConstants.java28
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardExtensionFactory.java44
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardPageElement.java270
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardPageExtensionManager.java279
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DMWizardPageFactoryElement.java96
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/DataModelWizardExtensionReader.java84
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/ExtensibleViewRegistry.java177
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/IExtensibleViewFactory.java21
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/operation/extensionui/IOperationNode.java48
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/AbstractWTPUIPlugin.java66
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/ClosableWizardDialog.java41
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/DMPageGroupElementImpl.java67
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/DisplayUtility.java36
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/ErrorDialog.java191
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/ExecutionListener.java18
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/GenericWizardNode.java73
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/InternalCommonWorkbenchMessages.java29
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/ListMessageDialog.java217
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/ListenerList.java81
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/NewProjectGroup.java214
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/OverlayIcon.java121
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/PageGroupManager.java561
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/RunnableOperationWrapper.java45
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/RunnableWithProgressWrapper.java79
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/SaveHandlerUI.java128
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/SimplePageGroupHandler.java39
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/SimplePageHandler.java24
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/TimedKeyListener.java135
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/TimedModifyListener.java55
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/Timer.java253
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/TimerQueue.java231
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/UIEnablementIdentifier.java94
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/UIEnablementManager.java73
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/UIOperationHandler.java187
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/UITesterImpl.java52
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/ValidationStatus.java200
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/WTPActivityBridgeHelperImpl.java81
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/WTPActivityHelper.java60
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/WTPCommonUIResourceHandler.java69
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/WTPGenericActionIds.java32
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/WTPUIPlugin.java140
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/WorkspaceModifyComposedOperation.java82
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/package.html36
-rw-r--r--plugins/org.eclipse.wst.common.frameworks.ui/wtp_ui/org/eclipse/wst/common/frameworks/internal/ui/package.xml18
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/.classpath8
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/.cvsignore10
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/.options3
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/.project28
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/META-INF/MANIFEST.MF24
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/about.html34
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/build.properties22
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/component.xml31
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/plugin.properties16
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/plugin.xml30
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/prepareforpii.xml37
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/schema/DataModelProviderExtension.exsd153
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/schema/OperationExtension.exsd119
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/schema/WTPActivityBridgeHelper.exsd103
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/schema/functionGroup.exsd186
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src-non_workbench/org/eclipse/wst/common/frameworks/internal/enablement/nonui/IWFTWrappedException.java40
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src-non_workbench/org/eclipse/wst/common/frameworks/internal/enablement/nonui/WFTWrappedException.java93
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src-non_workbench/org/eclipse/wst/common/frameworks/internal/enablement/nonui/WorkbenchUtil.java37
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/datamodel/AbstractDataModelOperation.java188
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/datamodel/AbstractDataModelProvider.java327
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/datamodel/DataModelEvent.java162
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/datamodel/DataModelFactory.java135
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/datamodel/DataModelPropertyDescriptor.java140
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/datamodel/IDataModel.java747
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/datamodel/IDataModelListener.java34
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/datamodel/IDataModelOperation.java124
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/datamodel/IDataModelProperties.java63
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/datamodel/IDataModelProvider.java123
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/datamodel/package.xml20
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/datamodel/properties/package.xml19
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/AbstractRegistryDescriptor.java55
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/AdaptabilityUtility.java32
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/ConfigurationElementWrapper.java69
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/DoNotUseMeThisWillBeDeletedPost15.java38
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/ExceptionHelper.java65
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/HashUtil.java19
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/ISaveHandler.java28
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/IWrappedException.java41
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/Messages.java59
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/SaveFailedException.java63
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/SaveHandlerHeadless.java86
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/SaveHandlerRegister.java34
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/WTPPlugin.java77
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/WTPProjectUtilities.java155
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/WTPResourceHandler.java71
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/WrappedException.java81
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/WrappedRuntimeException.java115
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/activities/WTPActivityBridge.java106
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/activities/WTPActivityBridgeHelper.java36
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/datamodel/DataModelExtensionReader.java165
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/datamodel/DataModelImpl.java468
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/datamodel/DataModelPausibleOperationEventImpl.java38
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/datamodel/DataModelPausibleOperationImpl.java586
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/datamodel/IDataModelPausibleOperation.java320
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/datamodel/IDataModelPausibleOperationEvent.java253
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/datamodel/IDataModelPausibleOperationListener.java60
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/datamodel/IWorkspaceRunnableWithStatus.java42
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/datamodel/WrappedOperation.java114
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/AbstractIdentifiable.java29
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/AscendingGroupComparator.java56
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/DataModelEnablementFactory.java62
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/DescendingGroupComparator.java58
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/EnablementIdentifier.java233
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/EnablementIdentifierEvent.java78
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/EnablementManager.java171
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/FunctionGroup.java162
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/FunctionGroupPatternBinding.java98
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/FunctionGroupRegistry.java255
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/IEnablementIdentifier.java82
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/IEnablementIdentifierListener.java34
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/IEnablementManager.java59
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/IGroupInitializer.java31
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/Identifiable.java32
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/IdentifiableComparator.java77
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/Util.java354
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/operations/ComposedExtendedOperationHolder.java94
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/operations/IHeadlessRunnableWithProgress.java42
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/operations/IOperationHandler.java57
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/operations/IProjectCreationProperties.java56
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/operations/IProjectCreationPropertiesNew.java73
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/operations/OperationExtension.java77
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/operations/OperationExtensionReader.java83
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/operations/OperationStatus.java75
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/operations/ProjectCreationDataModelProvider.java204
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/operations/ProjectCreationDataModelProviderNew.java210
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/operations/ProjectCreationOperation.java84
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/operations/ProjectCreationOperationNew.java76
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/operations/package.html33
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/operations/package.xml18
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/plugin/WTPCommonMessages.java53
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/plugin/WTPCommonPlugin.java144
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/wtp_common.properties54
-rw-r--r--plugins/org.eclipse.wst.common.infopop/.cvsignore1
-rw-r--r--plugins/org.eclipse.wst.common.infopop/.project22
-rw-r--r--plugins/org.eclipse.wst.common.infopop/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--plugins/org.eclipse.wst.common.infopop/.settings/org.eclipse.pde.prefs14
-rw-r--r--plugins/org.eclipse.wst.common.infopop/META-INF/MANIFEST.MF8
-rw-r--r--plugins/org.eclipse.wst.common.infopop/SnippetsContexts.xml107
-rw-r--r--plugins/org.eclipse.wst.common.infopop/about.html34
-rw-r--r--plugins/org.eclipse.wst.common.infopop/build.properties5
-rw-r--r--plugins/org.eclipse.wst.common.infopop/plugin.properties3
-rw-r--r--plugins/org.eclipse.wst.common.infopop/plugin.xml15
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/.classpath7
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/.cvsignore8
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/.options1
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/.project28
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/META-INF/MANIFEST.MF33
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/about.html34
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/build.properties19
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/component.xml1
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/javadoc-images/componentCore.xsd52
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/javadoc-images/componentcore_model.jpgbin71857 -> 0 bytes
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/javadoc-images/componentcore_package.jpgbin78592 -> 0 bytes
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/javadoc-images/mapping.jpgbin40741 -> 0 bytes
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/javadoc-images/metamodel_components.jpgbin27797 -> 0 bytes
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/javadoc-images/module_structural_model.jpgbin130999 -> 0 bytes
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/javadoc-images/modulecore.jpgbin142981 -> 0 bytes
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/javadoc-images/virtual_path_api.jpgbin111861 -> 0 bytes
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/model/Java.epx6127
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/model/Java.properties428
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/model/VirtualPathAPI.emx517
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/model/componentCore.ecore80
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/model/componentCore.emx609
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/model/componentCore.genmodel52
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/model/componentCorePackage.emx310
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/modulecore.properties11
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/modulecoreNLS.properties12
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/ArtifactEdit.java648
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/ComponentCore.java196
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/IEditModelHandler.java60
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/ModuleCoreNature.java602
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/UnresolveableURIException.java32
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/datamodel/FacetDataModelConfigAdapter.java80
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/datamodel/FacetDataModelProvider.java80
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/datamodel/FacetInstallDataModelProvider.java110
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/datamodel/FacetProjectCreationDataModelProvider.java359
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/datamodel/FlexibleProjectCreationDataModelProvider.java127
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/datamodel/ProjectMigratorDataModelProvider.java32
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/datamodel/properties/IComponentCreationDataModelProperties.java83
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/datamodel/properties/ICreateReferenceComponentsDataModelProperties.java68
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/datamodel/properties/IFacetDataModelProperties.java41
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/datamodel/properties/IFacetInstallDataModelProperties.java15
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/datamodel/properties/IFacetProjectCreationDataModelProperties.java66
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/datamodel/properties/IFlexibleProjectCreationDataModelProperties.java48
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/datamodel/properties/IProjectMigratorDataModelProperties.java20
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/datamodel/properties/package.xml21
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ArtifactEditModel.java319
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/BinaryComponentHelper.java40
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ComponentResource.java171
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ComponentType.java131
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ComponentcoreFactory.java92
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ComponentcorePackage.java1118
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/DependencyType.java159
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/IComponentProjectMigrator.java18
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ModuleCoreValidator.java112
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ModuleCoreValidatorHelper.java32
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ModuleMigratorManager.java137
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ModuleStructuralModel.java323
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ModulecorePlugin.java173
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ProjectComponents.java110
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ProjectMigratorRegistry.java77
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/Property.java83
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ReferencedComponent.java183
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/StructureEdit.java940
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/WorkbenchComponent.java170
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/builder/DependencyGraph.java54
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/builder/DependencyGraphManager.java234
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ArtifactEditModelFactory.java64
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ComponentCoreURIConverter.java156
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ComponentResourceImpl.java434
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ComponentTypeImpl.java290
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ComponentcoreFactoryImpl.java236
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ComponentcorePackageImpl.java646
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/IModuleStructureListener.java24
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/IResourceFactoryExtPtConstants.java25
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/MappedComponentXMIHelper.java86
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ModuleIndexingAdapter.java57
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ModuleStructuralModelFactory.java43
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ModuleStructureEvent.java46
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ModuleURIUtil.java191
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/PlatformURLModuleConnection.java118
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ProjectComponentsImpl.java313
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/PropertyImpl.java213
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ReferencedComponentImpl.java387
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ReferencedComponentXMIResourceFactory.java34
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ReferencedComponentXMIResourceImpl.java34
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ResourceTreeNode.java288
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ResourceTreeRoot.java177
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/ResourceTreeRootAdapter.java66
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/WTPEntityResolver.java142
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/WTPModulesInit.java79
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/WTPModulesResource.java65
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/WTPModulesResourceFactory.java88
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/WTPResourceFactoryRegistry.java175
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/impl/WorkbenchComponentImpl.java571
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/ArtifactEditOperationDataModelProvider.java117
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/ArtifactEditProviderOperation.java122
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/ComponentCreationDataModelProvider.java247
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/ComponentCreationOperation.java105
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/CreateReferenceComponentsDataModelProvider.java63
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/CreateReferenceComponentsOp.java159
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/FacetDataModelOperation.java49
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/FacetProjectCreationOperation.java210
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/FlexibleProjectCreationOperation.java101
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/IArtifactEditOperationDataModelProperties.java38
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/ProjectMigratorDataModelOperation.java49
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/RemoveReferenceComponentOperation.java92
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/operation/RemoveReferenceComponentsDataModelProvider.java26
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/ResourceTimestampMappings.java277
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualArchiveComponent.java265
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualComponent.java510
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualContainer.java360
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualFile.java123
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualFolder.java150
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualReference.java151
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualResource.java328
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/ArtifactEditAdapterFactory.java102
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/ArtifactEditRegistryReader.java184
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/ComponentImplManager.java260
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/ComponentResolver.java211
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/ComponentUtilities.java323
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/ComponentcoreAdapterFactory.java208
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/ComponentcoreSwitch.java240
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/DependencyTypeTranslator.java49
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/DeployedPathProvider.java40
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/EclipseResourceAdapter.java80
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/HRefTranslator.java92
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/IArtifactEditFactory.java27
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/IComponentImplFactory.java26
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/IModuleConstants.java49
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/IPathProvider.java28
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/IPathTranslator.java65
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/ModuleCoreEclipseAdapterFactory.java78
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/ModuleCoreMessages.java29
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/SourcePathProvider.java40
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/URITranslator.java64
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/WTPModulesTranslator.java115
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/WTPModulesXmlMapperI.java37
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/ZipFileExporter.java141
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/package.html368
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/package.xml331
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/resources/IVirtualComponent.java238
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/resources/IVirtualContainer.java283
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/resources/IVirtualFile.java36
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/resources/IVirtualFolder.java37
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/resources/IVirtualReference.java110
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/resources/IVirtualResource.java405
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/resources/package.html80
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/resources/package.xml88
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/plugin.properties11
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/plugin.xml143
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/schema/ComponentProjectMigrator.exsd103
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/schema/artifactedit.exsd112
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/schema/componentCore.xsd52
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/schema/componentimpl.exsd114
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/schema/resourceFactories.exsd117
-rw-r--r--plugins/org.eclipse.wst.common.ui/.classpath8
-rw-r--r--plugins/org.eclipse.wst.common.ui/.cvsignore8
-rw-r--r--plugins/org.eclipse.wst.common.ui/.project28
-rw-r--r--plugins/org.eclipse.wst.common.ui/.settings/org.eclipse.jdt.core.prefs59
-rw-r--r--plugins/org.eclipse.wst.common.ui/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--plugins/org.eclipse.wst.common.ui/META-INF/MANIFEST.MF24
-rw-r--r--plugins/org.eclipse.wst.common.ui/README.txt1
-rw-r--r--plugins/org.eclipse.wst.common.ui/about.html34
-rw-r--r--plugins/org.eclipse.wst.common.ui/build.properties10
-rw-r--r--plugins/org.eclipse.wst.common.ui/component.xml62
-rw-r--r--plugins/org.eclipse.wst.common.ui/plugin.properties157
-rw-r--r--plugins/org.eclipse.wst.common.ui/plugin.xml31
-rw-r--r--plugins/org.eclipse.wst.common.ui/schema/exampleProjectCreationWizard.exsd243
-rw-r--r--plugins/org.eclipse.wst.common.ui/src-search/org/eclipse/wst/common/ui/internal/search/AbstractSearchQuery.java181
-rw-r--r--plugins/org.eclipse.wst.common.ui/src-search/org/eclipse/wst/common/ui/internal/search/ISearchConstants.java38
-rw-r--r--plugins/org.eclipse.wst.common.ui/src-search/org/eclipse/wst/common/ui/internal/search/SearchMessages.java145
-rw-r--r--plugins/org.eclipse.wst.common.ui/src-search/org/eclipse/wst/common/ui/internal/search/SearchMessages.properties258
-rw-r--r--plugins/org.eclipse.wst.common.ui/src-search/org/eclipse/wst/common/ui/internal/search/SearchQueryResultCollector.java33
-rw-r--r--plugins/org.eclipse.wst.common.ui/src-search/org/eclipse/wst/common/ui/internal/search/SearchResult.java82
-rw-r--r--plugins/org.eclipse.wst.common.ui/src-search/org/eclipse/wst/common/ui/internal/search/SearchResultPage.java380
-rw-r--r--plugins/org.eclipse.wst.common.ui/src-search/org/eclipse/wst/common/ui/internal/search/SearchResultTableContentProvider.java78
-rw-r--r--plugins/org.eclipse.wst.common.ui/src-search/org/eclipse/wst/common/ui/internal/search/SearchResultTreeContentProvider.java168
-rw-r--r--plugins/org.eclipse.wst.common.ui/src-search/org/eclipse/wst/common/ui/internal/search/dialogs/ComponentSearchListDialog.java640
-rw-r--r--plugins/org.eclipse.wst.common.ui/src-search/org/eclipse/wst/common/ui/internal/search/dialogs/ComponentSearchListDialogConfiguration.java101
-rw-r--r--plugins/org.eclipse.wst.common.ui/src-search/org/eclipse/wst/common/ui/internal/search/dialogs/ComponentSpecification.java98
-rw-r--r--plugins/org.eclipse.wst.common.ui/src-search/org/eclipse/wst/common/ui/internal/search/dialogs/IComponentDescriptionProvider.java30
-rw-r--r--plugins/org.eclipse.wst.common.ui/src-search/org/eclipse/wst/common/ui/internal/search/dialogs/IComponentList.java18
-rw-r--r--plugins/org.eclipse.wst.common.ui/src-search/org/eclipse/wst/common/ui/internal/search/dialogs/IComponentSearchListProvider.java20
-rw-r--r--plugins/org.eclipse.wst.common.ui/src-search/org/eclipse/wst/common/ui/internal/search/dialogs/INewComponentHandler.java16
-rw-r--r--plugins/org.eclipse.wst.common.ui/src-search/org/eclipse/wst/common/ui/internal/search/dialogs/ScopedComponentSearchListDialog.java232
-rw-r--r--plugins/org.eclipse.wst.common.ui/src-search/org/eclipse/wst/common/ui/internal/search/dialogs/Test.java105
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/Messages.java174
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/UIPlugin.java175
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/dialogs/SaveDirtyFilesDialog.java157
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/dialogs/SelectSingleFileDialog.java127
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/dnd/DefaultDragAndDropCommand.java110
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/dnd/DragAndDropCommand.java29
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/dnd/DragAndDropManager.java19
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/dnd/ObjectTransfer.java117
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/dnd/ViewerDragAdapter.java86
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/dnd/ViewerDropAdapter.java768
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/viewers/NavigableTableViewer.java46
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/viewers/ResourceFilter.java101
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/viewers/SelectMultiFilePage.java385
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/viewers/SelectSingleFilePage.java95
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/viewers/SelectSingleFileView.java401
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/viewers/TableNavigator.java409
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/provisional/editors/PostMultiPageEditorSite.java103
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/provisional/editors/PostMultiPageSelectionProvider.java52
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/provisional/editors/PostSelectionMultiPageEditorPart.java46
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/.classpath7
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/.cvsignore8
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/.project28
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/.settings/org.eclipse.jdt.core.prefs57
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/META-INF/MANIFEST.MF15
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/README.txt1
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/about.html34
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/build.properties11
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/plugin.properties15
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/plugin.xml7
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/schema/resolverExtensions.exsd167
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/src/org/eclipse/wst/common/uriresolver/internal/ExtensibleURIResolver.java203
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/src/org/eclipse/wst/common/uriresolver/internal/URI.java2875
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/src/org/eclipse/wst/common/uriresolver/internal/URIResolverExtensionDescriptor.java122
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/src/org/eclipse/wst/common/uriresolver/internal/URIResolverExtensionRegistry.java162
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/src/org/eclipse/wst/common/uriresolver/internal/URIResolverExtensionRegistryReader.java136
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/src/org/eclipse/wst/common/uriresolver/internal/provisional/URIResolver.java34
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/src/org/eclipse/wst/common/uriresolver/internal/provisional/URIResolverExtension.java30
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/src/org/eclipse/wst/common/uriresolver/internal/provisional/URIResolverPlugin.java46
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/src/org/eclipse/wst/common/uriresolver/internal/util/URIEncoder.java204
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/src/org/eclipse/wst/common/uriresolver/internal/util/URIHelper.java528
-rw-r--r--plugins/org.eclipse.wst.internet.cache/.classpath7
-rw-r--r--plugins/org.eclipse.wst.internet.cache/.cvsignore7
-rw-r--r--plugins/org.eclipse.wst.internet.cache/.project28
-rw-r--r--plugins/org.eclipse.wst.internet.cache/.settings/org.eclipse.jdt.core.prefs57
-rw-r--r--plugins/org.eclipse.wst.internet.cache/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--plugins/org.eclipse.wst.internet.cache/META-INF/MANIFEST.MF15
-rw-r--r--plugins/org.eclipse.wst.internet.cache/about.html34
-rw-r--r--plugins/org.eclipse.wst.internet.cache/build.properties10
-rw-r--r--plugins/org.eclipse.wst.internet.cache/exsd/cacheresource.exsd121
-rw-r--r--plugins/org.eclipse.wst.internet.cache/plugin.properties17
-rw-r--r--plugins/org.eclipse.wst.internet.cache/plugin.xml30
-rw-r--r--plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/Cache.java523
-rw-r--r--plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/CacheEntry.java114
-rw-r--r--plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/CacheJob.java127
-rw-r--r--plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/CacheMessages.java58
-rw-r--r--plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/CachePlugin.java165
-rw-r--r--plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/CachePluginResources.properties43
-rw-r--r--plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/CacheURIResolverExtension.java50
-rw-r--r--plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/LicenseAcceptanceDialog.java342
-rw-r--r--plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/LicenseRegistry.java249
-rw-r--r--plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/ToCacheRegistryReader.java147
-rw-r--r--plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/ToCacheResource.java53
-rw-r--r--plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/preferences/CachePreferencePage.java302
-rw-r--r--plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/preferences/ContextIds.java21
-rw-r--r--plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/preferences/PreferenceConstants.java23
-rw-r--r--plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/preferences/PreferenceInitializer.java33
-rw-r--r--plugins/org.eclipse.wst.validation.ui/.classpath8
-rw-r--r--plugins/org.eclipse.wst.validation.ui/.cvsignore7
-rw-r--r--plugins/org.eclipse.wst.validation.ui/.project26
-rw-r--r--plugins/org.eclipse.wst.validation.ui/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--plugins/org.eclipse.wst.validation.ui/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--plugins/org.eclipse.wst.validation.ui/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--plugins/org.eclipse.wst.validation.ui/META-INF/MANIFEST.MF21
-rw-r--r--plugins/org.eclipse.wst.validation.ui/about.html34
-rw-r--r--plugins/org.eclipse.wst.validation.ui/build.properties19
-rw-r--r--plugins/org.eclipse.wst.validation.ui/build/buildcontrol.properties16
-rw-r--r--plugins/org.eclipse.wst.validation.ui/build/package.xml18
-rw-r--r--plugins/org.eclipse.wst.validation.ui/build/sourcejar.txt1
-rw-r--r--plugins/org.eclipse.wst.validation.ui/build/wsBuild.xml17
-rw-r--r--plugins/org.eclipse.wst.validation.ui/icons/fail_tbl.gifbin896 -> 0 bytes
-rw-r--r--plugins/org.eclipse.wst.validation.ui/icons/fail_tbl_disabled.gifbin899 -> 0 bytes
-rw-r--r--plugins/org.eclipse.wst.validation.ui/icons/ok_tbl.gifbin343 -> 0 bytes
-rw-r--r--plugins/org.eclipse.wst.validation.ui/icons/ok_tbl_disabled.gifbin214 -> 0 bytes
-rw-r--r--plugins/org.eclipse.wst.validation.ui/icons/settings.gifbin110 -> 0 bytes
-rw-r--r--plugins/org.eclipse.wst.validation.ui/icons/settings_disabled.gifbin114 -> 0 bytes
-rw-r--r--plugins/org.eclipse.wst.validation.ui/plugin.properties16
-rw-r--r--plugins/org.eclipse.wst.validation.ui/plugin.xml54
-rw-r--r--plugins/org.eclipse.wst.validation.ui/prepareforpii.xml38
-rw-r--r--plugins/org.eclipse.wst.validation.ui/property_files/validate_ui.properties128
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ContextIds.java46
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/DelegatingValidatorPreferencesDialog.java267
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ListContentProvider.java49
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ProgressAndTextDialog.java160
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ResourceConstants.java106
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ResourceHandler.java110
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/SaveFilesDialog.java89
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/SaveFilesHelper.java66
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidateAction.java66
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidationJob.java27
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidationMenuAction.java660
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidationPreferencePage.java1180
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidationPropertiesPage.java1304
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidationUIConstants.java19
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidationUIMessages.java36
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/plugin/RunnableWithProgressWrapper.java97
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/plugin/ValidationUIPlugin.java162
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/validationui.properties19
-rw-r--r--plugins/org.eclipse.wst.validation/.classpath9
-rw-r--r--plugins/org.eclipse.wst.validation/.cvsignore11
-rw-r--r--plugins/org.eclipse.wst.validation/.options2
-rw-r--r--plugins/org.eclipse.wst.validation/.project26
-rw-r--r--plugins/org.eclipse.wst.validation/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--plugins/org.eclipse.wst.validation/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--plugins/org.eclipse.wst.validation/META-INF/MANIFEST.MF22
-rw-r--r--plugins/org.eclipse.wst.validation/about.html34
-rw-r--r--plugins/org.eclipse.wst.validation/build.properties22
-rw-r--r--plugins/org.eclipse.wst.validation/component.xml1
-rw-r--r--plugins/org.eclipse.wst.validation/plugin.properties21
-rw-r--r--plugins/org.eclipse.wst.validation/plugin.xml114
-rw-r--r--plugins/org.eclipse.wst.validation/prepareforpii.xml38
-rw-r--r--plugins/org.eclipse.wst.validation/property_files/validate_base.properties143
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ConfigurationConstants.java85
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ConfigurationManager.java276
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/EventManager.java432
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/FilterUtil.java732
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/GlobalConfiguration.java215
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/IProjectValidationHelper.java24
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/IValidationSelectionHandler.java35
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/InternalValidatorManager.java206
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ProjectConfiguration.java659
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ReferencialFileValidatorExtension.java86
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ReferencialFileValidatorRegistryReader.java130
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/RegistryConstants.java73
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ResourceConstants.java121
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ResourceHandler.java111
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/TaskListUtility.java571
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/TimeEntry.java102
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/VThreadManager.java169
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidationConfiguration.java1074
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidationFactoryImpl.java36
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidationRegistryReader.java1487
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidationSelectionHandlerRegistryReader.java90
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidatorActionFilter.java130
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidatorFilter.java111
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidatorMetaData.java609
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidatorNameFilter.java170
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidatorTypeFilter.java157
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/delegates/DelegatingValidator.java263
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/delegates/IDelegatingValidator.java34
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/delegates/ValidatorDelegateDescriptor.java137
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/delegates/ValidatorDelegatesRegistry.java200
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/delegates/ValidatorDelegatesRegistryReader.java114
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/AllValidatorsOperation.java72
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/DefaultResourceUtil.java25
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/EnabledIncrementalValidatorsOperation.java236
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/EnabledValidatorsOperation.java165
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/IResourceUtil.java22
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/IRuleGroup.java41
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/IWorkbenchContext.java176
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/LocalizedMessage.java64
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ManualIncrementalValidatorsOperation.java31
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ManualValidatorsOperation.java39
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/MessageInfo.java106
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/OneValidatorOperation.java124
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ReferencialFileValidator.java29
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ReferencialFileValidatorHelper.java69
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ResourceHandler.java20
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/TaskListHelper.java107
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidationBuilder.java303
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidationConstants.java25
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidationOperation.java1767
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidationUtility.java121
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidatorJob.java194
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidatorManager.java1165
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidatorSubsetOperation.java336
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/WorkbenchContext.java790
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/WorkbenchFileDelta.java78
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/WorkbenchReporter.java748
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/plugin/ValidationHelperRegistryReader.java69
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/plugin/ValidationPlugin.java160
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/provisional/ValidationFactory.java46
-rw-r--r--plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/core/EmptySchedulingRule.java22
-rw-r--r--plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/core/FileDelta.java84
-rw-r--r--plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/core/IFileDelta.java59
-rw-r--r--plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/core/IMessageAccess.java47
-rw-r--r--plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/core/Message.java398
-rw-r--r--plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/core/MessageFilter.java129
-rw-r--r--plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/core/ValidationException.java165
-rw-r--r--plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/core/ValidatorLauncher.java135
-rw-r--r--plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/provisional/core/IMessage.java347
-rw-r--r--plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/provisional/core/IMetaModelContext.java17
-rw-r--r--plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/provisional/core/IProjectValidationContext.java36
-rw-r--r--plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/provisional/core/IReporter.java164
-rw-r--r--plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/provisional/core/IValidationContext.java84
-rw-r--r--plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/provisional/core/IValidator.java71
-rw-r--r--plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/provisional/core/IValidatorJob.java54
-rw-r--r--plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/provisional/core/MessageLimitException.java29
-rw-r--r--plugins/org.eclipse.wst.validation/xsds/referencialFileExtSchema.exsd118
-rw-r--r--plugins/org.eclipse.wst.validation/xsds/validationHelper.exsd113
-rw-r--r--plugins/org.eclipse.wst.validation/xsds/validationSelectionHandler.exsd117
-rw-r--r--plugins/org.eclipse.wst.validation/xsds/validatorDelegates.exsd134
-rw-r--r--plugins/org.eclipse.wst.validation/xsds/validatorExtSchema.exsd309
965 files changed, 0 insertions, 141590 deletions
diff --git a/features/org.eclipse.wst.common_core.feature/.cvsignore b/features/org.eclipse.wst.common_core.feature/.cvsignore
deleted file mode 100644
index 2620caaf6..000000000
--- a/features/org.eclipse.wst.common_core.feature/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-build.xml
-org.eclipse.wst.common_core.feature_1.0.0.bin.dist.zip
diff --git a/features/org.eclipse.wst.common_core.feature/.project b/features/org.eclipse.wst.common_core.feature/.project
deleted file mode 100644
index 192f462a3..000000000
--- a/features/org.eclipse.wst.common_core.feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.common_core.feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/features/org.eclipse.wst.common_core.feature/build.properties b/features/org.eclipse.wst.common_core.feature/build.properties
deleted file mode 100644
index 7f47694aa..000000000
--- a/features/org.eclipse.wst.common_core.feature/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-bin.includes = feature.xml,\
- eclipse_update_120.jpg,\
- epl-v10.html,\
- license.html,\
- feature.properties
diff --git a/features/org.eclipse.wst.common_core.feature/eclipse_update_120.jpg b/features/org.eclipse.wst.common_core.feature/eclipse_update_120.jpg
deleted file mode 100644
index bfdf708ad..000000000
--- a/features/org.eclipse.wst.common_core.feature/eclipse_update_120.jpg
+++ /dev/null
Binary files differ
diff --git a/features/org.eclipse.wst.common_core.feature/epl-v10.html b/features/org.eclipse.wst.common_core.feature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/features/org.eclipse.wst.common_core.feature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/features/org.eclipse.wst.common_core.feature/feature.properties b/features/org.eclipse.wst.common_core.feature/feature.properties
deleted file mode 100644
index 6f51274a7..000000000
--- a/features/org.eclipse.wst.common_core.feature/feature.properties
+++ /dev/null
@@ -1,144 +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
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=WST Common Core
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=The Eclipse Web Tools Platform (WTP) Project update site
-
-# "description" property - description of the feature
-description=WST common core functionality.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2006 IBM Corporation and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n\
-\n\
-Contributors:\n\
- IBM Corporation - initial API and implementation\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/features/org.eclipse.wst.common_core.feature/feature.xml b/features/org.eclipse.wst.common_core.feature/feature.xml
deleted file mode 100644
index 0932a3a5a..000000000
--- a/features/org.eclipse.wst.common_core.feature/feature.xml
+++ /dev/null
@@ -1,105 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.wst.common_core.feature"
- label="%featureName"
- version="1.6.0.qualifier"
- provider-name="%providerName">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%updateSiteName" url="http://download.eclipse.org/webtools/updates/"/>
- </url>
-
- <requires>
- <import feature="org.eclipse.jem" version="1.2" match="equivalent"/>
- <import feature="org.eclipse.emf" version="2.2" match="equivalent"/>
- </requires>
-
- <plugin
- id="org.eclipse.wst.common.emfworkbench.integration"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.command.env"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.wst.command.env.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.common.emf"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.common.environment"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.common.frameworks"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.common.modulecore"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.common.project.facet.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.common.uriresolver"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.validation"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.common.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/features/org.eclipse.wst.common_core.feature/license.html b/features/org.eclipse.wst.common_core.feature/license.html
deleted file mode 100644
index 2347060ef..000000000
--- a/features/org.eclipse.wst.common_core.feature/license.html
+++ /dev/null
@@ -1,93 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
-<!-- saved from url=(0044)http://www.eclipse.org/legal/epl/notice.html -->
-<HTML><HEAD><TITLE>Eclipse.org Software User Agreement</TITLE>
-<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<META content="MSHTML 6.00.2800.1479" name=GENERATOR></HEAD>
-<BODY lang=EN-US vLink=purple link=blue>
-<H2>Eclipse Foundation Software User Agreement</H2>
-<P>January 28, 2005</P>
-<H3>Usage Of Content</H3>
-<P>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION
-AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT"). USE OF
-THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE
-TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED
-BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED
-BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE
-AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS OF ANY
-APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU
-MAY NOT USE THE CONTENT.</P>
-<H3>Applicable Licenses</H3>
-<P>Unless otherwise indicated, all Content made available by the Eclipse
-Foundation is provided to you under the terms and conditions of the Eclipse
-Public License Version 1.0 ("EPL"). A copy of the EPL is provided with this
-Content and is also available at <A
-href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</A>.
-For purposes of the EPL, "Program" will mean the Content.</P>
-<P>Content includes, but is not limited to, source code, object code,
-documentation and other files maintained in the Eclipse.org CVS repository
-("Repository") in CVS modules ("Modules") and made available as downloadable
-archives ("Downloads").</P>
-<P>Content may be apportioned into plug-ins ("Plug-ins"), plug-in fragments
-("Fragments"), and features ("Features"). A Feature is a bundle of one or more
-Plug-ins and/or Fragments and associated material. Files named "feature.xml" may
-contain a list of the names and version numbers of the Plug-ins and/or Fragments
-associated with a Feature. Plug-ins and Fragments are located in directories
-named "plugins" and Features are located in directories named "features".</P>
-<P>Features may also include other Features ("Included Features"). Files named
-"feature.xml" may contain a list of the names and version numbers of Included
-Features.</P>
-<P>The terms and conditions governing Plug-ins and Fragments should be contained
-in files named "about.html" ("Abouts"). The terms and conditions governing
-Features and Included Features should be contained in files named "license.html"
-("Feature Licenses"). Abouts and Feature Licenses may be located in any
-directory of a Download or Module including, but not limited to the following
-locations:</P>
-<UL>
- <LI>The top-level (root) directory
- <LI>Plug-in and Fragment directories
- <LI>Subdirectories of the directory named "src" of certain Plug-ins
- <LI>Feature directories </LI></UL>
-<P>Note: if a Feature made available by the Eclipse Foundation is installed
-using the Eclipse Update Manager, you must agree to a license ("Feature Update
-License") during the installation process. If the Feature contains Included
-Features, the Feature Update License should either provide you with the terms
-and conditions governing the Included Features or inform you where you can
-locate them. Feature Update Licenses may be found in the "license" property of
-files named "feature.properties". Such Abouts, Feature Licenses and Feature
-Update Licenses contain the terms and conditions (or references to such terms
-and conditions) that govern your use of the associated Content in that
-directory.</P>
-<P>THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL
-OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</P>
-<UL>
- <LI>Common Public License Version 1.0 (available at <A
- href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</A>)
-
- <LI>Apache Software License 1.1 (available at <A
- href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</A>)
-
- <LI>Apache Software License 2.0 (available at <A
- href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</A>)
-
- <LI>IBM Public License 1.0 (available at <A
- href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</A>)
-
- <LI>Metro Link Public License 1.00 (available at <A
- href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</A>)
-
- <LI>Mozilla Public License Version 1.1 (available at <A
- href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</A>)
- </LI></UL>
-<P>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License is
-provided, please contact the Eclipse Foundation to determine what terms and
-conditions govern that particular Content.</P>
-<H3>Cryptography</H3>
-<P>Content may contain encryption software. The country in which you are
-currently may have restrictions on the import, possession, and use, and/or
-re-export to another country, of encryption software. BEFORE using any
-encryption software, please check the country's laws, regulations and policies
-concerning the import, possession, or use, and re-export of encryption software,
-to see if this is permitted.</P></BODY></HTML>
diff --git a/features/org.eclipse.wst.common_core.feature/sourceTemplateFeature/build.properties b/features/org.eclipse.wst.common_core.feature/sourceTemplateFeature/build.properties
deleted file mode 100644
index f249e9f10..000000000
--- a/features/org.eclipse.wst.common_core.feature/sourceTemplateFeature/build.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.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 =\
-epl-v10.html,\
-eclipse_update_120.jpg,\
-feature.xml,\
-feature.properties,\
-license.html
diff --git a/features/org.eclipse.wst.common_core.feature/sourceTemplateFeature/eclipse_update_120.jpg b/features/org.eclipse.wst.common_core.feature/sourceTemplateFeature/eclipse_update_120.jpg
deleted file mode 100644
index bfdf708ad..000000000
--- a/features/org.eclipse.wst.common_core.feature/sourceTemplateFeature/eclipse_update_120.jpg
+++ /dev/null
Binary files differ
diff --git a/features/org.eclipse.wst.common_core.feature/sourceTemplateFeature/epl-v10.html b/features/org.eclipse.wst.common_core.feature/sourceTemplateFeature/epl-v10.html
deleted file mode 100644
index 022ad2955..000000000
--- a/features/org.eclipse.wst.common_core.feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html>
diff --git a/features/org.eclipse.wst.common_core.feature/sourceTemplateFeature/feature.properties b/features/org.eclipse.wst.common_core.feature/sourceTemplateFeature/feature.properties
deleted file mode 100644
index ac521896d..000000000
--- a/features/org.eclipse.wst.common_core.feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,143 +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
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=WST Common Core Developer Resources
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=The Eclipse Web Tools Platform (WTP) Project update site
-
-# "description" property - description of the feature
-description=Source code zips for WST common core.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2006 IBM Corporation and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n\
-\n\
-Contributors:\n\
- IBM Corporation - initial API and implementation\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/features/org.eclipse.wst.common_core.feature/sourceTemplateFeature/feature.xml b/features/org.eclipse.wst.common_core.feature/sourceTemplateFeature/feature.xml
deleted file mode 100644
index 880429bbb..000000000
--- a/features/org.eclipse.wst.common_core.feature/sourceTemplateFeature/feature.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.wst.common_core.feature.source"
- label="%featureName"
- version="1.6.0.qualifier"
- provider-name="%providerName">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%updateSiteName" url="http://download.eclipse.org/webtools/updates/"/>
- </url>
-
- <plugin
- id="org.eclipse.wst.common_core.feature.source"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
-</feature>
diff --git a/features/org.eclipse.wst.common_core.feature/sourceTemplateFeature/license.html b/features/org.eclipse.wst.common_core.feature/sourceTemplateFeature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/features/org.eclipse.wst.common_core.feature/sourceTemplateFeature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation 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 provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/features/org.eclipse.wst.common_core.feature/sourceTemplatePlugin/about.html b/features/org.eclipse.wst.common_core.feature/sourceTemplatePlugin/about.html
deleted file mode 100644
index 0a8aea00f..000000000
--- a/features/org.eclipse.wst.common_core.feature/sourceTemplatePlugin/about.html
+++ /dev/null
@@ -1,27 +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">
-<h2>About This Content</h2>
-
-<p>February 24, 2005</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/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</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.</p>
-
-<h3>Source Code</h3>
-<p>This plug-in contains source code zip files (&quot;Source Zips&quot;) that correspond to binary content in other plug-ins. These Source Zips may be distributed under different license
-agreements and/or notices. Details about these license agreements and notices are contained in &quot;about.html&quot; files (&quot;Abouts&quot;) located in sub-directories in the
-src/ directory of this plug-in. Such Abouts govern your use of the Source Zips in that directory, not the EPL.</p>
-
-</body>
-</html>
diff --git a/features/org.eclipse.wst.common_core.feature/sourceTemplatePlugin/about.ini b/features/org.eclipse.wst.common_core.feature/sourceTemplatePlugin/about.ini
deleted file mode 100644
index 2dee36a2e..000000000
--- a/features/org.eclipse.wst.common_core.feature/sourceTemplatePlugin/about.ini
+++ /dev/null
@@ -1,31 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.gif
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional
-
-
-
-
diff --git a/features/org.eclipse.wst.common_core.feature/sourceTemplatePlugin/about.mappings b/features/org.eclipse.wst.common_core.feature/sourceTemplatePlugin/about.mappings
deleted file mode 100644
index 0dfb7355d..000000000
--- a/features/org.eclipse.wst.common_core.feature/sourceTemplatePlugin/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@
diff --git a/features/org.eclipse.wst.common_core.feature/sourceTemplatePlugin/about.properties b/features/org.eclipse.wst.common_core.feature/sourceTemplatePlugin/about.properties
deleted file mode 100644
index 9474fc051..000000000
--- a/features/org.eclipse.wst.common_core.feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# about.properties
-# contains externalized strings for about.ini
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# fill-ins are supplied by about.mappings
-# This file should be translated.
-#
-# Do not translate any values surrounded by {}
-
-blurb=Web Standard Tools - Common Core\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Eclipse contributors and others 2005. All rights reserved.\n\
-Visit http://www.eclipse.org/webtools
-
diff --git a/features/org.eclipse.wst.common_core.feature/sourceTemplatePlugin/build.properties b/features/org.eclipse.wst.common_core.feature/sourceTemplatePlugin/build.properties
deleted file mode 100644
index f95b457f2..000000000
--- a/features/org.eclipse.wst.common_core.feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-bin.includes = about.html, about.ini, about.mappings, about.properties, eclipse32.gif, plugin.properties, plugin.xml, src/**, META-INF/
-sourcePlugin = true
diff --git a/features/org.eclipse.wst.common_core.feature/sourceTemplatePlugin/eclipse32.gif b/features/org.eclipse.wst.common_core.feature/sourceTemplatePlugin/eclipse32.gif
deleted file mode 100644
index e6ad7ccd7..000000000
--- a/features/org.eclipse.wst.common_core.feature/sourceTemplatePlugin/eclipse32.gif
+++ /dev/null
Binary files differ
diff --git a/features/org.eclipse.wst.common_core.feature/sourceTemplatePlugin/eclipse32.png b/features/org.eclipse.wst.common_core.feature/sourceTemplatePlugin/eclipse32.png
deleted file mode 100644
index 50ae49de2..000000000
--- a/features/org.eclipse.wst.common_core.feature/sourceTemplatePlugin/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/features/org.eclipse.wst.common_core.feature/sourceTemplatePlugin/plugin.properties b/features/org.eclipse.wst.common_core.feature/sourceTemplatePlugin/plugin.properties
deleted file mode 100644
index c325b0aac..000000000
--- a/features/org.eclipse.wst.common_core.feature/sourceTemplatePlugin/plugin.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
-###############################################################################
-pluginName=Web Standard Tools - Common Core Source
-providerName=Eclipse.org
diff --git a/features/org.eclipse.wst.common_sdk.feature/.cvsignore b/features/org.eclipse.wst.common_sdk.feature/.cvsignore
deleted file mode 100644
index 413925b4f..000000000
--- a/features/org.eclipse.wst.common_sdk.feature/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-org.eclipse.wst.common_sdk.feature_1.0.0.bin.dist.zip
-build.xml
-features
-plugins
diff --git a/features/org.eclipse.wst.common_sdk.feature/.project b/features/org.eclipse.wst.common_sdk.feature/.project
deleted file mode 100644
index fb862503a..000000000
--- a/features/org.eclipse.wst.common_sdk.feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.common_sdk.feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/features/org.eclipse.wst.common_sdk.feature/build.properties b/features/org.eclipse.wst.common_sdk.feature/build.properties
deleted file mode 100644
index 5391fbdf4..000000000
--- a/features/org.eclipse.wst.common_sdk.feature/build.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-generate.feature@org.eclipse.wst.common_ui.feature.source=org.eclipse.wst.common_ui.feature
-bin.includes = feature.xml,\
- epl-v10.html,\
- license.html,\
- eclipse_update_120.jpg,\
- feature.properties
diff --git a/features/org.eclipse.wst.common_sdk.feature/eclipse_update_120.jpg b/features/org.eclipse.wst.common_sdk.feature/eclipse_update_120.jpg
deleted file mode 100644
index bfdf708ad..000000000
--- a/features/org.eclipse.wst.common_sdk.feature/eclipse_update_120.jpg
+++ /dev/null
Binary files differ
diff --git a/features/org.eclipse.wst.common_sdk.feature/epl-v10.html b/features/org.eclipse.wst.common_sdk.feature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/features/org.eclipse.wst.common_sdk.feature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/features/org.eclipse.wst.common_sdk.feature/feature.properties b/features/org.eclipse.wst.common_sdk.feature/feature.properties
deleted file mode 100644
index d7bdfa21f..000000000
--- a/features/org.eclipse.wst.common_sdk.feature/feature.properties
+++ /dev/null
@@ -1,144 +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
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=WST Common Plug-in Developer Resources
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=The Eclipse Web Tools Platform (WTP) Project update site
-
-# "description" property - description of the feature
-description=Source code zips for WST common tools
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2006 IBM Corporation and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n\
-\n\
-Contributors:\n\
- IBM Corporation - initial API and implementation\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/features/org.eclipse.wst.common_sdk.feature/feature.xml b/features/org.eclipse.wst.common_sdk.feature/feature.xml
deleted file mode 100644
index f94d6f9ab..000000000
--- a/features/org.eclipse.wst.common_sdk.feature/feature.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.wst.common_sdk.feature"
- label="%featureName"
- version="1.6.0.qualifier"
- provider-name="%providerName">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="license.html">
- %license
- </license>
-
- <url>
- <update label="%updateSiteName" url="http://download.eclipse.org/webtools/updates/"/>
- </url>
-
- <includes
- id="org.eclipse.wst.common_ui.feature.source"
- version="0.0.0"/>
-
-</feature>
diff --git a/features/org.eclipse.wst.common_sdk.feature/license.html b/features/org.eclipse.wst.common_sdk.feature/license.html
deleted file mode 100644
index 2347060ef..000000000
--- a/features/org.eclipse.wst.common_sdk.feature/license.html
+++ /dev/null
@@ -1,93 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
-<!-- saved from url=(0044)http://www.eclipse.org/legal/epl/notice.html -->
-<HTML><HEAD><TITLE>Eclipse.org Software User Agreement</TITLE>
-<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<META content="MSHTML 6.00.2800.1479" name=GENERATOR></HEAD>
-<BODY lang=EN-US vLink=purple link=blue>
-<H2>Eclipse Foundation Software User Agreement</H2>
-<P>January 28, 2005</P>
-<H3>Usage Of Content</H3>
-<P>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION
-AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT"). USE OF
-THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE
-TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED
-BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED
-BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE
-AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS OF ANY
-APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU
-MAY NOT USE THE CONTENT.</P>
-<H3>Applicable Licenses</H3>
-<P>Unless otherwise indicated, all Content made available by the Eclipse
-Foundation is provided to you under the terms and conditions of the Eclipse
-Public License Version 1.0 ("EPL"). A copy of the EPL is provided with this
-Content and is also available at <A
-href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</A>.
-For purposes of the EPL, "Program" will mean the Content.</P>
-<P>Content includes, but is not limited to, source code, object code,
-documentation and other files maintained in the Eclipse.org CVS repository
-("Repository") in CVS modules ("Modules") and made available as downloadable
-archives ("Downloads").</P>
-<P>Content may be apportioned into plug-ins ("Plug-ins"), plug-in fragments
-("Fragments"), and features ("Features"). A Feature is a bundle of one or more
-Plug-ins and/or Fragments and associated material. Files named "feature.xml" may
-contain a list of the names and version numbers of the Plug-ins and/or Fragments
-associated with a Feature. Plug-ins and Fragments are located in directories
-named "plugins" and Features are located in directories named "features".</P>
-<P>Features may also include other Features ("Included Features"). Files named
-"feature.xml" may contain a list of the names and version numbers of Included
-Features.</P>
-<P>The terms and conditions governing Plug-ins and Fragments should be contained
-in files named "about.html" ("Abouts"). The terms and conditions governing
-Features and Included Features should be contained in files named "license.html"
-("Feature Licenses"). Abouts and Feature Licenses may be located in any
-directory of a Download or Module including, but not limited to the following
-locations:</P>
-<UL>
- <LI>The top-level (root) directory
- <LI>Plug-in and Fragment directories
- <LI>Subdirectories of the directory named "src" of certain Plug-ins
- <LI>Feature directories </LI></UL>
-<P>Note: if a Feature made available by the Eclipse Foundation is installed
-using the Eclipse Update Manager, you must agree to a license ("Feature Update
-License") during the installation process. If the Feature contains Included
-Features, the Feature Update License should either provide you with the terms
-and conditions governing the Included Features or inform you where you can
-locate them. Feature Update Licenses may be found in the "license" property of
-files named "feature.properties". Such Abouts, Feature Licenses and Feature
-Update Licenses contain the terms and conditions (or references to such terms
-and conditions) that govern your use of the associated Content in that
-directory.</P>
-<P>THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL
-OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</P>
-<UL>
- <LI>Common Public License Version 1.0 (available at <A
- href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</A>)
-
- <LI>Apache Software License 1.1 (available at <A
- href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</A>)
-
- <LI>Apache Software License 2.0 (available at <A
- href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</A>)
-
- <LI>IBM Public License 1.0 (available at <A
- href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</A>)
-
- <LI>Metro Link Public License 1.00 (available at <A
- href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</A>)
-
- <LI>Mozilla Public License Version 1.1 (available at <A
- href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</A>)
- </LI></UL>
-<P>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License is
-provided, please contact the Eclipse Foundation to determine what terms and
-conditions govern that particular Content.</P>
-<H3>Cryptography</H3>
-<P>Content may contain encryption software. The country in which you are
-currently may have restrictions on the import, possession, and use, and/or
-re-export to another country, of encryption software. BEFORE using any
-encryption software, please check the country's laws, regulations and policies
-concerning the import, possession, or use, and re-export of encryption software,
-to see if this is permitted.</P></BODY></HTML>
diff --git a/features/org.eclipse.wst.common_ui.feature/.cvsignore b/features/org.eclipse.wst.common_ui.feature/.cvsignore
deleted file mode 100644
index e00af7da3..000000000
--- a/features/org.eclipse.wst.common_ui.feature/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-build.xml
-org.eclipse.wst.common_ui.feature_1.0.0.bin.dist.zip
diff --git a/features/org.eclipse.wst.common_ui.feature/.project b/features/org.eclipse.wst.common_ui.feature/.project
deleted file mode 100644
index 221164fec..000000000
--- a/features/org.eclipse.wst.common_ui.feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.common_ui.feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/features/org.eclipse.wst.common_ui.feature/build.properties b/features/org.eclipse.wst.common_ui.feature/build.properties
deleted file mode 100644
index 7f47694aa..000000000
--- a/features/org.eclipse.wst.common_ui.feature/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-bin.includes = feature.xml,\
- eclipse_update_120.jpg,\
- epl-v10.html,\
- license.html,\
- feature.properties
diff --git a/features/org.eclipse.wst.common_ui.feature/eclipse_update_120.jpg b/features/org.eclipse.wst.common_ui.feature/eclipse_update_120.jpg
deleted file mode 100644
index bfdf708ad..000000000
--- a/features/org.eclipse.wst.common_ui.feature/eclipse_update_120.jpg
+++ /dev/null
Binary files differ
diff --git a/features/org.eclipse.wst.common_ui.feature/epl-v10.html b/features/org.eclipse.wst.common_ui.feature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/features/org.eclipse.wst.common_ui.feature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/features/org.eclipse.wst.common_ui.feature/feature.properties b/features/org.eclipse.wst.common_ui.feature/feature.properties
deleted file mode 100644
index f3e8ae863..000000000
--- a/features/org.eclipse.wst.common_ui.feature/feature.properties
+++ /dev/null
@@ -1,144 +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
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=WST Common UI
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=The Eclipse Web Tools Platform (WTP) Project update site
-
-# "description" property - description of the feature
-description=WST common UI functionality.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2006 IBM Corporation and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n\
-\n\
-Contributors:\n\
- IBM Corporation - initial API and implementation\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/features/org.eclipse.wst.common_ui.feature/feature.xml b/features/org.eclipse.wst.common_ui.feature/feature.xml
deleted file mode 100644
index 33413dfbf..000000000
--- a/features/org.eclipse.wst.common_ui.feature/feature.xml
+++ /dev/null
@@ -1,127 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.wst.common_ui.feature"
- label="%featureName"
- version="1.6.0.qualifier"
- provider-name="%providerName">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%updateSiteName" url="http://download.eclipse.org/webtools/updates/"/>
- </url>
-
- <includes
- id="org.eclipse.wst.common_userdoc.feature"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.wst.common_core.feature"
- version="0.0.0"/>
-
- <requires>
- <import feature="org.eclipse.gef" version="3.2" match="equivalent"/>
- </requires>
-
- <plugin
- id="org.eclipse.wst.command.env.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.common.frameworks.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.common.infopop"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.common.project.facet.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.common.snippets"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.common.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.common.ui.properties"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.internet.proxy"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.internet.proxy.infopop"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.internet.cache"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.validation.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.command.env.infopop"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.wst.validation.infopop"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/features/org.eclipse.wst.common_ui.feature/license.html b/features/org.eclipse.wst.common_ui.feature/license.html
deleted file mode 100644
index 2347060ef..000000000
--- a/features/org.eclipse.wst.common_ui.feature/license.html
+++ /dev/null
@@ -1,93 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
-<!-- saved from url=(0044)http://www.eclipse.org/legal/epl/notice.html -->
-<HTML><HEAD><TITLE>Eclipse.org Software User Agreement</TITLE>
-<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<META content="MSHTML 6.00.2800.1479" name=GENERATOR></HEAD>
-<BODY lang=EN-US vLink=purple link=blue>
-<H2>Eclipse Foundation Software User Agreement</H2>
-<P>January 28, 2005</P>
-<H3>Usage Of Content</H3>
-<P>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION
-AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT"). USE OF
-THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE
-TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED
-BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED
-BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE
-AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS OF ANY
-APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU
-MAY NOT USE THE CONTENT.</P>
-<H3>Applicable Licenses</H3>
-<P>Unless otherwise indicated, all Content made available by the Eclipse
-Foundation is provided to you under the terms and conditions of the Eclipse
-Public License Version 1.0 ("EPL"). A copy of the EPL is provided with this
-Content and is also available at <A
-href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</A>.
-For purposes of the EPL, "Program" will mean the Content.</P>
-<P>Content includes, but is not limited to, source code, object code,
-documentation and other files maintained in the Eclipse.org CVS repository
-("Repository") in CVS modules ("Modules") and made available as downloadable
-archives ("Downloads").</P>
-<P>Content may be apportioned into plug-ins ("Plug-ins"), plug-in fragments
-("Fragments"), and features ("Features"). A Feature is a bundle of one or more
-Plug-ins and/or Fragments and associated material. Files named "feature.xml" may
-contain a list of the names and version numbers of the Plug-ins and/or Fragments
-associated with a Feature. Plug-ins and Fragments are located in directories
-named "plugins" and Features are located in directories named "features".</P>
-<P>Features may also include other Features ("Included Features"). Files named
-"feature.xml" may contain a list of the names and version numbers of Included
-Features.</P>
-<P>The terms and conditions governing Plug-ins and Fragments should be contained
-in files named "about.html" ("Abouts"). The terms and conditions governing
-Features and Included Features should be contained in files named "license.html"
-("Feature Licenses"). Abouts and Feature Licenses may be located in any
-directory of a Download or Module including, but not limited to the following
-locations:</P>
-<UL>
- <LI>The top-level (root) directory
- <LI>Plug-in and Fragment directories
- <LI>Subdirectories of the directory named "src" of certain Plug-ins
- <LI>Feature directories </LI></UL>
-<P>Note: if a Feature made available by the Eclipse Foundation is installed
-using the Eclipse Update Manager, you must agree to a license ("Feature Update
-License") during the installation process. If the Feature contains Included
-Features, the Feature Update License should either provide you with the terms
-and conditions governing the Included Features or inform you where you can
-locate them. Feature Update Licenses may be found in the "license" property of
-files named "feature.properties". Such Abouts, Feature Licenses and Feature
-Update Licenses contain the terms and conditions (or references to such terms
-and conditions) that govern your use of the associated Content in that
-directory.</P>
-<P>THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL
-OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</P>
-<UL>
- <LI>Common Public License Version 1.0 (available at <A
- href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</A>)
-
- <LI>Apache Software License 1.1 (available at <A
- href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</A>)
-
- <LI>Apache Software License 2.0 (available at <A
- href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</A>)
-
- <LI>IBM Public License 1.0 (available at <A
- href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</A>)
-
- <LI>Metro Link Public License 1.00 (available at <A
- href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</A>)
-
- <LI>Mozilla Public License Version 1.1 (available at <A
- href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</A>)
- </LI></UL>
-<P>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License is
-provided, please contact the Eclipse Foundation to determine what terms and
-conditions govern that particular Content.</P>
-<H3>Cryptography</H3>
-<P>Content may contain encryption software. The country in which you are
-currently may have restrictions on the import, possession, and use, and/or
-re-export to another country, of encryption software. BEFORE using any
-encryption software, please check the country's laws, regulations and policies
-concerning the import, possession, or use, and re-export of encryption software,
-to see if this is permitted.</P></BODY></HTML>
diff --git a/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/build.properties b/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/build.properties
deleted file mode 100644
index e87855538..000000000
--- a/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.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 =\
-epl-v10.html,\
-eclipse_update_120.jpg,\
-feature.xml,\
-feature.properties,\
-license.html
-
-generate.feature@org.eclipse.wst.common_core.feature.source = org.eclipse.wst.common_core.feature
-
diff --git a/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/eclipse_update_120.jpg b/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/eclipse_update_120.jpg
deleted file mode 100644
index bfdf708ad..000000000
--- a/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/eclipse_update_120.jpg
+++ /dev/null
Binary files differ
diff --git a/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/epl-v10.html b/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/epl-v10.html
deleted file mode 100644
index 022ad2955..000000000
--- a/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html>
diff --git a/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/feature.properties b/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/feature.properties
deleted file mode 100644
index 8423d3831..000000000
--- a/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,145 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=WST Common UI Developer Resources
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=The Eclipse Web Tools Platform (WTP) Project update site
-
-# "description" property - description of the feature
-description=Source code zips for WST Common UI.
-
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2006 IBM Corporation and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n\
-\n\
-Contributors:\n\
- IBM Corporation - initial API and implementation\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/feature.xml b/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/feature.xml
deleted file mode 100644
index 4f1a6183a..000000000
--- a/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/feature.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.wst.common_ui.feature.source"
- label="%featureName"
- version="1.6.0.qualifier"
- provider-name="%providerName">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%updateSiteName" url="http://download.eclipse.org/webtools/updates/"/>
- </url>
-
- <includes
- id="org.eclipse.wst.common_core.feature"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.wst.common_core.feature.source"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.wst.common_ui.feature.source"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
-</feature>
diff --git a/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/license.html b/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/features/org.eclipse.wst.common_ui.feature/sourceTemplateFeature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation 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 provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/about.html b/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/about.html
deleted file mode 100644
index 0a8aea00f..000000000
--- a/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/about.html
+++ /dev/null
@@ -1,27 +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">
-<h2>About This Content</h2>
-
-<p>February 24, 2005</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/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</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.</p>
-
-<h3>Source Code</h3>
-<p>This plug-in contains source code zip files (&quot;Source Zips&quot;) that correspond to binary content in other plug-ins. These Source Zips may be distributed under different license
-agreements and/or notices. Details about these license agreements and notices are contained in &quot;about.html&quot; files (&quot;Abouts&quot;) located in sub-directories in the
-src/ directory of this plug-in. Such Abouts govern your use of the Source Zips in that directory, not the EPL.</p>
-
-</body>
-</html>
diff --git a/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/about.ini b/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/about.ini
deleted file mode 100644
index 2dee36a2e..000000000
--- a/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/about.ini
+++ /dev/null
@@ -1,31 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.gif
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (not translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
-
-# Property "welcomePerspective" contains the id of the perspective in which the
-# welcome page is to be opened.
-# optional
-
-
-
-
diff --git a/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/about.mappings b/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/about.mappings
deleted file mode 100644
index 0dfb7355d..000000000
--- a/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@
diff --git a/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/about.properties b/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/about.properties
deleted file mode 100644
index 40314ea70..000000000
--- a/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# about.properties
-# contains externalized strings for about.ini
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# fill-ins are supplied by about.mappings
-# This file should be translated.
-#
-# Do not translate any values surrounded by {}
-
-blurb=Web Standard Tools - Common UI\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Eclipse contributors and others 2005. All rights reserved.\n\
-Visit http://www.eclipse.org/webtools
-
diff --git a/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/build.properties b/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/build.properties
deleted file mode 100644
index 5895597f9..000000000
--- a/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-
-bin.includes = about.html, about.ini, about.mappings, about.properties, eclipse32.gif, plugin.properties, plugin.xml, src/**, META-INF/
-sourcePlugin = true
diff --git a/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/eclipse32.gif b/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/eclipse32.gif
deleted file mode 100644
index e6ad7ccd7..000000000
--- a/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/eclipse32.gif
+++ /dev/null
Binary files differ
diff --git a/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/eclipse32.png b/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/eclipse32.png
deleted file mode 100644
index 50ae49de2..000000000
--- a/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/eclipse32.png
+++ /dev/null
Binary files differ
diff --git a/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/plugin.properties b/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/plugin.properties
deleted file mode 100644
index 4c0b73cc6..000000000
--- a/features/org.eclipse.wst.common_ui.feature/sourceTemplatePlugin/plugin.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
-###############################################################################
-pluginName=Web Standard Tools - Common UI Source
-providerName=Eclipse.org
diff --git a/plugins/org.eclipse.jem.util/.classpath b/plugins/org.eclipse.jem.util/.classpath
deleted file mode 100644
index d4d58afdc..000000000
--- a/plugins/org.eclipse.jem.util/.classpath
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="jemutil"/>
- <classpathentry kind="src" path="property_files"/>
- <classpathentry kind="src" path="jemutil-nonworkbnech"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry sourcepath="org.eclipse.perfmsr.core.stub/perfmsr.jar" kind="lib" path="org.eclipse.perfmsr.core.stub/perfmsr.jar"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.jem.util/.cvsignore b/plugins/org.eclipse.jem.util/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/plugins/org.eclipse.jem.util/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/plugins/org.eclipse.jem.util/.options b/plugins/org.eclipse.jem.util/.options
deleted file mode 100644
index 056541768..000000000
--- a/plugins/org.eclipse.jem.util/.options
+++ /dev/null
@@ -1,3 +0,0 @@
-org.eclipse.jem.util/debug/logtrace=false
-org.eclipse.jem.util/debug/logtracefile=false
-org.eclipse.jem.util/debug/loglevel=WARNING \ No newline at end of file
diff --git a/plugins/org.eclipse.jem.util/.project b/plugins/org.eclipse.jem.util/.project
deleted file mode 100644
index e0e41206f..000000000
--- a/plugins/org.eclipse.jem.util/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jem.util</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/plugins/org.eclipse.jem.util/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.jem.util/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index d78073f2c..000000000
--- a/plugins/org.eclipse.jem.util/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,289 +0,0 @@
-#Tue Feb 21 10:09:19 EST 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-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=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-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=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-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.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.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=1
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=1
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines=false
-org.eclipse.jdt.core.formatter.comment.format_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=150
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=150
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
diff --git a/plugins/org.eclipse.jem.util/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.jem.util/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 6c8e1bc01..000000000
--- a/plugins/org.eclipse.jem.util/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Feb 21 10:09:19 EST 2006
-eclipse.preferences.version=1
-formatter_profile=_jve
-formatter_settings_version=10
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=java;javax;org;org.eclipse.wtp;org.eclipse.jem;org.eclipse.ve.internal.cdm;org.eclipse.ve.internal.cde;org.eclipse.ve.internal.jcm;org.eclipse.ve.internal.java;org.eclipse.ve;com;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates/>
diff --git a/plugins/org.eclipse.jem.util/.settings/org.eclipse.pde.prefs b/plugins/org.eclipse.jem.util/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index fb46b2882..000000000
--- a/plugins/org.eclipse.jem.util/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-#Fri May 13 10:10:04 EDT 2005
-compilers.p.deprecated=1
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=2
-compilers.p.unknown-attribute=0
-compilers.p.unknown-class=2
-compilers.p.unknown-element=1
-compilers.p.unknown-resource=2
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=2
-compilers.use-project=true
-eclipse.preferences.version=1
diff --git a/plugins/org.eclipse.jem.util/META-INF/MANIFEST.MF b/plugins/org.eclipse.jem.util/META-INF/MANIFEST.MF
deleted file mode 100644
index 59b2475ba..000000000
--- a/plugins/org.eclipse.jem.util/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,25 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.jem.util; singleton:=true
-Bundle-Version: 1.2.1.qualifier
-Bundle-Activator: org.eclipse.jem.util.plugin.JEMUtilPlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.jem.internal.util.emf.workbench;x-friends:="org.eclipse.jem.beaninfo",
- org.eclipse.jem.internal.util.emf.workbench.nature;x-internal:=true,
- org.eclipse.jem.internal.util.emf.workbench.nls;x-internal:=true,
- org.eclipse.jem.util,
- org.eclipse.jem.util.emf.workbench,
- org.eclipse.jem.util.emf.workbench.nature,
- org.eclipse.jem.util.logger,
- org.eclipse.jem.util.logger.proxy,
- org.eclipse.jem.util.logger.proxyrender,
- org.eclipse.jem.util.plugin
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.emf.ecore;bundle-version="[2.2.0,3.0.0)",
- org.eclipse.emf.ecore.xmi;bundle-version="[2.2.0,3.0.0)",
- org.eclipse.perfmsr.core;bundle-version="1.0.0";resolution:=optional,
- com.ibm.icu;bundle-version="[3.4.4.1,4.0.0)"
-Eclipse-LazyStart: true
diff --git a/plugins/org.eclipse.jem.util/PERFMSR_README.txt b/plugins/org.eclipse.jem.util/PERFMSR_README.txt
deleted file mode 100644
index ea512589c..000000000
--- a/plugins/org.eclipse.jem.util/PERFMSR_README.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-org.eclipse.perfmsr.core code can be found in the perfmsr.jar loaded as binary in this
-project. Since this is optional, we needed to be able to compile without the true
-plugin being available. So we created the stub jar containing just what we needed.
-
-If there is a need to change anything in the stub jar, you will need to checkout
-the folder org.eclipse.jem.util/org.eclipse.perfmsr.core.stub. This will then
-be a separate project. You can then make the changes there, and then following the
-README in that project to create and commit the changes.
-
-The jar is in this project's classpath, but it is not exported and is not in
-the plugin.xml or build.properties. This means it will be available for compilation
-but it won't show up in the runtime workbench. \ No newline at end of file
diff --git a/plugins/org.eclipse.jem.util/READ_ME_BEFORE_CHANGING_MANIFEST!!! b/plugins/org.eclipse.jem.util/READ_ME_BEFORE_CHANGING_MANIFEST!!!
deleted file mode 100644
index 718e94a6f..000000000
--- a/plugins/org.eclipse.jem.util/READ_ME_BEFORE_CHANGING_MANIFEST!!!
+++ /dev/null
@@ -1,8 +0,0 @@
-Do not include a new dependency plugin to the MANIFEST for this plugind!!!
-
-The reason for this is that this plugin is also executed outside of Eclipse framework, such IBM Websphere Application Server (c) IBM. We cannot add
-new dependencies to the plugin because the current set is considered to be API. Adding a new set without consulting those users would break
-them.
-
-The external API is anything in the jemutil-nonworkbench folder. If it is only for a class in the other source folder(s) it may be OK since they would not be
-using that code. But it would be best to consult with them first. \ No newline at end of file
diff --git a/plugins/org.eclipse.jem.util/about.html b/plugins/org.eclipse.jem.util/about.html
deleted file mode 100644
index afceed0cc..000000000
--- a/plugins/org.eclipse.jem.util/about.html
+++ /dev/null
@@ -1,25 +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">
-<h2>About This Content</h2>
-
-<p>May 2, 2006</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/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</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>
-
-</body></html> \ No newline at end of file
diff --git a/plugins/org.eclipse.jem.util/build.properties b/plugins/org.eclipse.jem.util/build.properties
deleted file mode 100644
index b40afd04e..000000000
--- a/plugins/org.eclipse.jem.util/build.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.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,\
- about.html,\
- plugin.properties,\
- META-INF/,\
- .
-src.includes = schema/,\
- about.html
-output.. = bin/
-source.. = jemutil/,\
- property_files/,\
- jemutil-nonworkbnech/
-jars.compile.order = .
diff --git a/plugins/org.eclipse.jem.util/jemutil-nonworkbnech/org/eclipse/jem/util/logger/LogEntry.java b/plugins/org.eclipse.jem.util/jemutil-nonworkbnech/org/eclipse/jem/util/logger/LogEntry.java
deleted file mode 100644
index d44372b1f..000000000
--- a/plugins/org.eclipse.jem.util/jemutil-nonworkbnech/org/eclipse/jem/util/logger/LogEntry.java
+++ /dev/null
@@ -1,329 +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
- *******************************************************************************/
-/*
- * $RCSfile: LogEntry.java,v $
- * $Revision: 1.5 $ $Date: 2006/05/17 20:13:45 $
- */
-package org.eclipse.jem.util.logger;
-
-import java.io.ByteArrayOutputStream;
-import java.io.PrintWriter;
-
-/**
- * This class should be used when logging information which should be grouped together. Instead of creating a new instance of this class every time it
- * is needed, for performance reasons, create an instance and reuse it.
- * <p>
- * Currently the only fields that are logged are the {@link #getText()} and {@link #getTargetException()}.
- *
- * @since 1.0.0
- */
-public class LogEntry {
-
- private int _executionMap = 0;
-
- private Throwable _caughtException = null;
-
- private String _propertiesFileName = null;
-
- private String localeOfOrigin = null;
-
- private String sourceIdentifier;
-
- private String elapsedTime;
-
- private String text;
-
- private String messageTypeIdentifier;
-
- /**
- * The file name parameter must be a name which can be used by ResourceBundle to load the string from the .properties file. The parameter must not
- * be null or the empty string.
- *
- * @param propertiesFileName
- *
- * @since 1.0.0
- */
- public LogEntry(String propertiesFileName) {
- setPropertiesFileName(propertiesFileName);
- }
-
- /**
- * Default Constructor
- */
- public LogEntry() {
- }
-
- /**
- * Get execution map
- *
- * @return execution map
- *
- * @since 1.0.0
- */
- public int getExecutionMap() {
- return _executionMap;
- }
-
- /**
- * Get the properties file name
- *
- * @return properties file name or <code>null</code> if not set.
- *
- * @since 1.0.0
- */
- public String getPropertiesFileName() {
- return _propertiesFileName;
- }
-
- /**
- * Get target exception
- *
- * @return target exception or <code>null</code> if not set.
- *
- * @since 1.0.0
- */
- public Throwable getTargetException() {
- return _caughtException;
- }
-
- /**
- * Get locale of origin
- *
- * @return locale of origin or <code>null</code> if not set.
- *
- * @since 1.0.0
- */
- public String getLocaleOfOrigin() {
- return localeOfOrigin;
- }
-
- /**
- * Get source identifier.
- *
- * @return source identifier or <code>null</code> if not set.
- *
- * @since 1.0.0
- */
- public String getSourceidentifier() {
- return sourceIdentifier;
- }
-
- /**
- * Get elapsed time
- *
- * @return elapsed time
- *
- * @since 1.0.0
- */
- public String getElapsedTime() {
- return elapsedTime;
- }
-
- /**
- * Get the message type identifier
- *
- * @return message type identifier or <code>null</code> if not set.
- *
- * @since 1.0.0
- */
- public String getMessageTypeIdentifier() {
- return messageTypeIdentifier;
- }
-
- /**
- * Set execution map
- *
- * @param map
- *
- * @since 1.0.0
- */
- public void setExecutionMap(int map) {
- _executionMap = map;
- }
-
- /**
- * Set properties file name
- *
- * @param fName
- *
- * @since 1.0.0
- */
- public void setPropertiesFileName(String fName) {
- _propertiesFileName = fName;
- }
-
- /**
- * Set target exception
- *
- * @param exc
- *
- * @since 1.0.0
- */
- public void setTargetException(Throwable exc) {
- _caughtException = exc;
- }
-
- /**
- * Append stacktrace of current stack (at the time of call to this method) to the text buffer.
- *
- *
- * @since 1.0.0
- */
- public void appendStackTrace() {
- // Grab the stack trace from the Thread ...
- ByteArrayOutputStream byteOutput = new ByteArrayOutputStream();
- PrintWriter printWriter = new PrintWriter(byteOutput);
- // Can't call Thread.dumpStack() because it doesn't take a writer as input.
- // Copy its mechanism instead.
- new Exception("Stack trace").printStackTrace(printWriter); //$NON-NLS-1$
- printWriter.flush();
-
- // and update the text to the LogEntry's text.
- StringBuffer buffer = new StringBuffer();
- buffer.append(getText());
- buffer.append("\n"); //$NON-NLS-1$
- buffer.append(byteOutput.toString());
- setText(buffer.toString());
- }
-
- /**
- * Get the text.
- *
- * @return text or or <code>null</code> if not set.
- *
- * @since 1.0.0
- */
- public String getText() {
- return text;
- }
-
- /**
- * Set the text
- *
- * @param string
- *
- * @since 1.0.0
- */
- public void setText(String string) {
- text = string;
- }
-
- /**
- * Set every entry to the default value except the properties file name.
- *
- *
- * @since 1.0.0
- */
- public void reset() {
- setExecutionMap(0);
- setTargetException(null);
- localeOfOrigin = null;
- sourceIdentifier = null;
- elapsedTime = null;
- setText(null);
- }
-
- /**
- * Set locale of origin.
- *
- * @param origin
- *
- * @since 1.0.0
- */
- public void setLocaleOfOrigin(String origin) {
- localeOfOrigin = origin;
- }
-
- /**
- * Set source id.
- *
- * @param id
- *
- * @since 1.0.0
- */
- public void setSourceID(String id) {
- sourceIdentifier = id;
- }
-
- /**
- * Set elapsed time.
- *
- * @param time
- *
- * @since 1.0.0
- */
- public void setElapsedTime(long time) {
- elapsedTime = String.valueOf(time);
- }
-
- /**
- * Set source identifier.
- *
- * @param string
- *
- * @since 1.0.0
- */
- public void setSourceIdentifier(String string) {
- setSourceID(string);
- }
-
- /**
- * Set message type identifier.
- *
- * @param string
- *
- * @since 1.0.0
- * @deprecated Use {@link #setText(String)} instead and calling it with the result of {@link java.text.MessageFormat#format(java.lang.String, java.lang.Object[])}
- */
- public void setMessageTypeIdentifier(String string) {
- messageTypeIdentifier = string;
- }
-
- /**
- * Set message type id. Same as <code>setMessageTypeIdentifier.</code>
- * @param string
- *
- * @since 1.0.0
- * @deprecated Use {@link #setText(String)} instead and calling it with the result of {@link java.text.MessageFormat#format(java.lang.String, java.lang.Object[])}
- */
- public void setMessageTypeID(String string) {
- setMessageTypeIdentifier(string);
- }
-
- /**
- * Set tokens. (Currently this is ignored).
- *
- * @param strings
- *
- * @since 1.0.0
- * @deprecated Use {@link #setText(String)} instead and calling it with the result of {@link java.text.MessageFormat#format(java.lang.String, java.lang.Object[])}
- */
- public void setTokens(String[] strings) {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#toString()
- */
- public String toString() {
- ByteArrayOutputStream byteOutput = new ByteArrayOutputStream();
- PrintWriter printWriter = new PrintWriter(byteOutput);
- if (text != null)
- printWriter.println(text);
- if (_caughtException != null) {
- _caughtException.printStackTrace(printWriter);
- }
- printWriter.flush();
- return byteOutput.toString();
- }
-
-}
diff --git a/plugins/org.eclipse.jem.util/jemutil-nonworkbnech/org/eclipse/jem/util/logger/proxy/ILogRenderer.java b/plugins/org.eclipse.jem.util/jemutil-nonworkbnech/org/eclipse/jem/util/logger/proxy/ILogRenderer.java
deleted file mode 100644
index 3ba7c4d14..000000000
--- a/plugins/org.eclipse.jem.util/jemutil-nonworkbnech/org/eclipse/jem/util/logger/proxy/ILogRenderer.java
+++ /dev/null
@@ -1,72 +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
- *******************************************************************************/
-/*
- * $RCSfile: ILogRenderer.java,v $
- * $Revision: 1.2 $ $Date: 2005/02/15 23:05:54 $
- */
-package org.eclipse.jem.util.logger.proxy;
-
-/**
- * Basic log renderer interface. It is replaced by the extension <code>ILogRenderer2.</code>
- *
- * @since 1.0.0
- */
-public interface ILogRenderer {
-
- /**
- * Logged to console.
- */
- final public static String CONSOLE_DESCRIPTION = "console"; //$NON-NLS-1$
-
- /**
- * Logged to workbench.
- */
- final public static String WORKBENCH_DESCRIPTION = "workbench log"; //$NON-NLS-1$
-
- /**
- * Not logged.
- */
- final public static String NOLOG_DESCRIPTION = ""; //$NON-NLS-1$
-
- /**
- * Log levels. These are deprecated, use <code>java.util.logging.Level</code> codes instead.
- */
- final public static int LOG_ERROR = 0;
-
- final public static int LOG_TRACE = 1;
-
- final public static int LOG_WARNING = 2;
-
- final public static int LOG_INFO = 3;
-
- final public static String DefaultPluginID = "org.eclipse.jem.util"; //$NON-NLS-1$
-
- /**
- * Log the string at the specified type.
- *
- * @param msg
- * @param type
- * @return how it was logged. See <code>CONSOLE_DESCRIPTION.</code>
- *
- * @since 1.0.0
- */
- public String log(String msg, int type);
-
- /**
- * Start or stop the tracing.
- *
- * @param Flag
- * <code>true</code> to start the tracing.
- *
- * @since 1.0.0
- */
- public void setTraceMode(boolean Flag);
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jem.util/jemutil-nonworkbnech/org/eclipse/jem/util/logger/proxy/ILogRenderer2.java b/plugins/org.eclipse.jem.util/jemutil-nonworkbnech/org/eclipse/jem/util/logger/proxy/ILogRenderer2.java
deleted file mode 100644
index 69ee1441d..000000000
--- a/plugins/org.eclipse.jem.util/jemutil-nonworkbnech/org/eclipse/jem/util/logger/proxy/ILogRenderer2.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
- *******************************************************************************/
-/*
- * $RCSfile: ILogRenderer2.java,v $
- * $Revision: 1.4 $ $Date: 2005/08/24 21:10:34 $
- */
-package org.eclipse.jem.util.logger.proxy;
-
-import java.util.logging.Level;
-
-/**
- * Log renderer that provides more function. Basically it can handle
- * the logging of specific types in a different manner than the default
- * conversion to string supplied by Logger.
- *
- * It also uses the Level classes from java.util.logging as the logging levels.
- *
- * @since 1.0.0
- */
-public interface ILogRenderer2 extends ILogRenderer {
-
- /**
- * When Logger.setLevel(DEFAULT): restore to what the default level was.
- * When log(...,DEFAULT): Log at the default level for the type of object.
- */
- static final Level DEFAULT = new Logger.LocalLevel("DEFAULT", Integer.MAX_VALUE-1); //$NON-NLS-1$
-
- /**
- * When log(...,TRACE) : Log only when in trace mode.
- * Don't use in Logger.setLevel(). Has no meaning in that case.
- */
- static final Level TRACE = new Logger.LocalLevel("TRACE", Integer.MAX_VALUE-2); //$NON-NLS-1$
-
- /**
- * Log the throwable at the given level (if DEFAULT, use default level for a throwable).
- *
- * @param t
- * @param level
- * @return
- *
- * @since 1.0.0
- */
- String log(Throwable t, Level level);
-
- /**
- * Log the object at the given level (if DEFAULT, use default level for an object).
- *
- * @param o
- * @param level
- * @return
- *
- * @since 1.0.0
- */
- String log(Object o, Level level);
-
- /**
- * Log the boolean at the given level (if DEFAULT, use default level for a boolean).
- *
- * @param b
- * @param level
- * @return
- *
- * @since 1.0.0
- */
- String log(boolean b, Level level);
-
- /**
- * Log the char at the given level (if DEFAULT, use default level for a char).
- *
- * @param c
- * @param level
- * @return
- *
- * @since 1.0.0
- */
- String log(char c, Level level);
-
- /**
- * Log the byte at the given level (if DEFAULT, use default level for a byte).
- *
- * @param b
- * @param level
- * @return
- *
- * @since 1.0.0
- */
- String log(byte b, Level level);
-
- /**
- * Log the short at the given level (if DEFAULT, use default level for a short).
- *
- * @param s
- * @param level
- * @return
- *
- * @since 1.0.0
- */
- String log(short s, Level level);
-
- /**
- * Log the int at the given level (if DEFAULT, use default level for an int).
- *
- * @param i
- * @param level
- * @return
- *
- * @since 1.0.0
- */
- String log(int i, Level level);
-
- /**
- * Log the long at the given level (if DEFAULT, use default level for a long).
- *
- * @param l
- * @param level
- * @return
- *
- * @since 1.0.0
- */
- String log(long l, Level level);
-
- /**
- * Log the float at the given level (if DEFAULT, use default level for a float).
- *
- * @param f
- * @param level
- * @return
- *
- * @since 1.0.0
- */
- String log(float f, Level level);
-
- /**
- * Log the double at the given level (if DEFAULT, use default level for a double).
- *
- * @param d
- * @param level
- * @return
- *
- * @since 1.0.0
- */
- String log(double d, Level level);
-}
diff --git a/plugins/org.eclipse.jem.util/jemutil-nonworkbnech/org/eclipse/jem/util/logger/proxy/JDKConsoleRenderer.java b/plugins/org.eclipse.jem.util/jemutil-nonworkbnech/org/eclipse/jem/util/logger/proxy/JDKConsoleRenderer.java
deleted file mode 100644
index 6f0f828b1..000000000
--- a/plugins/org.eclipse.jem.util/jemutil-nonworkbnech/org/eclipse/jem/util/logger/proxy/JDKConsoleRenderer.java
+++ /dev/null
@@ -1,247 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * $RCSfile: JDKConsoleRenderer.java,v $
- * $Revision: 1.3 $ $Date: 2005/08/24 21:10:34 $
- */
-package org.eclipse.jem.util.logger.proxy;
-
-import java.util.logging.Level;
-
-/**
- * Default log renderer to use when not running under Eclipse. It logs to sysout and syserr.
- *
- * @since 1.1.0
- */
-
-public class JDKConsoleRenderer implements ILogRenderer2 {
-
- private boolean fTraceMode = false; // will we actually punch trace messaged or not
-
- private boolean fSettingTrace = false;
-
- private Logger fMyLogger = null;
-
- /**
- * Constructer taking a logger.
- *
- * @param logger
- *
- * @since 1.1.0
- */
- public JDKConsoleRenderer(Logger logger) {
- super();
- fMyLogger = logger;
- fTraceMode = fMyLogger.getTraceMode();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.logger.proxy.ILogRenderer#log(java.lang.String, int)
- */
- public String log(String msg, int type) {
-
- if (type == ILogRenderer.LOG_TRACE && !fTraceMode)
- return null;
-
- if (type == ILogRenderer.LOG_ERROR)
- System.err.println(msg);
- else
- System.out.println(msg);
- return ILogRenderer.CONSOLE_DESCRIPTION;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.logger.proxy.ILogRenderer#setTraceMode(boolean)
- */
- public void setTraceMode(boolean flag) {
-
- if (fSettingTrace)
- return;
- fSettingTrace = true;
- fTraceMode = flag;
- fMyLogger.setTraceMode(flag);
- fSettingTrace = false;
- }
-
- /**
- * Log the string at the given level.
- *
- * @param msg
- * @param level
- * @return <code>CONSOLE_DESCRIPTION</code>
- *
- * @since 1.1.0
- */
- protected String log(String msg, Level level) {
- if (level == Level.SEVERE)
- System.err.println(msg);
- else
- System.out.println(msg);
- return ILogRenderer.CONSOLE_DESCRIPTION;
- }
-
- /**
- * Answer if logging at the given level
- *
- * @param logLevel
- * @return <code>true</code> if logging at the given level.
- *
- * @since 1.1.0
- */
- protected boolean isLogging(Level logLevel) {
- return fTraceMode || fMyLogger.isLoggingLevel(logLevel);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.logger.proxy.ILogRenderer2#log(boolean, java.util.logging.Level)
- */
- public String log(boolean b, Level level) {
- if (level == DEFAULT)
- level = Level.FINEST;
- if (isLogging(level))
- return log(fMyLogger.getGenericMsg(String.valueOf(b), level), level);
- else
- return NOLOG_DESCRIPTION;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.logger.proxy.ILogRenderer2#log(byte, java.util.logging.Level)
- */
- public String log(byte b, Level level) {
- if (level == DEFAULT)
- level = Level.FINEST;
- if (isLogging(level))
- return log(fMyLogger.getGenericMsg(String.valueOf(b), level), level);
- else
- return NOLOG_DESCRIPTION;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.logger.proxy.ILogRenderer2#log(char, java.util.logging.Level)
- */
- public String log(char c, Level level) {
- if (level == DEFAULT)
- level = Level.FINEST;
- if (isLogging(level))
- return log(fMyLogger.getGenericMsg(String.valueOf(c), level), level);
- else
- return NOLOG_DESCRIPTION;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.logger.proxy.ILogRenderer2#log(double, java.util.logging.Level)
- */
- public String log(double d, Level level) {
- if (level == DEFAULT)
- level = Level.FINEST;
- if (isLogging(level))
- return log(fMyLogger.getGenericMsg(String.valueOf(d), level), level);
- else
- return NOLOG_DESCRIPTION;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.logger.proxy.ILogRenderer2#log(float, java.util.logging.Level)
- */
- public String log(float f, Level level) {
- if (level == DEFAULT)
- level = Level.FINEST;
- if (isLogging(level))
- return log(fMyLogger.getGenericMsg(String.valueOf(f), level), level);
- else
- return NOLOG_DESCRIPTION;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.logger.proxy.ILogRenderer2#log(int, java.util.logging.Level)
- */
- public String log(int i, Level level) {
- if (level == DEFAULT)
- level = Level.FINEST;
- if (isLogging(level))
- return log(fMyLogger.getGenericMsg(String.valueOf(i), level), level);
- else
- return NOLOG_DESCRIPTION;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.logger.proxy.ILogRenderer2#log(long, java.util.logging.Level)
- */
- public String log(long l, Level level) {
- if (level == DEFAULT)
- level = Level.FINEST;
- if (isLogging(level))
- return log(fMyLogger.getGenericMsg(String.valueOf(l), level), level);
- else
- return NOLOG_DESCRIPTION;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.logger.proxy.ILogRenderer2#log(java.lang.Object, java.util.logging.Level)
- */
- public String log(Object o, Level level) {
- if (level == DEFAULT)
- level = Level.FINEST;
- if (isLogging(level))
- return log(fMyLogger.getGenericMsg(String.valueOf(o), level), level);
- else
- return NOLOG_DESCRIPTION;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.logger.proxy.ILogRenderer2#log(short, java.util.logging.Level)
- */
- public String log(short s, Level level) {
- if (level == DEFAULT)
- level = Level.FINEST;
- if (isLogging(level))
- return log(fMyLogger.getGenericMsg(String.valueOf(s), level), level);
- else
- return NOLOG_DESCRIPTION;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.logger.proxy.ILogRenderer2#log(java.lang.Throwable, java.util.logging.Level)
- */
- public String log(Throwable t, Level level) {
- if (level == DEFAULT)
- level = Level.SEVERE;
- if (isLogging(level))
- return log(fMyLogger.getGenericMsg(fMyLogger.exceptionToString(t), level), level);
- else
- return NOLOG_DESCRIPTION;
- }
-
-}
diff --git a/plugins/org.eclipse.jem.util/jemutil-nonworkbnech/org/eclipse/jem/util/logger/proxy/Logger.java b/plugins/org.eclipse.jem.util/jemutil-nonworkbnech/org/eclipse/jem/util/logger/proxy/Logger.java
deleted file mode 100644
index 24e891aeb..000000000
--- a/plugins/org.eclipse.jem.util/jemutil-nonworkbnech/org/eclipse/jem/util/logger/proxy/Logger.java
+++ /dev/null
@@ -1,843 +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
- *******************************************************************************/
-/*
- * $RCSfile: Logger.java,v $
- * $Revision: 1.8 $ $Date: 2006/05/17 20:13:45 $
- */
-package org.eclipse.jem.util.logger.proxy;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.*;
-import java.util.logging.Level;
-
-/**
- * This is a base, UI independent logger. It will
- * construct a consistent msg. body, and call an enfironment specific ILogRenderer.
- * By default, this logger will use a console based ILogRenderer,
- * and a J2EE Plugin identification.
- *
- * <p>
- * When running outside of Eclipse, the trace and logging level come from the system properties
- * <ul>
- * <li>"debug" (="true") - The default is <code>false</code>.
- * <li>"logLevel" (="level" where "level" is a level string, e.g. SEVERE, WARNING, etc. from the <code>java.util.logging.Level</code> class).
- * The default is "WARNING".
- * </ul>
- *
- *
- * @since 1.0.0
- */
-public class Logger {
-
- // This is used by ILogRenderer2 to define the default level.
- static class LocalLevel extends Level {
- /**
- * Comment for <code>serialVersionUID</code>
- *
- * @since 1.1.0
- */
- private static final long serialVersionUID = -6273357074767854883L;
-
- public LocalLevel(String name, int level) {
- super(name, level);
- }
- }
-
- private boolean fTraceMode = false; // will we actually punch trace messaged or not
- private String fPluginID;
- private ILogRenderer fRenderer = null;
- private ILogRenderer2 renderer2 = null;
- public String fLineSeperator;
- private Level level;
- private Level defaultLevel = Level.SEVERE; // By default only severe or greater are logged.
- private String logFileName;
- private final static String DefaultLoggerPlugin = ILogRenderer.DefaultPluginID;
- static private Hashtable Loggers = new Hashtable(); // Keep track of all the Loggers
- final protected static String[] LogMark = { "*** ERROR *** ", //$NON-NLS-1$
- "[Trace] ", //$NON-NLS-1$
- "+++ Warning +++ ", //$NON-NLS-1$
- "Info " }; //$NON-NLS-1$
-
- final protected static String Filler = " "; // Use this to indent msg. body //$NON-NLS-1$
-
- protected Logger() {
- this(ILogRenderer.DefaultPluginID);
- }
-
- protected Logger(String pluginID) {
- fPluginID = pluginID;
- setRenderer(new JDKConsoleRenderer(this)); // Set up default to this. Someone can change it later.
- }
-
- /**
- * Return the stacktrace as a print formatted string.
- * @param e
- * @return the stacktrace as a string.
- *
- * @since 1.0.0
- */
- public String exceptionToString(Throwable e) {
- StringWriter stringWriter = new StringWriter();
- e.printStackTrace(new PrintWriter(stringWriter));
- return stringWriter.toString();
- }
-
- /**
- * Get the system default logger. This is used for clients that don't know if they
- * are running in Eclipse or outside of it. This way they have a common logger format
- * which switch correctly.
- * @return default logger.
- *
- * @since 1.0.0
- */
- static public Logger getLogger() {
- Logger defaultLogger = (Logger) Loggers.get(DefaultLoggerPlugin);
- if (defaultLogger == null) {
- defaultLogger = new Logger();
- defaultLogger.init();
- Loggers.put(DefaultLoggerPlugin, defaultLogger);
- }
- return defaultLogger;
- }
-
- /**
- * Get the logger for a specific plugin.
- * @param pluginId
- * @return logger for a specific pluggin.
- *
- * @since 1.0.0
- */
- static public Logger getLogger(String pluginId) {
- if (pluginId == null)
- return Logger.getLogger();
- Logger Logger = (Logger) Loggers.get(pluginId);
- if (Logger == null) {
- Logger = new Logger(pluginId);
- Logger.init();
- Loggers.put(pluginId, Logger);
- }
- return Logger;
- }
-
- /**
- * Used by subclass to get a logger if it exists, but not create one.
- * @param pluginId
- * @return logger.
- *
- * @since 1.0.0
- */
- static protected Logger getLoggerIfExists(String pluginId) {
- if (pluginId == null)
- return Logger.getLogger();
- else
- return (Logger) Loggers.get(pluginId);
- }
-
- /**
- * Get the plugin id for this logger.
- * @return pluginid
- *
- * @since 1.0.0
- */
- public String getPluginID() {
- return fPluginID;
- }
-
- /**
- * Get the trace mode for this logger
- * @return <code>true</code> if tracing is going on.
- *
- * @since 1.0.0
- */
- public boolean getTraceMode() {
- return fTraceMode;
- }
-
- /*
- * Indent the Msg. Body to make it easier to read the log
- */
- private void indentMsg(String msg, StringBuffer logMsg) {
- // Line seperator is different on different platform, unix = \n, windows \r\n and mac \r
- String sep = fLineSeperator;
- if (msg.indexOf("\r\n") != -1) //$NON-NLS-1$
- sep = "\r\n"; //$NON-NLS-1$
- else if (msg.indexOf("\n") != -1) //$NON-NLS-1$
- sep = "\n"; //$NON-NLS-1$
- else if (msg.indexOf("\r") != -1) //$NON-NLS-1$
- sep = "\r"; //$NON-NLS-1$
- StringTokenizer tokenizer = new StringTokenizer(msg, sep);
- boolean first = true;
- while (tokenizer.hasMoreTokens()) {
- if (first) {
- first = false;
- logMsg.append(Filler + tokenizer.nextToken());
- } else
- logMsg.append(fLineSeperator + Filler + tokenizer.nextToken());
- }
- }
- /*
- * If Eclipse is started with the -XDebug or -debug turn traces on for this Logger
- * Creation date: (8/23/2001 7:37:04 PM)
- */
- private void init() {
- if (System.getProperty("debug") != null) //$NON-NLS-1$
- fTraceMode = true;
- level = defaultLevel = Level.parse(System.getProperty("logLevel", Level.WARNING.getName())); //$NON-NLS-1$
-
- try {
- fLineSeperator = System.getProperty("line.separator"); // Diff on Win/Unix/Mac //$NON-NLS-1$
- } catch (Throwable e) {
- fLineSeperator = "\n"; //$NON-NLS-1$
- }
- }
- /*
- * Generic log.
- * Creation date: (8/24/2001 1:55:34 PM)
- * @return java.lang.String
- * @param msg java.lang.String
- * @param type int
- */
- private String logAny(String msg, int type) {
- StringBuffer logMsg = new StringBuffer();
- logMsg.append(fLineSeperator);
- logMsg.append(LogMark[type]);
- return punchLog(logRest(msg, logMsg), type);
- }
-
- /**
- * This is to be used by renderers that want to put a msg out
- * in a generic format. This just returns the string that
- * should be logged. It puts things like headers on it.
- *
- * @param msg
- * @param aLevel
- * @return The generic message for the string and level.
- *
- * @since 1.0.0
- */
- public String getGenericMsg(String msg, Level aLevel) {
- StringBuffer genMsg = new StringBuffer(msg.length()+16);
- genMsg.append(fLineSeperator);
- genMsg.append(getLevelHeader(aLevel));
- genMsg.append(": "); //$NON-NLS-1$
- genMsg.append(new Date());
- indentMsg(msg, genMsg);
- return genMsg.toString();
- }
-
- private static final Level[] LEVEL_SEARCH = new Level[] {
- Level.SEVERE,
- Level.WARNING,
- Level.INFO,
- ILogRenderer2.TRACE
- };
-
- private static final String[] LEVEL_MARK = new String[] {
- "*** ERROR ***", //$NON-NLS-1$
- "+++ Warning +++", //$NON-NLS-1$
- "Info", //$NON-NLS-1$
- "[Trace]" //$NON-NLS-1$
- };
-
- private String getLevelHeader(Level aLevel) {
- for (int i=0; i<LEVEL_SEARCH.length; i++)
- if (LEVEL_SEARCH[i] == aLevel)
- return LEVEL_MARK[i];
- return aLevel.getName(); // Not found, just use level string.
- }
-
- // The write's are here for history. Will implement using log(obj, Level) for all of the types.
-
-
- /**
- * deprecated use log(Level, Exception)
- * @param aLevel
- * @param ex
- * @return
- *
- * @since 1.0.0
- *
- */
- public String write(Level aLevel, Exception ex) {
- return log(aLevel, ex);
- }
-
- /**
- * deprecated use log(Throwable)
- * @param ex
- * @return
- *
- * @since 1.0.0
- *
- */
- public String write(Throwable ex) {
- return log(ex);
- }
-
- /**
- * deprecated use log(Object, Level)
- * @param aLevel
- * @param logEntry
- * @return
- *
- * @since 1.0.0
- */
- public String write(Level aLevel, Object logEntry) {
- return log(logEntry, aLevel);
- }
-
- /**
- * deprecated use log(String, Level)
- * @param aLevel
- * @param string
- * @return
- *
- * @since 1.0.0
- */
- public String write(Level aLevel, String string) {
- return log(string, aLevel);
- }
- /**
- * deprecated use log(Throwable, Level)
- * @param aLevel
- * @param ex
- * @return
- *
- * @since 1.0.0
- */
- public String write(Level aLevel, Throwable ex) {
- return log(ex, aLevel);
- }
- /**
- * deprecated use log(Throwable, Level)
- * @param aLevel
- * @param ex
- * @return
- *
- * @since 1.0.0
- */
- public String log(Level aLevel, Exception ex) {
- return log(ex, aLevel);
- }
- /**
- * deprecated use log(Throwable, Level)
- * @param aLevel
- * @param ex
- * @return
- *
- * @since 1.0.0
- */
- public String log(Level aLevel, Throwable ex) {
- return log(ex, aLevel);
- }
-
- /**
- * Get the logging level
- * @return logging level
- *
- * @since 1.0.0
- */
- public Level getLevel() {
- return level;
- }
-
- /**
- * Check if the requested level is being logged. (e.g. if current level is SEVERE, then FINE will not be logged).
- * @param requestlevel
- * @return <code>true</code> if the level will be logged.
- *
- * @since 1.0.0
- */
- public boolean isLoggingLevel(Level requestlevel) {
- if (requestlevel == ILogRenderer2.TRACE && !getTraceMode())
- return false; // We aren't tracing but requested trace.
-
- return !(requestlevel.intValue() < getLevel().intValue() || getLevel() == Level.OFF);
- }
-
- /**
- * Log an error string.
- * @param msg
- * @return how it was logged. See <code>CONSOLE_DESCRIPTION.</code>
- *
- * @since 1.0.0
- */
- public String logError(String msg) {
- return log(msg, Level.SEVERE);
- }
-
- /**
- * Log an error throwable
- * @param e
- * @return how it was logged. See <code>CONSOLE_DESCRIPTION.</code>
- *
- * @since 1.0.0
- */
- public String logError(Throwable e) {
- return log(e, Level.SEVERE);
- }
-
- /**
- * Log an info message.
- * @param msg
- * @return how it was logged. See <code>CONSOLE_DESCRIPTION.</code>
- *
- * @since 1.0.0
- */
- public String logInfo(String msg) {
- return log(msg, Level.INFO);
- }
-
-/**
- * Log a throwable as a warning.
- * @param e
- * @return how it was logged. See <code>CONSOLE_DESCRIPTION.</code>
- *
- * @since 1.0.0
- */
- public String logInfo(Throwable e) {
- return log(e, Level.INFO);
- }
-
- /**
- * Append the string to logMsg buffer passed in. Append the date and format the
- * string with nice indentation.
- *
- * @param msg
- * @param logMsg
- * @return the string from the logMsg after logging the rest.
- *
- * @since 1.0.0
- */
- protected String logRest(String msg, StringBuffer logMsg) {
- logMsg.append(new Date());
- indentMsg(msg, logMsg);
- return logMsg.toString();
- }
-
- /**
- * Log the msg as trace only.
- * @param msg
- * @return how it was logged. See <code>CONSOLE_DESCRIPTION.</code>
- *
- * @since 1.0.0
- */
- public String logTrace(String msg) {
- if (fTraceMode)
- return log(msg, ILogRenderer2.TRACE);
- else
- return ILogRenderer.NOLOG_DESCRIPTION;
- }
-
- /**
- * Log the throwable as trace only.
- * @param e
- * @return how it was logged. See <code>CONSOLE_DESCRIPTION.</code>
- *
- * @since 1.0.0
- */
- public String logTrace(Throwable e) {
- return log(e, ILogRenderer2.TRACE);
- }
-
- /**
- * Log the message as warning.
- * @param msg
- * @return how it was logged. See <code>CONSOLE_DESCRIPTION.</code>
- *
- * @since 1.0.0
- */
- public String logWarning(String msg) {
- return log(msg, Level.WARNING);
- }
- /**
- * Log the throwable as a warning.
- * @param e
- * @return how it was logged. See <code>CONSOLE_DESCRIPTION.</code>
- *
- * @since 1.0.0
- */
- public String logWarning(Throwable e) {
- return log(e, Level.WARNING);
- }
-
- /**
- * Ask the Renderer to punch the msg. in the log.. one
- * caller at the time
- * Creation date: (8/24/2001 9:19:17 AM)
- * @return java.lang.String
- * @param msg java.lang.String
- * @param type int
- */
- protected synchronized String punchLog(String msg, int type) {
- return fRenderer.log(msg, type);
- }
-
- /**
- * Set the renderer to use.
- * @param renderer
- *
- * @since 1.0.0
- */
- public void setRenderer(ILogRenderer renderer) {
- fRenderer = renderer;
- renderer2 = (renderer instanceof ILogRenderer2) ? (ILogRenderer2) renderer : null;
- renderer.setTraceMode(getTraceMode());
- }
-
- /**
- * Set the trace mode.
- * @param flag <code>true</code> to turn on tracing.
- *
- * @since 1.0.0
- */
- public void setTraceMode(boolean flag) {
- fTraceMode = flag;
- if (fRenderer != null)
- fRenderer.setTraceMode(flag);
- }
-
- /**
- * Set the level cutoff for logging. Anything below this level will not log.
- * Do not set level to <code>ILogRenderer2.TRACE</code>. It doesn't make sense.
- *
- * @param level (Use <code>ILogRenderer2.DEFAULT</code> to restore to default for this logger.
- *
- * @since 1.0.0
- */
- public void setLevel(Level level) {
- this.level = level != ILogRenderer2.DEFAULT ? level : defaultLevel;
- }
-
- /**
- * Set the default level for this logger. It won't touch the current level.
- *
- * @param level
- *
- * @since 1.0.0
- */
- public void setDefaultLevel(Level level) {
- this.defaultLevel = level;
- }
-
- /**
- * Get the log file name.
- * @return Returns the logFileName.
- */
- public String getLogFileName() {
- return logFileName;
- }
-
- /**
- * Set the log file name.
- * @param logFileName The logFileName to set.
- */
- public void setLogFileName(String logFileName) {
- this.logFileName = logFileName;
- }
-
- // Now all of the log() types that use a Level.
-
- /**
- * Log the throwable at the default level for a throwable.
- * @param e
- * @return how it was logged. See <code>CONSOLE_DESCRIPTION.</code>
- *
- * @since 1.0.0
- */
- public String log(Throwable e) {
- return log(e, ILogRenderer2.DEFAULT);
- }
-
- /**
- * Log the throwable at the given level.
- * @param e
- * @param logLevel
- * @return how it was logged. See <code>CONSOLE_DESCRIPTION.</code>
- *
- * @since 1.0.0
- */
- public String log(Throwable e, Level logLevel) {
- if (renderer2 != null) {
- return renderer2.log(e, logLevel);
- } else {
- // Do it the old way.
- String stackTrace = exceptionToString(e);
- return logAny(stackTrace, getOldType(logLevel != ILogRenderer2.DEFAULT ? level : Level.SEVERE));
- }
- }
-
- public String log(Object o) {
- return log(o, ILogRenderer2.DEFAULT);
- }
-
- /**
- * Log the object at the given level.
- * @param o
- * @param logLevel
- * @return how it was logged. See <code>CONSOLE_DESCRIPTION.</code>
- *
- * @since 1.0.0
- */
- public String log(Object o, Level logLevel) {
- if (renderer2 != null) {
- return renderer2.log(o, logLevel);
- } else {
- // Do it the old way.
- return logAny(String.valueOf(o), getOldType(logLevel != ILogRenderer2.DEFAULT ? level : Level.FINEST));
- }
- }
-
- // The following are added to match up with Hyades so that primitives can be logged too.
-
- /**
- * Log a boolean at the default level.
- * @param b
- * @return how it was logged. See <code>CONSOLE_DESCRIPTION.</code>
- *
- * @since 1.0.0
- */
- public String log(boolean b) {
- return log(b, ILogRenderer2.DEFAULT);
- }
-
- /**
- * Log a boolean at the given level.
- * @param b
- * @param logLevel
- * @return how it was logged. See <code>CONSOLE_DESCRIPTION.</code>
- *
- * @since 1.0.0
- */
- public String log(boolean b, Level logLevel) {
- if (renderer2 != null) {
- return renderer2.log(b, logLevel);
- } else {
- // Do it the old way.
- return logAny(String.valueOf(b), getOldType(logLevel != ILogRenderer2.DEFAULT ? level : Level.FINEST));
- }
- }
-
- /**
- * Log the character at the default level.
- * @param c
- * @return how it was logged. See <code>CONSOLE_DESCRIPTION.</code>
- *
- * @since 1.0.0
- */
- public String log(char c) {
- return log(c, ILogRenderer2.DEFAULT);
- }
-
- /**
- * Log the character at the given level.
- * @param c
- * @param logLevel
- * @return how it was logged. See <code>CONSOLE_DESCRIPTION.</code>
- *
- * @since 1.0.0
- */
- public String log(char c, Level logLevel) {
- if (renderer2 != null) {
- return renderer2.log(c, logLevel);
- } else {
- // Do it the old way.
- return logAny(String.valueOf(c), getOldType(logLevel != ILogRenderer2.DEFAULT ? level : Level.FINEST));
- }
- }
-
- /**
- * Log the byte at the default level.
- * @param b
- * @return how it was logged. See <code>CONSOLE_DESCRIPTION.</code>
- *
- * @since 1.0.0
- */
- public String log(byte b) {
- return log(b, ILogRenderer2.DEFAULT);
- }
-
- /**
- * Log the byte at the given level.
- * @param b
- * @param logLevel
- * @return how it was logged. See <code>CONSOLE_DESCRIPTION.</code>
- *
- * @since 1.0.0
- */
- public String log(byte b, Level logLevel) {
- if (renderer2 != null) {
- return renderer2.log(b, logLevel);
- } else {
- // Do it the old way.
- return logAny(String.valueOf(b), getOldType(logLevel != ILogRenderer2.DEFAULT ? level : Level.FINEST));
- }
- }
-
- /**
- * Log the short at the default level.
- * @param s
- * @return how it was logged. See <code>CONSOLE_DESCRIPTION.</code>
- *
- * @since 1.0.0
- */
- public String log(short s) {
- return log(s, ILogRenderer2.DEFAULT);
- }
-
- /**
- * Log the short at the given level.
- * @param s
- * @param logLevel
- * @return how it was logged. See <code>CONSOLE_DESCRIPTION.</code>
- *
- * @since 1.0.0
- */
- public String log(short s, Level logLevel) {
- if (renderer2 != null) {
- return renderer2.log(s, logLevel);
- } else {
- // Do it the old way.
- return logAny(String.valueOf(s), getOldType(logLevel != ILogRenderer2.DEFAULT ? level : Level.FINEST));
- }
- }
-
- /**
- * Log the int at the default level.
- * @param i
- * @return how it was logged. See <code>CONSOLE_DESCRIPTION.</code>
- *
- * @since 1.0.0
- */
- public String log(int i) {
- return log(i, ILogRenderer2.DEFAULT);
- }
-
- /**
- * Log the int at the default level.
- * @param i
- * @param logLevel
- * @return how it was logged. See <code>CONSOLE_DESCRIPTION.</code>
- *
- * @since 1.0.0
- */
- public String log(int i, Level logLevel) {
- if (renderer2 != null) {
- return renderer2.log(i, logLevel);
- } else {
- // Do it the old way.
- return logAny(String.valueOf(i), getOldType(logLevel != ILogRenderer2.DEFAULT ? level : Level.FINEST));
- }
- }
-
- /**
- * Log the long at the default level.
- * @param l
- * @return how it was logged. See <code>CONSOLE_DESCRIPTION.</code>
- *
- * @since 1.0.0
- */
- public String log(long l) {
- return log(l, ILogRenderer2.DEFAULT);
- }
-
- /**
- * Log the long at the given level.
- * @param l
- * @param logLevel
- * @return how it was logged. See <code>CONSOLE_DESCRIPTION.</code>
- *
- * @since 1.0.0
- */
- public String log(long l, Level logLevel) {
- if (renderer2 != null) {
- return renderer2.log(l, logLevel);
- } else {
- // Do it the old way.
- return logAny(String.valueOf(l), getOldType(logLevel != ILogRenderer2.DEFAULT ? level : Level.FINEST));
- }
- }
-
- /**
- * Log the float at the default level.
- * @param f
- * @return how it was logged. See <code>CONSOLE_DESCRIPTION.</code>
- *
- * @since 1.0.0
- */
- public String log(float f) {
- return log(f, ILogRenderer2.DEFAULT);
- }
-
- /**
- * Log the float at the given level.
- * @param f
- * @param logLevel
- * @return how it was logged. See <code>CONSOLE_DESCRIPTION.</code>
- *
- * @since 1.0.0
- */
- public String log(float f, Level logLevel) {
- if (renderer2 != null) {
- return renderer2.log(f, logLevel);
- } else {
- // Do it the old way.
- return logAny(String.valueOf(f), getOldType(logLevel != ILogRenderer2.DEFAULT ? level : Level.FINEST));
- }
- }
-
- /**
- * Log the double at the default level
- * @param d
- * @return how it was logged. See <code>CONSOLE_DESCRIPTION.</code>
- *
- * @since 1.0.0
- */
- public String log(double d) {
- return log(d, ILogRenderer2.DEFAULT);
- }
-
- /**
- * Log the double at the given level
- *
- * @param d
- * @param logLevel
- * @return how it was logged. See <code>CONSOLE_DESCRIPTION.</code>
- *
- * @since 1.0.0
- */
- public String log(double d, Level logLevel) {
- if (renderer2 != null) {
- return renderer2.log(d, logLevel);
- } else {
- // Do it the old way.
- return logAny(String.valueOf(d), getOldType(logLevel != ILogRenderer2.DEFAULT ? level : Level.FINEST));
- }
- }
-
- /*
- * Turn new type into old type. The defaultLevel is the
- * level to use if the incoming level is marked as default.
- */
- private int getOldType(Level aLevel) {
- if (aLevel == Level.SEVERE)
- return ILogRenderer.LOG_ERROR;
- else if (aLevel == Level.WARNING)
- return ILogRenderer.LOG_WARNING;
- else if (aLevel == Level.INFO)
- return ILogRenderer.LOG_INFO;
- else if (aLevel == ILogRenderer2.TRACE)
- return ILogRenderer.LOG_TRACE;
- else
- return ILogRenderer.LOG_INFO;
- }
-}
diff --git a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/internal/util/emf/workbench/EMFWorkbenchContextFactory.java b/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/internal/util/emf/workbench/EMFWorkbenchContextFactory.java
deleted file mode 100644
index 698a4352b..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/internal/util/emf/workbench/EMFWorkbenchContextFactory.java
+++ /dev/null
@@ -1,172 +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
- *******************************************************************************/
-/*
- * $$RCSfile: EMFWorkbenchContextFactory.java,v $$
- * $$Revision: 1.4 $$ $$Date: 2005/06/16 20:14:27 $$
- */
-package org.eclipse.jem.internal.util.emf.workbench;
-
-import java.util.*;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectNature;
-import org.eclipse.core.runtime.*;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-
-import org.eclipse.jem.internal.util.emf.workbench.nls.EMFWorkbenchResourceHandler;
-import org.eclipse.jem.util.RegistryReader;
-import org.eclipse.jem.util.emf.workbench.*;
-import org.eclipse.jem.util.emf.workbench.nature.EMFNature;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jem.util.plugin.JEMUtilPlugin;
-
-
-
-public class EMFWorkbenchContextFactory {
- public static final EMFWorkbenchContextFactory INSTANCE;
-
- static {
- INSTANCE = createFactoryInstance();
- }
- private final Class CONTRIBUTOR_CLASS = IEMFContextContributor.class;
- protected Map emfContextCache = new WeakHashMap();
-
-
- private static EMFWorkbenchContextFactory createFactoryInstance() {
- EMFWorkbenchContextFactory factory = createFactoryInstanceFromExtension();
- if (factory == null)
- factory = new EMFWorkbenchContextFactory();
- return factory;
- }
-
- private static EMFWorkbenchContextFactory createFactoryInstanceFromExtension() {
- final EMFWorkbenchContextFactory[] factoryHolder = new EMFWorkbenchContextFactory[1];
- RegistryReader reader = new RegistryReader(JEMUtilPlugin.ID, "internalWorkbenchContextFactory") { //$NON-NLS-1$
- public boolean readElement(IConfigurationElement element) {
- if (element.getName().equals("factoryClass")) //$NON-NLS-1$
- try {
- factoryHolder[0] = (EMFWorkbenchContextFactory)element.createExecutableExtension("name"); //$NON-NLS-1$
- return true;
- } catch (CoreException e) {
- Logger.getLogger().logError(e);
- }
- return false;
- }
- };
- reader.readRegistry();
- return factoryHolder[0];
- }
-
- /**
- * Constructor for EMFNatureFactory.
- */
- protected EMFWorkbenchContextFactory() {
- super();
-
- }
-
-
- protected void cacheEMFContext(IProject aProject, EMFWorkbenchContextBase emfContext) {
- if (aProject != null && emfContext != null)
- emfContextCache.put(aProject, emfContext);
- }
-
- protected EMFWorkbenchContextBase getCachedEMFContext(IProject aProject) {
- if (aProject != null)
- return (EMFWorkbenchContextBase) emfContextCache.get(aProject);
- return null;
- }
-
- /**
- * <code>aProject</code> is either being closed or deleted so we need to cleanup our cache.
- */
- public void removeCachedProject(IProject aProject) {
- if (aProject != null)
- emfContextCache.remove(aProject);
-
- }
- /**
- * Return a new or existing EMFNature on <code>aProject</code>. Allow the <code>contributor</code>
- * to contribute to the new or existing nature prior to returning.
- */
- public EMFWorkbenchContextBase createEMFContext(IProject aProject, IEMFContextContributor contributor) {
- if (aProject == null)
- throw new IllegalStateException("[EMFWorkbenchContextBase]" + EMFWorkbenchResourceHandler.getString("EMFWorkbenchContextFactory_UI_0")); //$NON-NLS-1$ //$NON-NLS-2$
- if (!aProject.isAccessible())
- throw new IllegalStateException("[EMFWorkbenchContextBase]" + EMFWorkbenchResourceHandler.getString("EMFWorkbenchContextFactory_UI_1", new Object[]{aProject.getName()})); //$NON-NLS-1$ //$NON-NLS-2$
- EMFWorkbenchContextBase context = getCachedEMFContext(aProject);
- boolean contributorFound = false;
- if (context == null) {
- context = primCreateEMFContext(aProject);
- cacheEMFContext(aProject, context);
- contributorFound = initializeEMFContextFromContributors(aProject, context, contributor);
- }
- if (contributor != null && context != null && !contributorFound)
- contributor.primaryContributeToContext(context);
- return context;
- }
-
- protected boolean initializeEMFContextFromContributors(IProject aProject, EMFWorkbenchContextBase emfContext, IEMFContextContributor contributor) {
- boolean contributorFound = false;
- if (aProject == null || emfContext == null)
- return contributorFound;
- List runtimes = EMFNature.getRegisteredRuntimes(aProject);
- for (int i = 0; i < runtimes.size(); i++) {
- IProjectNature nature = (IProjectNature) runtimes.get(i);
- if (nature != null && CONTRIBUTOR_CLASS.isInstance(nature)) {
- if (nature == contributor)
- contributorFound = true;
- ((IEMFContextContributor) nature).primaryContributeToContext(emfContext);
- }
- }
- return contributorFound;
- }
-
- protected boolean isNatureEnabled(IProject aProject, String natureId) {
- try {
- return aProject.isNatureEnabled(natureId);
- } catch (CoreException e) {
- return false;
- }
- }
-
- protected String[] getNatureIds(IProject aProject) {
- try {
- if (aProject.isAccessible())
- return aProject.getDescription().getNatureIds();
- } catch (CoreException e) {
- }
- return null;
- }
-
- protected IProjectNature getNature(IProject aProject, String natureId) {
- try {
- return aProject.getNature(natureId);
- } catch (CoreException e) {
- return null;
- }
- }
-
- protected EMFWorkbenchContextBase primCreateEMFContext(IProject aProject) {
- return new EMFWorkbenchContextBase(aProject);
- }
- /**
- * Return an existing EMFNature on <code>aProject</code>.
- */
- public EMFWorkbenchContextBase getEMFContext(IProject aProject) {
- return getCachedEMFContext(aProject);
- }
-
- public ResourceSetWorkbenchSynchronizer createSynchronizer(ResourceSet aResourceSet, IProject aProject) {
- return new ResourceSetWorkbenchSynchronizer(aResourceSet, aProject);
- }
-
-}
diff --git a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/internal/util/emf/workbench/ProjectResourceSetImpl.java b/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/internal/util/emf/workbench/ProjectResourceSetImpl.java
deleted file mode 100644
index 36c8f4df4..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/internal/util/emf/workbench/ProjectResourceSetImpl.java
+++ /dev/null
@@ -1,274 +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
- *******************************************************************************/
-/*
- * $$RCSfile: ProjectResourceSetImpl.java,v $$
- * $$Revision: 1.8 $$ $$Date: 2005/03/18 18:52:06 $$
- */
-package org.eclipse.jem.internal.util.emf.workbench;
-
-import java.io.IOException;
-import java.util.*;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.impl.NotificationImpl;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.emf.ecore.resource.impl.URIConverterImpl;
-import org.eclipse.emf.ecore.xmi.XMLResource;
-
-import org.eclipse.jem.util.emf.workbench.*;
-import org.eclipse.jem.util.emf.workbench.nature.EMFNature;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jem.util.plugin.JEMUtilPlugin;
-
-public class ProjectResourceSetImpl extends ResourceSetImpl implements ProjectResourceSet {
- private boolean isReleasing = false;
- private IProject project;
- protected List resourceHandlers = new ArrayList();
- protected ResourceSetWorkbenchSynchronizer synchronizer;
- protected ProjectResourceSetImpl() {
- setURIResourceMap(new HashMap(10)); // Tell it to cache uri->resource access.
- getLoadOptions().put(XMLResource.OPTION_USE_PARSER_POOL, EMFNature.SHARED_PARSER_POOL);
- }
- public ProjectResourceSetImpl(IProject aProject) {
- this();
- setProject(aProject);
- initializeSharedCacheListener();
- }
- protected void initializeSharedCacheListener() {
- JEMUtilPlugin.getSharedCache().beginListening(this);
- }
- protected boolean isReleasing() {
- return isReleasing;
- }
- /**
- * @see org.eclipse.emf.ecore.resource.impl.ResourceSetImpl#delegatedGetResource(URI, boolean)
- */
- protected Resource delegatedGetResource(URI uri, boolean loadOnDemand) {
- Resource res = super.delegatedGetResource(uri, loadOnDemand);
- if (res == null)
- res = getResourceFromHandlers(uri);
- return res;
- }
- public Resource createResource(URI uri) {
- if (isReleasing) return null;
- //Check the map first when creating the resource and do not
- //normalize if a value is found.
- boolean isMapped = !(((URIConverterImpl.URIMap)getURIConverter().getURIMap()).getURI(uri).equals(uri));
- URI converted = uri;
- if (!isMapped)
- converted = getURIConverter().normalize(uri);
- Resource result = createResourceFromHandlers(converted);
- if (result == null)
- result = super.createResource(converted);
-
- return result;
- }
- /**
- * @see org.eclipse.emf.ecore.resource.impl.ResourceSetImpl#demandLoad(Resource)
- */
- protected void demandLoad(Resource resource) throws IOException {
- if (!isReleasing)
- super.demandLoad(resource);
- }
-
- /**
- * See if any resource handlers from the WorkbenchContext
- * decide to create the Resource in another manner.
- */
- protected Resource createResourceFromHandlers(URI uri) {
- Resource resource = null;
- ResourceHandler handler = null;
- for (int i = 0; i < resourceHandlers.size(); i++) {
- handler = (ResourceHandler) resourceHandlers.get(i);
- resource = handler.createResource(this, uri);
- if (resource != null)
- return resource;
- }
- return null;
- }
- /**
- * See if any resource handlers from the WorkbenchContext
- * can return a Resource from a <code>uri</code>.
- */
- protected Resource getResourceFromHandlers(URI uri) {
- if (isReleasing) return null;
- for (int i = 0; i < resourceHandlers.size(); i++) {
- Resource resource = ((ResourceHandler) resourceHandlers.get(i)).getResource(this, uri);
- if (resource != null)
- return resource;
- }
- return null;
- }
-
- public void release() {
- // Send out notification of release.
- if (eNotificationRequired()) {
- eNotify(new NotificationImpl(SPECIAL_NOTIFICATION_TYPE, null, null, Notification.NO_INDEX, false) {
- /* (non-Javadoc)
- * @see org.eclipse.emf.common.notify.impl.NotificationImpl#getFeatureID(java.lang.Class)
- */
- public int getFeatureID(Class expectedClass) {
- return PROJECTRESOURCESET_ABOUT_TO_RELEASE_ID;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.common.notify.impl.NotificationImpl#getNotifier()
- */
- public Object getNotifier() {
- return ProjectResourceSetImpl.this;
- }
- });
- }
- setIsReleasing(true);
- if (synchronizer != null)
- synchronizer.dispose();
- synchronizer = null;
- removeAndUnloadAllResources();
- resourceHandlers = null;
- eAdapters().clear();
- setProject(null);
- JEMUtilPlugin.getSharedCache().stopListening(this);
- }
- protected void removeAndUnloadAllResources() {
- boolean caughtException = false;
- if (getResources().isEmpty()) return;
- List list = new ArrayList(getResources());
- getResources().clear();
- Resource res;
- int size = list.size();
- for (int i = 0; i < size; i++) {
- res = (Resource) list.get(i);
- try {
- res.unload();
- } catch (RuntimeException ex) {
- Logger.getLogger().logError(ex);
- caughtException = true;
- }
- }
- if (caughtException)
- throw new RuntimeException("Exception(s) unloading resources - check log files"); //$NON-NLS-1$
- }
- protected void setIsReleasing(boolean aBoolean) {
- isReleasing = aBoolean;
- }
- /**
- * Gets the project.
- * @return Returns a IProject
- */
- public IProject getProject() {
- return project;
- }
- /**
- * Sets the project.
- * @param project The project to set
- */
- protected void setProject(IProject project) {
- this.project = project;
- }
- /*
- * Javadoc copied from interface.
- */
- public EObject getEObject(URI uri, boolean loadOnDemand) {
- if (isReleasing) return null;
- Resource resource = getResource(uri.trimFragment(), loadOnDemand);
- EObject result = null;
- if (resource != null && resource.isLoaded())
- result = resource.getEObject(uri.fragment());
- if (result == null)
- result = getEObjectFromHandlers(uri, loadOnDemand);
- return result;
- }
- /**
- * See if any resource handlers from the WorkbenchContext
- * can return a EObject from a <code>uri</code> after
- * failing to find it using the normal mechanisms.
- */
- protected EObject getEObjectFromHandlers(URI uri, boolean loadOnDemand) {
- EObject obj = null;
- ResourceHandler handler = null;
- for (int i = 0; i < resourceHandlers.size(); i++) {
- handler = (ResourceHandler) resourceHandlers.get(i);
- obj = handler.getEObjectFailed(this, uri, loadOnDemand);
- if (obj != null)
- return obj;
- }
- return null;
- }
-
- public boolean add(ResourceHandler resourceHandler) {
- return resourceHandlers.add(resourceHandler);
- }
- public void addFirst(ResourceHandler resourceHandler) {
- resourceHandlers.add(0, resourceHandler);
- }
- public boolean remove(ResourceHandler resourceHandler) {
- return resourceHandlers.remove(resourceHandler);
- }
- /**
- * Returns the synchronizer.
- * @return ResourceSetWorkbenchSynchronizer
- */
- public ResourceSetWorkbenchSynchronizer getSynchronizer() {
- return synchronizer;
- }
- /**
- * Sets the synchronizer.
- * @param synchronizer The synchronizer to set
- */
- public void setSynchronizer(ResourceSetWorkbenchSynchronizer synchronizer) {
- this.synchronizer = synchronizer;
- }
- /**
- * @see org.eclipse.emf.ecore.resource.ResourceSet#setResourceFactoryRegistry(Resource.Factory.Registry)
- */
- public void setResourceFactoryRegistry(Resource.Factory.Registry factoryReg) {
- if (resourceFactoryRegistry != null && factoryReg != null) {
- preserveEntries(factoryReg.getExtensionToFactoryMap(), resourceFactoryRegistry.getExtensionToFactoryMap());
- preserveEntries(factoryReg.getProtocolToFactoryMap(), resourceFactoryRegistry.getProtocolToFactoryMap());
- }
- super.setResourceFactoryRegistry(factoryReg);
- }
- /*
- * Preserve the entries from map2 in map1 if no collision.
- */
- protected void preserveEntries(Map map1, Map map2) {
- if (map2.isEmpty())
- return;
- Iterator it = map2.entrySet().iterator();
- Map.Entry entry;
- while (it.hasNext()) {
- entry = (Map.Entry) it.next();
- if (!map1.containsKey(entry.getKey()))
- map1.put(entry.getKey(), entry.getValue());
- }
- }
- /*
- * Javadoc copied from interface.
- */
- public Resource getResource(URI uri, boolean loadOnDemand) {
- if (isReleasing) return null;
- return super.getResource(uri, loadOnDemand);
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.jem.util.emf.workbench.ProjectResourceSet#resetNormalizedURICache()
- */
- public void resetNormalizedURICache() {
- if (getURIResourceMap() != null)
- getURIResourceMap().clear();
- }
-
-}
diff --git a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/internal/util/emf/workbench/WorkspaceResourceHandler.java b/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/internal/util/emf/workbench/WorkspaceResourceHandler.java
deleted file mode 100644
index 923412358..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/internal/util/emf/workbench/WorkspaceResourceHandler.java
+++ /dev/null
@@ -1,147 +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
- *******************************************************************************/
-/*
- * $$RCSfile: WorkspaceResourceHandler.java,v $$
- * $$Revision: 1.2 $$ $$Date: 2005/02/15 23:04:14 $$
- */
-package org.eclipse.jem.internal.util.emf.workbench;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.URIConverterImpl;
-
-import org.eclipse.jem.util.emf.workbench.ResourceHandler;
-import org.eclipse.jem.util.emf.workbench.WorkbenchResourceHelperBase;
-import org.eclipse.jem.util.plugin.JEMUtilPlugin;
-
-/**
- * The main purpose of this class is to redirect, if necessary, to another
- * ResourceSet. This class should be used in conjunction with the WorkbenchURIConverter
- * so that the URIs passed will use the platform protocol. Anything else will be considered
- * to be ambiguous and we will not be able to redirect.
- */
-public class WorkspaceResourceHandler implements ResourceHandler {
- /**
- * Constructor for WorkspaceResourceHandler.
- */
- public WorkspaceResourceHandler() {
- super();
- }
- /*
- * @see IResourceHandler#getResource(ResourceSet, URI)
- */
- public Resource getResource(ResourceSet originatingResourceSet, URI uri) {
- if (WorkbenchResourceHelperBase.isPlatformResourceURI(uri))
- return getResourceForPlatformProtocol(originatingResourceSet, uri);
- URI mappedURI = ((URIConverterImpl.URIMap)originatingResourceSet.getURIConverter().getURIMap()).getURI(uri);
- if (isGlobalPluginLoad(mappedURI))
- return getResourceForPlatformPluginProtocol(originatingResourceSet, uri);
- return null;
- }
- /**
- * Redirect to the correct project based on the project name in the <code>uri</code>.
- * The <code>uri</code> will be in the following format: platform:/resource/[project name].
- */
- protected Resource createResourceForPlatformProtocol(ResourceSet originatingResourceSet, URI uri) {
- String projectName = uri.segment(1);
- IProject project = getProject(projectName);
- if (project != null && project.isAccessible()) {
- ResourceSet set = WorkbenchResourceHelperBase.getResourceSet(project);
- if (originatingResourceSet != set)
- return createResource(uri, set);
- }
- return null;
- }
- /**
- * Redirect to the correct project based on the project name in the <code>uri</code>.
- * The <code>uri</code> will be in the following format: platform:/resource/[project name].
- */
- protected Resource createResourceForPlatformPluginProtocol(ResourceSet originatingResourceSet, URI uri) {
-
- ResourceSet set = JEMUtilPlugin.getPluginResourceSet();
- return createResource(uri, set);
- }
- protected Resource createResource(URI uri, ResourceSet redirectedResourceSet) {
- return redirectedResourceSet.createResource(uri);
- }
- /**
- * Redirect to the correct project based on the first segment in the file name.
- * This is for compatability purposes for people using the platform:/resource protocol.
- */
- protected Resource getResourceForPlatformProtocol(ResourceSet originatingResourceSet, URI uri) {
- String projectName = uri.segment(1);
- IProject project = getProject(projectName);
- if (project != null && project.isAccessible()) {
- ResourceSet set = WorkbenchResourceHelperBase.getResourceSet(project);
- if (originatingResourceSet != set)
- return getResource(uri, set);
- }
- return null;
- }
- /**
- * Redirect to the correct project based on the first segment in the file name.
- * This is for compatability purposes for people using the platform:/resource protocol.
- */
- protected Resource getResourceForPlatformPluginProtocol(ResourceSet originatingResourceSet, URI uri) {
-
- ResourceSet set = JEMUtilPlugin.getPluginResourceSet();
- return getResource(uri, set);
-
- }
- protected Resource getResource(URI uri, ResourceSet redirectedResourceSet) {
- return redirectedResourceSet.getResource(uri, false);
- }
-
- protected IWorkspace getWorkspace() {
- return ResourcesPlugin.getWorkspace();
- }
- protected IProject getProject(String projectName) {
- IWorkspace ws = getWorkspace();
- if (ws == null)
- return null;
- return ws.getRoot().getProject(projectName);
- }
- protected IProject getProject(ResourceSet resourceSet) {
- return WorkbenchResourceHelperBase.getProject(resourceSet);
- }
- /**
- * @see org.eclipse.jem.util.ResourceHandler#createResource(ResourceSet, URI)
- */
- public Resource createResource(ResourceSet originatingResourceSet, URI uri) {
- if (WorkbenchResourceHelperBase.isPlatformResourceURI(uri))
- return createResourceForPlatformProtocol(originatingResourceSet, uri);
- URI mappedURI = ((URIConverterImpl.URIMap)originatingResourceSet.getURIConverter().getURIMap()).getURI(uri);
- if (isGlobalPluginLoad(mappedURI))
- return createResourceForPlatformPluginProtocol(originatingResourceSet, uri);
- return null;
- }
- /**
- * @see org.eclipse.jem.util.ResourceHandler#getEObjectFailed(ResourceSet, URI, boolean)
- * Subclasses may override.
- */
- public EObject getEObjectFailed(ResourceSet originatingResourceSet, URI uri, boolean loadOnDemand) {
- return null;
- }
-
- protected boolean isGlobalPluginLoad(URI aURI) {
- if (WorkbenchResourceHelperBase.isPlatformPluginResourceURI(aURI)) {
- String[] globalPlugins = JEMUtilPlugin.getGlobalLoadingPluginNames();
- for (int i=0;i<globalPlugins.length;i++) {
- if (aURI.segment(1).startsWith(globalPlugins[i]))
- return true;
- }
- }
- return false;
- }
-}
diff --git a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/internal/util/emf/workbench/WorkspaceResourceNotifier.java b/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/internal/util/emf/workbench/WorkspaceResourceNotifier.java
deleted file mode 100644
index 6c10afe60..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/internal/util/emf/workbench/WorkspaceResourceNotifier.java
+++ /dev/null
@@ -1,73 +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
- *******************************************************************************/
-/*
- * $$RCSfile: WorkspaceResourceNotifier.java,v $$
- * $$Revision: 1.2 $$ $$Date: 2005/02/15 23:04:14 $$
- */
-package org.eclipse.jem.internal.util.emf.workbench;
-
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.impl.AdapterImpl;
-import org.eclipse.emf.common.notify.impl.NotifierImpl;
-
-import org.eclipse.jem.util.emf.workbench.ProjectResourceSet;
-
-/**
- * This class is used to capture all ADD and REMOVE notifications from each ProjectResourceSet
- * and forward it on to any interrested listeners. This is to allow you to listen to one object
- * to gain all ADD and REMOVE notifications for each ResourceSet within the system.
- */
-public class WorkspaceResourceNotifier extends NotifierImpl {
- protected Adapter projectAdapter = new WorkspaceResourceCacheAdapter();
-
- class WorkspaceResourceCacheAdapter extends AdapterImpl {
- /**
- * Forward ADD and REMOVE notification.
- */
- public void notifyChanged(Notification msg) {
- switch (msg.getEventType()) {
- case Notification.ADD :
- case Notification.ADD_MANY :
- case Notification.REMOVE :
- case Notification.REMOVE_MANY :
- eNotify(msg);
- break;
- }
- }
- }
-
- /**
- * Constructor for WorkspaceResourceCache.
- */
- public WorkspaceResourceNotifier() {
- super();
- }
-
- /**
- * Begin listening to a ProjectResourceSet.
- */
- public void beginListening(ProjectResourceSet aResourceSet) {
- if (aResourceSet != null) {
- if (aResourceSet.eAdapters() == null ||
- !aResourceSet.eAdapters().contains(projectAdapter))
- aResourceSet.eAdapters().add(projectAdapter);
- }
- }
- /**
- * Stop listening to a ProjectResourceSet.
- */
- public void stopListening(ProjectResourceSet aResourceSet) {
- if (aResourceSet != null)
- aResourceSet.eAdapters().remove(projectAdapter);
- }
-}
diff --git a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/internal/util/emf/workbench/nature/EMFNatureRegistry.java b/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/internal/util/emf/workbench/nature/EMFNatureRegistry.java
deleted file mode 100644
index f85f7b056..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/internal/util/emf/workbench/nature/EMFNatureRegistry.java
+++ /dev/null
@@ -1,74 +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
- *******************************************************************************/
-/*
- * $$RCSfile: EMFNatureRegistry.java,v $$
- * $$Revision: 1.2 $$ $$Date: 2005/02/15 23:04:14 $$
- */
-package org.eclipse.jem.internal.util.emf.workbench.nature;
-
-import java.util.HashSet;
-import java.util.Set;
-
-
-import org.eclipse.core.runtime.*;
-
-import org.eclipse.jem.internal.util.emf.workbench.nls.EMFWorkbenchResourceHandler;
-import org.eclipse.jem.util.logger.proxy.Logger;
-
-public class EMFNatureRegistry {
-
- private static final String NATURE_REGISTRATION_POINT = "org.eclipse.jem.util.nature_registration"; //$NON-NLS-1$
- private static final String NATURE = "nature"; //$NON-NLS-1$
- private static final String STATIC_ID = "id"; //$NON-NLS-1$
-
- /**
- * Constructor
- */
- private EMFNatureRegistry() {
- super();
- readRegistry();
- }
-
- private static EMFNatureRegistry singleton;
-
- public final Set REGISTERED_NATURE_IDS = new HashSet();
-
- public static EMFNatureRegistry singleton() {
- if (singleton == null)
- singleton = new EMFNatureRegistry();
- return singleton;
- }
-
- protected void readRegistry() {
- // register Nature IDs for the J2EENatures
- IExtensionRegistry r = Platform.getExtensionRegistry();
- IConfigurationElement[] ce = r.getConfigurationElementsFor(NATURE_REGISTRATION_POINT);
- String natureId;
- for (int i=0; i<ce.length; i++) {
- if (ce[i].getName().equals(NATURE)) {
- natureId = ce[i].getAttribute(STATIC_ID);
- if (natureId != null)
- registerNatureID(natureId);
- }
- }
- }
-
- /**
- * @param natureId
- */
- private void registerNatureID(String natureId) {
- if (!REGISTERED_NATURE_IDS.contains(natureId))
- REGISTERED_NATURE_IDS.add(natureId);
- else
- Logger.getLogger().logError(EMFWorkbenchResourceHandler.getString("EMFNatureRegistry_ERROR_0", new Object[] {natureId})); //$NON-NLS-1$
- }
-
-}
diff --git a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/internal/util/emf/workbench/nls/EMFWorkbenchResourceHandler.java b/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/internal/util/emf/workbench/nls/EMFWorkbenchResourceHandler.java
deleted file mode 100644
index 31a8e45bd..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/internal/util/emf/workbench/nls/EMFWorkbenchResourceHandler.java
+++ /dev/null
@@ -1,63 +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
- *******************************************************************************/
-/*
- * $$RCSfile: EMFWorkbenchResourceHandler.java,v $$
- * $$Revision: 1.2 $$ $$Date: 2005/02/15 23:04:14 $$
- */
-package org.eclipse.jem.internal.util.emf.workbench.nls;
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class EMFWorkbenchResourceHandler {
-
- private static ResourceBundle fgResourceBundle;
-
- /**
- * Returns the resource bundle used by all classes in this Project
- */
- public static ResourceBundle getResourceBundle() {
- try {
- return ResourceBundle.getBundle("emfworkbench");//$NON-NLS-1$
- } catch (MissingResourceException e) {
- // does nothing - this method will return null and
- // getString(String, String) will return the key
- // it was called with
- }
- return null;
- }
- public static String getString(String key) {
- if (fgResourceBundle == null) {
- fgResourceBundle= getResourceBundle();
- }
-
- if (fgResourceBundle != null) {
- try {
- return fgResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$
- }
- } else {
- return "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$
- }
- }
-public static String getString(String key, Object[] args) {
-
- try {return MessageFormat.format(getString(key), args);}
- catch (IllegalArgumentException e) {return getString(key);}
-
-}
-public static String getString(String key, Object[] args, int x) {
-
- return getString(key);
- }
-}
diff --git a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/CharacterUtil.java b/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/CharacterUtil.java
deleted file mode 100644
index afe727998..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/CharacterUtil.java
+++ /dev/null
@@ -1,279 +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
- *******************************************************************************/
-/*
- * $RCSfile: CharacterUtil.java,v $
- * $Revision: 1.1 $ $Date: 2006/02/24 17:32:14 $
- */
-package org.eclipse.jem.util;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-import com.ibm.icu.text.UTF16;
-
-
-/**
- * Static helper to handle characters in the new UTF multi-char format.
- * It is needed because ICU4J currently doesn't handle some correctly yet that we
- * need to have working. As ICU4J gets them working, the methods here will become
- * deprecated.
- *
- * @since 1.2.0
- */
-public class CharacterUtil {
-
- private CharacterUtil() {
-
- }
-
-
- /**
- * TODO So until ICU4J does work correctly this util will be needed. It will
- * stay around because it is API, but at that time it will be marked deprecated. It should
- * also then reroute to ICU4J instead of doing the method reflections.
- */
- private static Method METHOD_JAVA_IDENTIFIER_START, METHOD_JAVA_IDENTIFIER_PART;
-
- static {
- // Try to get the Character.isJavaIdentifier(int) method. If there, then we are in 1.5 or above. Else use the char form.
- try {
- METHOD_JAVA_IDENTIFIER_START = Character.class.getMethod("isJavaIdentifierStart", new Class[] {Integer.TYPE});
- } catch (SecurityException e) {
- // Default to use (char) type instead.
- METHOD_JAVA_IDENTIFIER_START = null;
- } catch (NoSuchMethodException e) {
- // Default to use (char) type instead.
- METHOD_JAVA_IDENTIFIER_START = null;
- }
- try {
- METHOD_JAVA_IDENTIFIER_PART = Character.class.getMethod("isJavaIdentifierPart", new Class[] {Integer.TYPE});
- } catch (SecurityException e) {
- // Default to use (char) type instead.
- METHOD_JAVA_IDENTIFIER_PART = null;
- } catch (NoSuchMethodException e) {
- // Default to use (char) type instead.
- METHOD_JAVA_IDENTIFIER_PART = null;
- }
- }
-
- /**
- * Is start of java identifier
- * @param intChar int character (UTF multi-char is valid)
- * @return <code>true</code> if start of java identifier.
- *
- * @see Character#isJavaIdentifierStart(char)
- * @since 1.2.0
- */
- public static boolean isJavaIdentifierStart(int intChar) {
- if (METHOD_JAVA_IDENTIFIER_START != null) {
- try {
- return ((Boolean) METHOD_JAVA_IDENTIFIER_START.invoke(null, new Object[] {new Integer(intChar)})).booleanValue();
- } catch (IllegalArgumentException e) {
- } catch (IllegalAccessException e) {
- } catch (InvocationTargetException e) {
- }
- }
- return Character.isJavaIdentifierStart((char) intChar);
- }
-
- /**
- * Is start of java identifier
- * @param intChar int character (UTF multi-char is valid)
- * @return <code>true</code> if start of java identifier.
- *
- * @see Character#isJavaIdentifierStart(char)
- * @since 1.2.0
- */
- public static boolean isJavaIdentifierPart(int intChar) {
- if (METHOD_JAVA_IDENTIFIER_PART != null) {
- try {
- return ((Boolean) METHOD_JAVA_IDENTIFIER_PART.invoke(null, new Object[] {new Integer(intChar)})).booleanValue();
- } catch (IllegalArgumentException e) {
- } catch (IllegalAccessException e) {
- } catch (InvocationTargetException e) {
- }
- }
- return Character.isJavaIdentifierPart((char) intChar);
- }
-
- public static abstract class AbstractCharIterator {
-
-
- protected final CharSequence charSeq;
- private int pos = 0;
- private int lastCharIndex = 0;
-
- /**
- * Create with a string.
- * @param charSeq
- *
- * @since 1.2.0
- */
- public AbstractCharIterator(CharSequence charSeq) {
- this.charSeq = charSeq;
- }
-
- /**
- * Set the next char index.
- * @param index
- *
- * @since 1.2.0
- */
- public void setIndex(int index) {
- pos = index;
- }
-
- /**
- * Has another char.
- * @return <code>true</code> if there is another char to return.
- *
- * @since 1.2.0
- */
- public boolean hasNext() {
- return pos < charSeq.length();
- }
-
- /**
- * Has another char before the current position. Doing previous
- * will return the char that was just returned.
- * @return
- *
- * @since 1.2.0
- */
- public boolean hasPrevious() {
- return pos > 0;
- }
-
- /**
- * Return next char from the one that was just returned.
- * @return next char.
- *
- * @since 1.2.0
- */
- public int next() {
- if (!hasNext())
- throw new IllegalStateException();
-
- int next = utfCharAt(pos);
- lastCharIndex = pos;
- pos += UTF16.getCharCount(next);
- return next;
- }
-
- /**
- * Return the UTF-32 char at the given position.
- * @param pos
- * @return
- *
- * @since 1.2.0
- */
- protected abstract int utfCharAt(int pos);
-
- /**
- * Return the previous character from the one that was just returned.
- * @return
- *
- * @since 1.2.0
- */
- public int previous() {
- if (!hasPrevious())
- throw new IllegalStateException();
-
- int next;
- if (UTF16.isTrailSurrogate(charSeq.charAt(--pos))) {
- if (pos > 0)
- next = utfCharAt(--pos);
- else
- next = charSeq.charAt(pos);
- } else {
- next = charSeq.charAt(pos);
- }
- lastCharIndex = pos;
- return next;
- }
-
- /**
- * Return the UTF16 character position of the char that was just returned from either
- * previous or next.
- * This is the (char) position not the
- * position of logical int chars returned. For example a standard string of
- * <code>"abc"</code> the position of the char 'b' is 1. But take the string
- * <code>"ab1b2c"</code> where "b1b2" is one UTF-32 char, then the position
- * of 'c' is 3. It would not be 2, which is what the logical char position
- * would be if taking UFT32 into account.
- * @return
- *
- * @since 1.2.0
- */
- public int getPosition() {
- return lastCharIndex;
- }
-
- }
-
- /**
- * Special char iterator that returns ints instead of chars for
- * walking strings that can contain UTF multi-chars. This is
- * a limited version of {@link java.text.CharacterIterator}.
- *
- * @since 1.2.0
- */
- public static class StringIterator extends AbstractCharIterator {
-
-
- /**
- * Create with a string.
- * @param str
- *
- * @since 1.2.0
- */
- public StringIterator(String str) {
- super(str);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jem.util.CharacterUtil.AbstractCharIterator#utfCharAt(int)
- */
- protected int utfCharAt(int pos) {
- return UTF16.charAt((String) charSeq, pos);
- }
-
- }
-
- /**
- * Special char iterator that returns ints instead of chars for
- * walking strings that can contain UTF multi-chars. This is
- * a limited version of {@link java.text.CharacterIterator}.
- *
- * @since 1.2.0
- */
- public static class StringBufferIterator extends AbstractCharIterator {
-
-
- /**
- * Create with a string.
- * @param strBuffer
- *
- * @since 1.2.0
- */
- public StringBufferIterator(StringBuffer strBuffer) {
- super(strBuffer);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jem.util.CharacterUtil.AbstractCharIterator#utfCharAt(int)
- */
- protected int utfCharAt(int pos) {
- return UTF16.charAt((StringBuffer) charSeq, pos);
- }
-
- }
-}
diff --git a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/NotPresentPerformanceMonitor.java b/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/NotPresentPerformanceMonitor.java
deleted file mode 100644
index 54af2bd09..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/NotPresentPerformanceMonitor.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package org.eclipse.jem.util;
-/*******************************************************************************
- * 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
- *******************************************************************************/
-/*
- * $$RCSfile: NotPresentPerformanceMonitor.java,v $$
- * $$Revision: 1.3 $$ $$Date: 2005/02/15 23:04:14 $$
- */
-/**
- * This is the instantiation to use if the performance monitor plugin is not installed. It basically does nothing.
- *
- * <p>
- * This class is not intended to be instantiated by clients.
- * </p>
- *
- * @since 1.0.0
- */
-public class NotPresentPerformanceMonitor extends PerformanceMonitorUtil {
-
- /*
- * Only instantiated from this package.
- */
- NotPresentPerformanceMonitor() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.PerformanceMonitorUtil#setVar(java.lang.String)
- */
- public void setVar(String var) {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jem.util.PerformanceMonitorUtil#doSnapshot(int, int)
- */
- protected void doSnapshot(int step, int types) {
- }
-
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jem.util.PerformanceMonitorUtil#doSnapshot(int)
- */
- protected void doSnapshot(int step) {
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/PerformanceMonitorUtil.java b/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/PerformanceMonitorUtil.java
deleted file mode 100644
index a76fdd079..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/PerformanceMonitorUtil.java
+++ /dev/null
@@ -1,280 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * $RCSfile: PerformanceMonitorUtil.java,v $
- * $Revision: 1.7 $ $Date: 2005/08/24 21:10:34 $
- */
-package org.eclipse.jem.util;
-import java.util.EventObject;
-
-import org.eclipse.perfmsr.core.IPerformanceMonitor;
-
-/**
- * This is a simplified wrapper to the IPerformanceMonitor that hides it so that the actual plugin can be optional and not required.
- *
- * <p>
- * This class is not meant to be subclassed by clients.
- * </p>
- *
- * @since 1.0.0
- */
-public abstract class PerformanceMonitorUtil {
- /**
- * Event for PerformanceListener notification.
- *
- * @since 1.1.0
- */
- public static class PerformanceEvent extends EventObject {
-
- /**
- * Comment for <code>serialVersionUID</code>
- *
- * @since 1.1.0
- */
- private static final long serialVersionUID = -4680071462750180339L;
-
- PerformanceEvent(Object source, int step) {
- super(source);
- snapshowWithTypes = false;
- this.step = step;
- this.types = 0; // Not set.
- }
-
- PerformanceEvent(Object source, int step, int types) {
- super(source);
- snapshowWithTypes = true;
- this.step = step;
- this.types = types;
- }
-
-
- /**
- * Snapshot with types if <code>true</code>.
- * @since 1.1.0
- */
- public final boolean snapshowWithTypes;
-
- /**
- * Step of snapshot
- * @since 1.1.0
- */
- public final int step;
-
- /**
- * types of snapshot.
- * @since 1.1.0
- */
- public final int types;
- }
-
- /**
- * Performance Listener interface
- *
- * @since 1.1.0
- */
- public interface PerformanceListener {
- /**
- * Snapshot was called.
- * @param event
- *
- * @since 1.1.0
- */
- public void snapshot(PerformanceEvent event);
- }
-
- private PerformanceListener[] listeners;
-
- public interface Types {
-
- /**
- * 1 - Write out the performance counters from the operating system. These include working set, peak working set, elapsed time, user time, and
- * kernel time.
- */
- int OperatingSystemCounters = IPerformanceMonitor.Types.OperatingSystemCounters;
-
- /**
- * 2 - Write out the global performance info. This includes things like the total committed memory for the entire system.
- *
- * This function depends on the GetPerformanceInfo() function being available in the Windows psapi.dll. This is available in XP but is usually
- * not available in Win/2000. If it is not available then this function throws an UnsupportedOperationException.
- */
- int GlobalSystemCounters = IPerformanceMonitor.Types.GlobalSystemCounters;
-
- /**
- * 4 - Write out the size of the Java Heap.
- */
- int JavaHeapSize = IPerformanceMonitor.Types.JavaHeapSize;
-
- /**
- * 8 - Write out how much of the Java heap is being used. This calls the garbage collector so it may skew timing results.
- */
- int JavaHeapUsed = IPerformanceMonitor.Types.JavaHeapUsed;
-
- /**
- * 16 - The plugin startup and size information.
- */
- int PluginInfo = IPerformanceMonitor.Types.PluginInfo;
-
- /** 0xffff - Everything. */
- int All = IPerformanceMonitor.Types.All;
- }
-
- private static PerformanceMonitorUtil sharedMonitor;
-
- public static PerformanceMonitorUtil getMonitor() {
- if (sharedMonitor == null) {
- try {
- Class.forName("org.eclipse.perfmsr.core.PerfMsrCorePlugin"); // This just tests if the performance plugin is available. Throws //$NON-NLS-1$
- // exception otherwise.
- Class presentClass = Class.forName("org.eclipse.jem.util.PresentPerformanceMonitor"); // Get the class we use wrapper it. //$NON-NLS-1$
- sharedMonitor = (PerformanceMonitorUtil) presentClass.newInstance();
- if (!sharedMonitor.isValid())
- sharedMonitor = null;
- } catch (RuntimeException e) {
- // If any runtime exception, just use the not present one.
- } catch (ClassNotFoundException e) {
- // If class not found, then plugin not available, so just use the not present one.
- } catch (InstantiationException e) {
- // Problem instantiating, so just use the not present one.
- } catch (IllegalAccessException e) {
- // Some illegal access, so just use the not present one.
- }
- if (sharedMonitor == null) {
- // Couldn't get the performance one for some reason. Use not present one instead.
- sharedMonitor = new NotPresentPerformanceMonitor();
- }
- }
- return sharedMonitor;
- }
-
- protected boolean isValid() {
- return true;
- }
-
- /**
- * Set the variations that are in effect.
- *
- * @param var
- * a comma delimited string of variation numbers
- */
- public abstract void setVar(String var);
-
- /**
- * Take a snapshot of some default performance measurements.
- *
- * @param step
- * this identifies the step that the snapshot is for
- */
- public final void snapshot(int step) {
- doSnapshot(step);
- if (listeners != null)
- notifySnapshot(new PerformanceEvent(this, step));
- }
-
- private void notifySnapshot(PerformanceEvent event) {
- PerformanceListener[] list = listeners;
- for (int i = 0; i < list.length; i++) {
- list[i].snapshot(event);
- }
- }
-
- /**
- * Do the actual snapshot
- * @param step
- *
- * @see #snapshot(int)
- * @since 1.1.0
- */
- protected abstract void doSnapshot(int step);
-
- /**
- * Take a snapshot of the selected performance measurements.
- *
- * @param step
- * this identifies the step that the snapshot is for
- *
- * @param types
- * This controls which measurements are selected. It is an or'd together list of the IPerformanceMonitor.Types constants.
- *
- * @see IPerformanceMonitor.Types
- */
- public void snapshot(int step, int types) {
- doSnapshot(step, types);
- if (listeners != null)
- notifySnapshot(new PerformanceEvent(this, step, types));
- }
-
- /**
- * Do the actual snapshot
- * @param step
- *
- * @see #snapshot(int, int)
- * @since 1.1.0
- */
- protected abstract void doSnapshot(int step, int types);
-
- /**
- * Add listener to list.
- * @param listener
- *
- * @since 1.1.0
- */
- public void addPerformanceListener(PerformanceListener listener) {
- if (findListener(listener) != -1)
- return;
- PerformanceListener[] newList = new PerformanceListener[listeners != null ? listeners.length+1 : 1];
- if (listeners != null)
- System.arraycopy(listeners, 0, newList, 0, listeners.length);
- newList[newList.length-1] = listener;
- listeners = newList;
- }
-
- private int findListener(PerformanceListener listener) {
- if (listeners != null) {
- for (int i = 0; i < listeners.length; i++) {
- if (listeners[i] == listener)
- return i;
- }
- }
- return -1;
- }
-
- /**
- * Remove the listener from the list.
- * @param listener
- *
- * @since 1.1.0
- */
- public void removePerformanceListener(PerformanceListener listener) {
- int index = findListener(listener);
- if (index != -1) {
- if (listeners.length == 1) {
- listeners = null;
- return;
- }
- PerformanceListener[] newList = new PerformanceListener[listeners.length-1];
- System.arraycopy(listeners, 0, newList, 0, index);
- System.arraycopy(listeners, index+1, newList, index, newList.length-index);
- listeners = newList;
- }
- }
- /**
- * Upload the results to the server. This causes the file to be
- * closed, and the monitor to be placed into the finished state.
- *
- * This method can only be called if the uploadhost, uploadport and uploaduserid
- * have been configured before hand.
- *
- * @param description an optional description (it can be null)
- *
- */
- public boolean upload(String description){return false;}
-}
diff --git a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/PresentPerformanceMonitor.java b/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/PresentPerformanceMonitor.java
deleted file mode 100644
index 3ee5b0532..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/PresentPerformanceMonitor.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
- *******************************************************************************/
-/*
- * $RCSfile: PresentPerformanceMonitor.java,v $
- * $Revision: 1.5 $ $Date: 2005/08/24 21:10:34 $
- */
-package org.eclipse.jem.util;
-import org.eclipse.perfmsr.core.IPerformanceMonitor;
-import org.eclipse.perfmsr.core.PerfMsrCorePlugin;
-
-/**
- * This is the version used when the performance plugin is available.
- *
- * <p>
- * This class is not meant to be instantiated by clients.
- * </p>
- *
- * @since 1.0.0
- */
-public class PresentPerformanceMonitor extends PerformanceMonitorUtil {
-
- /* (non-Javadoc)
- * @see org.eclipse.jem.util.PerformanceMonitorUtil#upload(java.lang.String)
- */
- public boolean upload(String description) {
- return monitor.upload(description).success;
- }
-
- private IPerformanceMonitor monitor;
-
- /*
- * So that only instantiated by this package.
- */
- PresentPerformanceMonitor() {
- monitor = PerfMsrCorePlugin.getPerformanceMonitor(true);
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.jem.util.PerformanceMonitorUtil#isValid()
- */
- protected boolean isValid() {
- return monitor != null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.PerformanceMonitorUtil#setVar(java.lang.String)
- */
- public void setVar(String var) {
- monitor.setVar(var);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jem.util.PerformanceMonitorUtil#doSnapshot(int)
- */
- protected void doSnapshot(int step) {
- monitor.snapshot(step);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jem.util.PerformanceMonitorUtil#doSnapshot(int, int)
- */
- protected void doSnapshot(int step, int types) {
- monitor.snapshot(step, types);
- }
-
-}
diff --git a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/RegistryReader.java b/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/RegistryReader.java
deleted file mode 100644
index 37e827756..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/RegistryReader.java
+++ /dev/null
@@ -1,156 +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
- *******************************************************************************/
-/*
- * $$RCSfile: RegistryReader.java,v $$
- * $$Revision: 1.5 $$ $$Date: 2006/05/17 20:13:45 $$
- */
-package org.eclipse.jem.util;
-import org.eclipse.core.runtime.*;
-import org.osgi.framework.Bundle;
-
-import org.eclipse.jem.util.logger.proxy.Logger;
-
-
-/**
- * Class to read a registry. It is meant to be subclassed to provide specific function.
- *
- * @since 1.0.0
- */
-public abstract class RegistryReader {
-
- String pluginId;
-
- String extensionPointId;
-
- private static Bundle systemBundle;
-
- /**
- * Utility method to get the plugin id of a configuation element
- *
- * @param configurationElement
- * @return plugin id of configuration element
- * @since 1.0.0
- */
- public static String getPluginId(IConfigurationElement configurationElement) {
- String pluginId = null;
-
- if (configurationElement != null) {
- IExtension extension = configurationElement.getDeclaringExtension();
-
- if (extension != null)
- pluginId = extension.getContributor().getName();
- }
-
- return pluginId;
- }
-
- /**
- * Constructor for RegistryReader taking a registry, plugin id, and extension point id.
- *
- * @param registry
- * @param pluginID
- * @param extensionPoint
- *
- * @deprecated Use RegistryReader(plugin, extensionPoint) instead. The registry passed in is ignored.
- * @since 1.0.0
- */
- public RegistryReader(IPluginRegistry registry, String pluginID, String extensionPoint) {
- this(pluginID, extensionPoint);
- }
-
- /**
- * Constructor for RegistryReader taking the plugin id and extension point id.
- *
- * @param pluginID
- * @param extensionPoint
- *
- * @since 1.0.0
- */
- public RegistryReader(String pluginID, String extensionPoint) {
- super();
- this.pluginId = pluginID;
- extensionPointId = extensionPoint;
- }
-
- private void internalReadElement(IConfigurationElement element) {
- boolean recognized = this.readElement(element);
- if (!recognized) {
- logError(element, "Error processing extension: " + element); //$NON-NLS-1$
- }
- }
-
- /*
- * Logs the error in the desktop log using the provided text and the information in the configuration element.
- */
- protected void logError(IConfigurationElement element, String text) {
- IExtension extension = element.getDeclaringExtension();
- StringBuffer buf = new StringBuffer();
- buf.append("Plugin " + extension.getContributor().getName() + ", extension " + extension.getExtensionPointUniqueIdentifier()); //$NON-NLS-1$ //$NON-NLS-2$
- buf.append("\n" + text); //$NON-NLS-1$
- Logger.getLogger().logError(buf.toString());
- }
-
- /*
- * Logs a very common registry error when a required attribute is missing.
- */
- protected void logMissingAttribute(IConfigurationElement element, String attributeName) {
- logError(element, "Required attribute '" + attributeName + "' not defined"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /*
- * Implement this method to read element attributes. If this element has subelements, the reader will recursively cycle through them and call this
- * method so don't do it here.
- */
- public abstract boolean readElement(IConfigurationElement element);
-
- /**
- * Read the extension point and parse it.
- *
- * @since 1.0.0
- */
- public void readRegistry() {
- IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(pluginId, extensionPointId);
- if (point == null)
- return;
- IConfigurationElement[] elements = point.getConfigurationElements();
- for (int i = 0; i < elements.length; i++) {
- internalReadElement(elements[i]);
- }
- }
-
- /**
- * Tests to see if it is valid at this point in time to create an executable extension. A valid reason not to would be that the workspace is
- * shutting donw.
- *
- * @param element
- * @return <code>true</code> if it is valid point to create an executable extension.
- *
- * @since 1.0.0
- */
- public static boolean canCreateExecutableExtension(IConfigurationElement element) {
- if (Platform.isRunning() && getSystemBundle().getState() != Bundle.STOPPING)
- return true;
- return false;
- }
-
- /**
- * Get the system bundle
- *
- * @return system bundle.
- *
- * @since 1.0.0
- */
- protected static Bundle getSystemBundle() {
- if (systemBundle == null)
- systemBundle = Platform.getBundle("org.eclipse.osgi"); //$NON-NLS-1$
- return systemBundle;
- }
-}
diff --git a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/TimerTests.java b/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/TimerTests.java
deleted file mode 100644
index 57f5b4e4d..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/TimerTests.java
+++ /dev/null
@@ -1,352 +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
- *******************************************************************************/
-/*
- * $RCSfile: TimerTests.java,v $
- * $Revision: 1.8 $ $Date: 2006/05/17 20:13:45 $
- */
-package org.eclipse.jem.util;
-
-import java.text.NumberFormat;
-import java.util.*;
-
-/**
- *
- * @since 1.0.2
- */
-public class TimerTests {
-
- /**
- * Default TimerTests class to use when not using your own. It's a global.
- */
- public static TimerTests basicTest = new TimerTests();
-
- public static final String CURRENT_PARENT_ID = "current parent"; //$NON-NLS-1$
- protected String currentParentId = null;
-
-
- protected static class TimerStep {
- static final int START = 0;
- static final int STOP = 1;
- static final int START_CUMULATIVE = 2;
- static final int STOP_CUMULATIVE = 3;
- static final int START_ACCUMULATING = 4;
- static final int STOP_ACCUMULATING = 5;
- protected String id;
- protected int type;
- protected long currentTime;
- protected int threadId;
-}
-
- protected boolean testOn = false;
- protected List steps;
-
- public synchronized boolean startStep(String id) {
- if (!testOn)
- return true;
-
- TimerStep step = createTimerStep(id, TimerStep.START);
- return step != null;
- }
-
- protected TimerStep createTimerStep(String id, int stepType) {
- TimerStep newStep = new TimerStep();
- newStep.threadId = Thread.currentThread().hashCode();
- newStep.id = id;
- newStep.type = stepType;
- newStep.currentTime = System.currentTimeMillis();
- steps.add(newStep);
-
- return newStep;
- }
-
- public synchronized boolean stopStep(String id) {
- if (!testOn)
- return true;
- TimerStep step = createTimerStep(id, TimerStep.STOP);
- return step != null;
- }
-
- public synchronized boolean startAccumulating(String id) {
- if (!testOn)
- return true;
-
- return createTimerStep(id, TimerStep.START_ACCUMULATING) != null;
- }
-
- public synchronized boolean stopAccumulating(String id) {
- if (!testOn)
- return true;
-
- return createTimerStep(id, TimerStep.STOP_ACCUMULATING) != null;
- }
- public synchronized boolean startCumulativeStep(String id) {
- if (!testOn)
- return true;
-
- return createTimerStep(id, TimerStep.START_CUMULATIVE) != null;
- }
-
- public synchronized boolean stopCumulativeStep(String id) {
- if (!testOn)
- return true;
- return createTimerStep(id, TimerStep.STOP_CUMULATIVE) != null;
- }
-
- /**
- * Clear the tests so that you can restart and do some more tests.
- *
- *
- * @since 1.0.2
- */
- public synchronized void clearTests() {
- if (!testOn)
- return;
- steps.clear();
- currentParentId = null;
- }
-
- /**
- * Turn this test on. If not turned on then all calls will quickly return with no errors. This allows the code to stay in place even when not
- * debugging.
- * <p>
- * When turned off, it will clear the test.
- *
- * @param on
- *
- * @since 1.0.2
- */
- public synchronized void testState(boolean on) {
- if (on == testOn)
- return;
- if (on) {
- testOn = true;
- if (steps == null)
- steps = new ArrayList();
- } else {
- testOn = false;
- steps = null;
- }
- currentParentId = null;
- }
- private static class CumulativeInformation {
- public TimerStep currentCumulativeStep;
- public long cumTime;
- public int cumCount;
- public int cumCountNonZero;
- public long maxTime;
- public long minTime = Integer.MAX_VALUE;
- public long minTimeNonZero = Integer.MAX_VALUE;
- }
- public synchronized void printIt() {
- if (!testOn)
- return;
- if (steps == null)
- return;
- Map stepInfoByThreadId = new HashMap();
- Map indentsByThreadId = new HashMap();
- Map cumSteps;
- TimerStep prevStep = null;
- TimerStep startStep;
- NumberFormat percentFormatter = NumberFormat.getPercentInstance();
- double totalTime = 0;
- StringBuffer strb = new StringBuffer(150);
- if (steps.size() > 2){
- totalTime = ((TimerStep)steps.get(steps.size()-1)).currentTime - ((TimerStep)steps.get(0)).currentTime;
- }
- for (int i = 0; i < steps.size(); i++) {
- TimerStep step = (TimerStep) steps.get(i);
- Integer threadId = new Integer(step.threadId);
- switch (step.type) {
- case TimerStep.START:
- case TimerStep.STOP:
- Integer threadIndent = (Integer) indentsByThreadId.get(threadId);
- int indent = 0;
- if (step.type == TimerStep.START) {
- if (threadIndent != null)
- indent = threadIndent.intValue() + 1;
- indentsByThreadId.put(threadId, new Integer(indent));
- } else {
- if (threadIndent != null)
- indent = threadIndent.intValue();
- if (indent > 0)
- indentsByThreadId.put(threadId, new Integer(indent - 1));
- else {
- indentsByThreadId.remove(threadId);
- indent = 0;
- }
- }
- strb.setLength(0);
- strb.append(step.currentTime);
- strb.append("\t"); //$NON-NLS-1$
- for (int j = 0; j < indent; j++) {
- strb.append(" "); //$NON-NLS-1$
- }
- switch (step.type) {
- case TimerStep.START:
- strb.append("Start"); //$NON-NLS-1$
- break;
-
- case TimerStep.STOP:
- strb.append("Stop "); //$NON-NLS-1$
- break;
- default:
- break;
- }
- ;
- strb.append(" \""); //$NON-NLS-1$
- strb.append(step.id);
- strb.append("\" id("); //$NON-NLS-1$
- strb.append(step.threadId);
- strb.append(")"); //$NON-NLS-1$
- Map startSteps = (Map) stepInfoByThreadId.get(threadId);
- if (startSteps == null)
- stepInfoByThreadId.put(threadId, startSteps = new HashMap());
- if (step.type == TimerStep.START) {
- // Store the start step for later lookup when calulating the total time
- startSteps.put(step.id, step);
- } else {
- // This is the stop time for a step. We need to find
- // the corresponding start time and calculate the total time.
- Object item = startSteps.remove(step.id);
- if (item instanceof TimerStep) {
- startStep = (TimerStep) item;
- if (startStep != null) {
- int addchars = 100 - strb.length();
- for (int j = 0; j < addchars; j++) {
- strb.append(" "); //$NON-NLS-1$
- }
- long delta = step.currentTime - startStep.currentTime;
- strb.append(" Total = " + delta + " ms"); //$NON-NLS-1$ //$NON-NLS-2$
- if (totalTime > 0)
- strb.append(" " + percentFormatter.format(delta/totalTime)); //$NON-NLS-1$
- }
- } else
- strb.append(" ---> Couldn't find Starting point for \"" + step.id + "\""); //$NON-NLS-1$ //$NON-NLS-2$
- }
- if (i > 0 && (step.currentTime - prevStep.currentTime) > 0)
- System.out.println("-- " + (step.currentTime - prevStep.currentTime) + " ms --"); //$NON-NLS-1$ //$NON-NLS-2$
- prevStep = step;
- System.out.println(strb);
- break;
-
- case TimerStep.START_ACCUMULATING:
- cumSteps = (Map) stepInfoByThreadId.get(threadId);
- if (cumSteps == null)
- stepInfoByThreadId.put(threadId, cumSteps = new HashMap());
- cumSteps.put(step.id, new CumulativeInformation());
- threadIndent = (Integer) indentsByThreadId.get(threadId);
- indent = 0;
- if (threadIndent != null)
- indent = threadIndent.intValue();
- strb.setLength(0);
- strb.append(step.currentTime);
- strb.append("\t"); //$NON-NLS-1$
- for (int j = 0; j < indent; j++) {
- strb.append(" "); //$NON-NLS-1$
- }
- strb.append("Start Accumulating"); //$NON-NLS-1$
- strb.append(" \""); //$NON-NLS-1$
- strb.append(step.id);
- strb.append("\" id("); //$NON-NLS-1$
- strb.append(step.threadId);
- strb.append(")"); //$NON-NLS-1$
- if (i > 0 && (step.currentTime - prevStep.currentTime) > 0)
- System.out.println("-- " + (step.currentTime - prevStep.currentTime) + " ms --"); //$NON-NLS-1$ //$NON-NLS-2$
- prevStep = step;
- System.out.println(strb);
- break;
-
- case TimerStep.START_CUMULATIVE:
- cumSteps = (Map) stepInfoByThreadId.get(threadId);
- if (cumSteps != null) {
- Object info = cumSteps.get(step.id);
- if (info instanceof CumulativeInformation)
- ((CumulativeInformation) info).currentCumulativeStep = step;
- }
- break;
-
- case TimerStep.STOP_CUMULATIVE:
- cumSteps = (Map) stepInfoByThreadId.get(threadId);
- if (cumSteps != null) {
- Object info = cumSteps.get(step.id);
- if (info instanceof CumulativeInformation) {
- CumulativeInformation cumInfo = (CumulativeInformation) info;
- if (cumInfo.currentCumulativeStep != null) {
- cumInfo.cumCount++;
- long delta = step.currentTime - cumInfo.currentCumulativeStep.currentTime;
- cumInfo.cumTime += delta;
- if (cumInfo.maxTime < delta)
- cumInfo.maxTime = delta;
- if (delta < cumInfo.minTime)
- cumInfo.minTime = delta;
- if (delta != 0) {
- cumInfo.cumCountNonZero++;
- if (delta < cumInfo.minTimeNonZero)
- cumInfo.minTimeNonZero = delta;
- }
- }
- }
- }
- break;
-
- case TimerStep.STOP_ACCUMULATING:
- threadIndent = (Integer) indentsByThreadId.get(threadId);
- indent = 0;
- if (threadIndent != null)
- indent = threadIndent.intValue();
- strb.setLength(0);
- strb.append(step.currentTime);
- strb.append("\t"); //$NON-NLS-1$
- for (int j = 0; j < indent; j++) {
- strb.append(" "); //$NON-NLS-1$
- }
- strb.append("Stop Accumulating"); //$NON-NLS-1$
- strb.append(" \""); //$NON-NLS-1$
- strb.append(step.id);
- strb.append("\" id("); //$NON-NLS-1$
- strb.append(step.threadId);
- strb.append(")"); //$NON-NLS-1$
- cumSteps = (Map) stepInfoByThreadId.get(threadId);
- if (cumSteps != null) {
- Object info = cumSteps.get(step.id);
- if (info instanceof CumulativeInformation) {
- CumulativeInformation cumInfo = (CumulativeInformation) info;
- if (cumInfo.currentCumulativeStep != null) {
- strb.append(" cumulative time="); //$NON-NLS-1$
- strb.append(cumInfo.cumTime);
- strb.append(" cumulative count="); //$NON-NLS-1$
- strb.append(cumInfo.cumCount);
- strb.append(" max time="); //$NON-NLS-1$
- strb.append(cumInfo.maxTime);
- strb.append(" min time="); //$NON-NLS-1$
- strb.append(cumInfo.minTime);
- strb.append(" avg time="); //$NON-NLS-1$
- strb.append(((double) cumInfo.cumTime)/cumInfo.cumCount);
- strb.append(" NonZero times: cumulative ~0 count="); //$NON-NLS-1$
- strb.append(cumInfo.cumCountNonZero);
- if (cumInfo.cumCountNonZero != 0) {
- strb.append(" min ~0 time="); //$NON-NLS-1$
- strb.append(cumInfo.minTimeNonZero);
- strb.append(" avg ~0 time="); //$NON-NLS-1$
- strb.append(((double) cumInfo.cumTime) / cumInfo.cumCountNonZero);
- }
- }
- }
- }
- if (i > 0 && (step.currentTime - prevStep.currentTime) > 0)
- System.out.println("-- " + (step.currentTime - prevStep.currentTime) + " ms --"); //$NON-NLS-1$ //$NON-NLS-2$
- prevStep = step;
- System.out.println(strb);
- break;
- }
- }
- }
-}
diff --git a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/UIContextDetermination.java b/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/UIContextDetermination.java
deleted file mode 100644
index 040d39df9..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/UIContextDetermination.java
+++ /dev/null
@@ -1,190 +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
- *******************************************************************************/
-/*
- * $$RCSfile: UIContextDetermination.java,v $$
- * $$Revision: 1.4 $$ $$Date: 2006/08/09 15:38:22 $$
- */
-package org.eclipse.jem.util;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.*;
-
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jem.util.plugin.JEMUtilPlugin;
-
-
-/**
- * Static utility class for UIContext determination.
- *
- * @since 1.0.0
- */
-public class UIContextDetermination {
-
- private static final int UNKNOWN = 100;
-
- public static final String HEADLESS_CONTEXT_LITERAL = "Headless"; //$NON-NLS-1$
-
- public static final String UI_CONTEXT_LITERAL = "UI"; //$NON-NLS-1$
-
- public static final int HEADLESS_CONTEXT = 102;
-
- public static final int UI_CONTEXT = 101;
-
- private static Map cachedExtensions = null;
-
- private static int currentContext = UNKNOWN;
-
- private UIContextDetermination() {
- }
-
- /**
- * Returns an instance of a given class based on the UI or Headless context.
- *
- * @param key
- * @return new class instance for the given key.
- * @throws IllegalArgumentException
- * If the key is invalid (e.g. no extension is found for the key)
- */
- public static Object createInstance(String key) {
- Object result = null;
- if (cachedExtensions == null)
- initExtensions();
- IConfigurationElement contextSensitiveClass = (IConfigurationElement) cachedExtensions.get(key);
- try {
- if (contextSensitiveClass != null)
- result = contextSensitiveClass
- .createExecutableExtension(UIContextDeterminationRegistryReader.UI_CONTEXT_SENSTIVE_CLASS_CLASSNAME_ATTR);
- } catch (CoreException e) {
- Logger.getLogger().logError("Problem loading extension not found for key \"" + key + "\"."); //$NON-NLS-1$ //$NON-NLS-2$
- Logger.getLogger().logError(e);
- }
- if (result == null)
- Logger.getLogger().logError("Extension not found for key \"" + key + "\"."); //$NON-NLS-1$ //$NON-NLS-2$
- return result;
- }
-
- /**
- * Returns the current context -- determines the value if necessary.
- *
- * @return current context
- * @see #HEADLESS_CONTEXT
- * @see #UI_CONTEXT
- */
- public static int getCurrentContext() {
- if (currentContext == UNKNOWN) {
- currentContext = HEADLESS_CONTEXT;
- new UITesterRegistryReader().readRegistry();
- }
- return currentContext;
- }
-
- /*
- * Invokes the UIContextDeterminationRegistryReader to cache all of the extensions, if necessary.
- *
- */
- private static void initExtensions() {
- if (cachedExtensions == null) {
- cachedExtensions = new HashMap();
- new UIContextDeterminationRegistryReader().readRegistry();
- }
- }
-
- /*
- * Converts the input to one of UI_CONTEXT or HEADLESS_CONTEXT. Defaults to HEADLESS on invalid input
- *
- * @param literal @return
- */
- private static int convertLiteral(String literal) {
- return (UI_CONTEXT_LITERAL.equals(literal)) ? UI_CONTEXT : HEADLESS_CONTEXT;
- }
-
- /*
- * Reads the registration of UI Context-sensitive class extensions and initializes the cache of the UIContextDetermination object.
- *
- * @author mdelder
- */
- private static class UIContextDeterminationRegistryReader extends RegistryReader {
-
- public static final String UI_CONTEXT_SENSTIVE_CLASS_ELEMENT = "uiContextSensitiveClass"; //$NON-NLS-1$
-
- public static final String UI_CONTEXT_SENSTIVE_CLASS_KEY_ATTR = "key"; //$NON-NLS-1$
-
- public static final String UI_CONTEXT_SENSTIVE_CLASS_CLASSNAME_ATTR = "className"; //$NON-NLS-1$
-
- public static final String UI_CONTEXT_SENSTIVE_CLASS_CONTEXT_ATTR = "context"; //$NON-NLS-1$
-
- public UIContextDeterminationRegistryReader() {
- super(JEMUtilPlugin.PLUGIN_ID, JEMUtilPlugin.UI_CONTEXT_EXTENSION_POINT);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.RegistryReader#readElement(org.eclipse.core.runtime.IConfigurationElement)
- */
- public boolean readElement(IConfigurationElement element) {
- boolean result = false;
- if (element.getName().equals(UI_CONTEXT_SENSTIVE_CLASS_ELEMENT)) {
-
- String key = element.getAttribute(UI_CONTEXT_SENSTIVE_CLASS_KEY_ATTR);
- String context = element.getAttribute(UI_CONTEXT_SENSTIVE_CLASS_CONTEXT_ATTR);
-
- if (!cachedExtensions.containsKey(key) || getCurrentContext() == convertLiteral(context))
- cachedExtensions.put(key, element);
- result = true;
- }
- return result;
- }
- }
-
- /*
- * Reads the uiTester extension and instantiate the any of the UITester classes it finds.
- *
- * The implementation has the side effect that if multiple UITesters are registered, any of them can trip the currentContext into the UI_CONTEXT
- * state.
- *
- * @author mdelder
- */
- private static class UITesterRegistryReader extends RegistryReader {
-
- public static final String UI_TESTER_ELEMENT = "uiTester"; //$NON-NLS-1$
-
- public static final String UI_TESTER_CLASSNAME_ATTR = "className"; //$NON-NLS-1$
-
- public UITesterRegistryReader() {
- super(JEMUtilPlugin.PLUGIN_ID, JEMUtilPlugin.UI_TESTER_EXTENSION_POINT);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf.workbench.RegistryReader#readElement(org.eclipse.core.runtime.IConfigurationElement)
- */
- public boolean readElement(IConfigurationElement element) {
- boolean result = false;
- if (element.getName().equals(UI_TESTER_ELEMENT)) {
- result = true;
- try {
- // Don't bother running tester it if we already processed one extension that returned true.
- if (currentContext != UI_CONTEXT && canCreateExecutableExtension(element)) {
- UITester tester = (UITester) element.createExecutableExtension(UI_TESTER_CLASSNAME_ATTR);
- if (tester.isCurrentContextUI())
- currentContext = UI_CONTEXT;
- }
- } catch (Throwable t) {
- Logger.getLogger().log("UIContextDetermination is proceeding in HEADLESS mode"); //$NON-NLS-1$
- }
- }
- return result;
- }
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/UITester.java b/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/UITester.java
deleted file mode 100644
index 54517e800..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/UITester.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.eclipse.jem.util;
-/*******************************************************************************
- * 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
- *******************************************************************************/
-/*
- * $$RCSfile: UITester.java,v $$
- * $$Revision: 1.2 $$ $$Date: 2005/02/15 23:04:14 $$
- */
-/**
- * Interface for a UITester. The "classname" attribute on the "uiTester" extension point should implement this class.
- *
- * @since 1.0.0
- */
-public interface UITester {
-
- /**
- * Answer if the current context is an UI context.
- *
- * @return <code>true</code> if an UI context.
- *
- * @since 1.0.0
- */
- public boolean isCurrentContextUI();
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/EMFWorkbenchContextBase.java b/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/EMFWorkbenchContextBase.java
deleted file mode 100644
index bedff60f2..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/EMFWorkbenchContextBase.java
+++ /dev/null
@@ -1,193 +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
- *******************************************************************************/
-/*
- * $$RCSfile: EMFWorkbenchContextBase.java,v $$
- * $$Revision: 1.2 $$ $$Date: 2005/02/15 23:04:14 $$
- */
-package org.eclipse.jem.util.emf.workbench;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-
-import org.eclipse.jem.internal.util.emf.workbench.*;
-import org.eclipse.jem.internal.util.emf.workbench.nls.EMFWorkbenchResourceHandler;
-import org.eclipse.jem.util.plugin.JEMUtilPlugin;
-
-
-/**
- * ContextBase for EMFWorkbench.
- *
- * <p>
- * This is meant to be subclassed as needed for additional or override function. It will be instantiated by default.
- * </p>
- *
- * @since 1.0.0
- */
-public class EMFWorkbenchContextBase {
-
- protected IProject project;
-
- protected ProjectResourceSet resourceSet;
-
- /**
- * Construct with a project.
- *
- * @param aProject
- *
- * @since 1.0.0
- */
- public EMFWorkbenchContextBase(IProject aProject) {
- if (aProject == null)
- throw new IllegalArgumentException(EMFWorkbenchResourceHandler.getString("EMFWorkbenchContextBase_ERROR_1")); //$NON-NLS-1$
- project = aProject;
- }
-
- /**
- * Dispose of the context base.
- *
- *
- * @since 1.0.0
- */
- public void dispose() {
- if (resourceSet != null)
- resourceSet.release();
- resourceSet = null;
- project = null;
- }
-
- /**
- * Get the project this context is associated with.
- *
- * @return project
- *
- * @since 1.0.0
- */
- public IProject getProject() {
- return project;
- }
-
- /**
- * Return the resource set (creating if needed) for context.
- *
- * @return resource set
- *
- * @since 1.0.0
- */
- public ProjectResourceSet getResourceSet() {
- if (resourceSet == null) {
- resourceSet = createResourceSet();
- initializeResourceSet(resourceSet);
- }
- return resourceSet;
- }
-
- /**
- * Used for optimization; answer whether a resourceSet has been created
- *
- * @return <code>true</code> if a resource set has been created.
- *
- * @since 1.0.0
- */
- public boolean hasResourceSet() {
- return resourceSet != null;
- }
-
- /**
- * Initialize the resource set.
- *
- * @param aResourceSet
- *
- * @since 1.0.0
- */
- protected void initializeResourceSet(ProjectResourceSet aResourceSet) {
- createResourceSetSynchronizer(aResourceSet);
- aResourceSet.setURIConverter(createURIConverter(aResourceSet));
- aResourceSet.add(new WorkspaceResourceHandler());
- JEMUtilPlugin.getDefault().addExtendedResourceHandlers(aResourceSet);
-
- }
-
- /**
- * Create the resource set. By default it is a ProjectResourceSetImpl.
- *
- * @return project's new resource set.
- *
- * @since 1.0.0
- */
- protected ProjectResourceSet createResourceSet() {
- if (project == null)
- throw new IllegalStateException(EMFWorkbenchResourceHandler.getString("EMFWorkbenchContextBase_ERROR_2")); //$NON-NLS-1$
- return new ProjectResourceSetImpl(project);
- }
-
- /**
- * Create a URIConverter for the resource set.
- *
- * @param aResourceSet
- * @return a uri converter.
- *
- * @since 1.0.0
- */
- protected WorkbenchURIConverter createURIConverter(ProjectResourceSet aResourceSet) {
- return new WorkbenchURIConverterImpl(getProject(), aResourceSet.getSynchronizer());
- }
-
- /**
- * Create a resource set workbench synchronizer.
- *
- * @param aResourceSet
- * @return a resource set workbench synchronizer.
- *
- * @since 1.0.0
- */
- protected ResourceSetWorkbenchSynchronizer createResourceSetSynchronizer(ProjectResourceSet aResourceSet) {
- return EMFWorkbenchContextFactory.INSTANCE.createSynchronizer(aResourceSet, getProject());
- }
-
- /**
- * Delete the resource from the workspace.
- *
- * @param aResource
- * @throws CoreException
- *
- * @since 1.0.0
- */
- public void deleteResource(Resource aResource) throws CoreException {
- if (aResource != null)
- deleteFile(aResource);
- }
-
- /**
- * Delete the file associated with the resource.
- *
- * @param resource
- *
- * @since 1.0.0
- */
- public void deleteFile(Resource resource) {
- throw new UnsupportedOperationException(EMFWorkbenchResourceHandler.getString("EMFWorkbenchContextBase_ERROR_0")); //$NON-NLS-1$
- }
-
- /**
- * Get resource (with the given URI) from the project resource set. Load it if not already loaded.
- *
- * @param uri
- * @return resource for the uri, or <code>null</code> if not found.
- *
- * @since 1.0.0
- */
- public Resource getResource(URI uri) {
- return this.resourceSet.getResource(uri, true);
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/IEMFContextContributor.java b/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/IEMFContextContributor.java
deleted file mode 100644
index 465d7fa0c..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/IEMFContextContributor.java
+++ /dev/null
@@ -1,46 +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
- *******************************************************************************/
-/*
- * $$RCSfile: IEMFContextContributor.java,v $$
- * $$Revision: 1.2 $$ $$Date: 2005/02/15 23:04:14 $$
- */
-
-package org.eclipse.jem.util.emf.workbench;
-
-/**
- * EMF Context Contributor interface. Implimenters are called to contribute to the context.
- *
- * @see org.eclipse.jem.util.emf.workbench.WorkbenchResourceHelperBase#createEMFContext(IProject, IEMFContextContributor)
- * @since 1.0.0
- */
-public interface IEMFContextContributor {
-
- /**
- * This is your opportunity to add a primary EMFNature. Typically you would add to the WorkbenchContext held by <code>aNature</code> in order to
- * change the container for the WorkbenchURIConverter or add adapter factories to the ResourceSet or anything else that is needed.
- *
- * @param aNature
- *
- * @since 1.0.0
- */
- void primaryContributeToContext(EMFWorkbenchContextBase aNature);
-
- /**
- * This is your opportunity to add a secondary EMFNature. Typically you would add to the WorkbenchContext held by <code>aNature</code> in order
- * to change the container for the WorkbenchURIConverter or add adapter factories to the ResourceSet or anything else that is needed.
- *
- * @param aNature
- *
- * @since 1.0.0
- */
- void secondaryContributeToContext(EMFWorkbenchContextBase aNature);
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/ISynchronizerExtender.java b/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/ISynchronizerExtender.java
deleted file mode 100644
index f70dd1e78..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/ISynchronizerExtender.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
- *******************************************************************************/
-/*
- * $$RCSfile: ISynchronizerExtender.java,v $$
- * $$Revision: 1.2 $$ $$Date: 2005/02/15 23:04:14 $$
- */
-package org.eclipse.jem.util.emf.workbench;
-
-import org.eclipse.core.resources.IResourceDelta;
-
-/**
- * Implimenters allows clients, eg {@link org.eclipse.jem.util.emf.workbench.EMFNatureContributor}, to extend the behavior of the
- * ResourceSetWorkbenchSynchronizer.
- *
- * @see org.eclipse.jem.util.emf.workbench.ResourceSetWorkbenchSynchronizer#addExtender(ISynchronizerExtender)
- * @since 1.0.0
- */
-public interface ISynchronizerExtender {
-
- /**
- * Notification that project has changed.
- *
- * @param delta
- *
- * @since 1.0.0
- */
- void projectChanged(IResourceDelta delta);
-
- /**
- * Notification that project has been closed.
- *
- *
- * @since 1.0.0
- */
- void projectClosed();
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/ProjectResourceSet.java b/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/ProjectResourceSet.java
deleted file mode 100644
index 68c9735d2..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/ProjectResourceSet.java
+++ /dev/null
@@ -1,117 +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
- *******************************************************************************/
-/*
- * $$RCSfile: ProjectResourceSet.java,v $$
- * $$Revision: 1.3 $$ $$Date: 2005/02/15 23:04:14 $$
- */
-package org.eclipse.jem.util.emf.workbench;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-
-/**
- * A ResourceSet for an entire project. It allows sharing of resources from multiple editors/viewers for a project.
- * <p>
- * An additional Notification type is sent out by ProjectResourceSet's of project resource set about to be released. A release is
- * called when projects are about to be closed. They release all of the resources and unload them. This notification can be used
- * to know that this is about to happen and to do something before the resources become invalid. It will be sent out just before the
- * resource set will be released.
- *
- * @see ProjectResourceSet#SPECIAL_NOTIFICATION_TYPE
- * @see ProjectResourceSet#PROJECTRESOURCESET_ABOUT_TO_RELEASE_ID
- * @since 1.0.0
- */
-
-public interface ProjectResourceSet extends ResourceSet {
-
- IProject getProject();
-
- /**
- * Notification type in notifications from the ProjectResourceSet for
- * special notifications, and not the standard ones from ResourceSet.
- *
- * @see org.eclipse.emf.common.notify.Notification#getEventType()
- * @since 1.1.0
- */
- static int SPECIAL_NOTIFICATION_TYPE = Notification.EVENT_TYPE_COUNT+4;
-
- /**
- * Notification Feature ID for resource set about to be released.
- * Use {@link org.eclipse.emf.common.notify.Notification#getFeatureID(java.lang.Class)} to
- * get this id. The getFeature() on notification will return null.
- *
- * @since 1.1.0
- */
- static int PROJECTRESOURCESET_ABOUT_TO_RELEASE_ID = 1000;
-
- /**
- * Call when the ResourceSet is no longer to be used.
- *
- *
- * @since 1.0.0
- */
- void release();
-
- /**
- * Add the <code>resourceHandler</code> to the end of the list of resourceHandlers.
- *
- * @param resourceHandler
- * IResourceHandler
- * @return boolean Return <code>true</code> if it was added.
- * @since 1.0.0
- */
- boolean add(ResourceHandler resourceHandler);
-
- /**
- * Add the <code>resourceHandler</code> to the front of the list of resourceHandlers.
- *
- * @param resourceHandler
- * IResourceHandler
- * @since 1.0.0
- */
- void addFirst(ResourceHandler resourceHandler);
-
- /**
- * Remove the <code>resourceHandler</code> from the list of resourceHandlers.
- *
- * @param resourceHandler
- * IResourceHandler
- * @return boolean Return true if it was removed.
- * @since 1.0.0
- */
- boolean remove(ResourceHandler resourceHandler);
-
- /**
- * Return the ResourceSet synchronizer that will synchronize the ResourceSet with changes from the Workbench.
- *
- * @return ResourceSetWorkbenchSynchronizer
- * @since 1.0.0
- */
- ResourceSetWorkbenchSynchronizer getSynchronizer();
-
- /**
- * Set the ResourceSet synchronizer that will synchronize the ResourceSet with changes from the Workbench.
- *
- * @param aSynchronizer
- * @return ResourceSetWorkbenchSynchronizer
- * @since 1.0.0
- */
- void setSynchronizer(ResourceSetWorkbenchSynchronizer aSynchronizer);
-
- /**
- * This should be called by clients whenever the structure of the project changes such that any cached URIs will be invalid. For example, if the
- * source folders within the URIConverter change.
- *
- * @since 1.0.0
- */
- void resetNormalizedURICache();
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/ProjectUtilities.java b/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/ProjectUtilities.java
deleted file mode 100644
index b339d880a..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/ProjectUtilities.java
+++ /dev/null
@@ -1,754 +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
- *******************************************************************************/
-/*
- * $$RCSfile: ProjectUtilities.java,v $$
- * $$Revision: 1.4 $$ $$Date: 2005/05/11 19:01:24 $$
- */
-
-package org.eclipse.jem.util.emf.workbench;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.*;
-import java.util.logging.Level;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.*;
-
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jem.util.plugin.JEMUtilPlugin;
-
-
-/**
- * EMF Workbench Project Utilities.
- *
- * @since 1.0.0
- */
-
-public class ProjectUtilities {
-
- /**
- * Project control file name in project.
- *
- * @since 1.0.0
- */
- public final static String DOT_PROJECT = ".project"; //$NON-NLS-1$
-
- /**
- * Classpath control file name in project.
- *
- * @since 1.0.0
- */
- public final static String DOT_CLASSPATH = ".classpath"; //$NON-NLS-1$
-
- public ProjectUtilities() {
- }
-
- /**
- * Add the nature id to the project ahead of all other nature ids.
- *
- * @param proj
- * @param natureId
- * @throws CoreException
- *
- * @since 1.0.0
- */
- public static void addNatureToProject(IProject proj, String natureId) throws CoreException {
- IProjectDescription description = proj.getDescription();
- String[] prevNatures = description.getNatureIds();
- String[] newNatures = new String[prevNatures.length + 1];
- System.arraycopy(prevNatures, 0, newNatures, 1, prevNatures.length);
- newNatures[0] = natureId;
- description.setNatureIds(newNatures);
- proj.setDescription(description, null);
- }
-
- /**
- * Add the nature id after all of the other nature ids for the project.
- *
- * @param proj
- * @param natureId
- * @throws CoreException
- *
- * @since 1.0.0
- */
- public static void addNatureToProjectLast(IProject proj, String natureId) throws CoreException {
- IProjectDescription description = proj.getDescription();
- String[] prevNatures = description.getNatureIds();
- String[] newNatures = new String[prevNatures.length + 1];
- System.arraycopy(prevNatures, 0, newNatures, 0, prevNatures.length);
- newNatures[prevNatures.length] = natureId;
- description.setNatureIds(newNatures);
- proj.setDescription(description, null);
- }
-
- /**
- * Remove the nature id from the project.
- *
- * @param project
- * @param natureId
- * @throws CoreException
- *
- * @since 1.0.0
- */
- public static void removeNatureFromProject(IProject project, String natureId) throws CoreException {
- IProjectDescription description = project.getDescription();
- String[] prevNatures = description.getNatureIds();
- int size = prevNatures.length;
- int newsize = 0;
- String[] newNatures = new String[size];
- boolean matchfound = false;
- for (int i = 0; i < size; i++) {
- if (prevNatures[i].equals(natureId)) {
- matchfound = true;
- continue;
- } else
- newNatures[newsize++] = prevNatures[i];
- }
- if (!matchfound)
- throw new CoreException(new Status(IStatus.ERROR, JEMUtilPlugin.ID, 0,
- "The nature id " + natureId + " does not exist on the project " + project.getName(), null)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- else {
- String[] temp = newNatures;
- newNatures = new String[newsize];
- System.arraycopy(temp, 0, newNatures, 0, newsize);
- description.setNatureIds(newNatures);
- project.setDescription(description, null);
- }
- }
-
- /**
- * Add the list of projects to end of the "referenced projects" list from the project's description.
- *
- * @param project
- * @param toBeAddedProjectsList
- * @throws CoreException
- *
- * @since 1.0.0
- */
- public static void addReferenceProjects(IProject project, List toBeAddedProjectsList) throws CoreException {
-
- IProjectDescription description = project.getDescription();
- IProject[] projects = description.getReferencedProjects();
-
- ArrayList projectsList = new ArrayList();
-
- for (int i = 0; i < projects.length; i++) {
- projectsList.add(projects[i]);
- }
-
- for (int i = 0; i < toBeAddedProjectsList.size(); i++) {
- projectsList.add(toBeAddedProjectsList.get(i));
- }
-
- IProject[] refProjects = new IProject[projectsList.size()];
-
- for (int i = 0; i < refProjects.length; i++) {
- refProjects[i] = (IProject) (projectsList.get(i));
- }
-
- description.setReferencedProjects(refProjects);
- project.setDescription(description, null);
- }
-
- /**
- * Add the single project to the end of the "referenced projects" list from the project's description.
- *
- * @param project
- * @param projectToBeAdded
- * @throws CoreException
- *
- * @since 1.0.0
- */
- public static void addReferenceProjects(IProject project, IProject projectToBeAdded) throws CoreException {
- IProjectDescription description = project.getDescription();
- IProject[] projects = description.getReferencedProjects();
-
- ArrayList projectsList = new ArrayList();
-
- for (int i = 0; i < projects.length; i++) {
- projectsList.add(projects[i]);
- }
-
- projectsList.add(projectToBeAdded);
-
- IProject[] refProjects = new IProject[projectsList.size()];
-
- for (int i = 0; i < refProjects.length; i++) {
- refProjects[i] = (IProject) (projectsList.get(i));
- }
-
- description.setReferencedProjects(refProjects);
- project.setDescription(description, null);
- }
-
- /**
- * Force a an immediate build of the project.
- *
- * @param project
- * @param progressMonitor
- *
- * @since 1.0.0
- */
- public static void forceAutoBuild(IProject project, IProgressMonitor progressMonitor) {
- try {
- project.build(IncrementalProjectBuilder.FULL_BUILD, progressMonitor);
- } catch (CoreException ce) {
- //Revisit: Need to use a Logger
- //Logger.getLogger().logError(ce);
- }
- }
-
- /**
- * Return if auto build is turned on.
- *
- * @return <code>true</code> if auto build is turned on.
- *
- * @since 1.0.0
- */
- public static boolean getCurrentAutoBuildSetting() {
-
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- IWorkspaceDescription wd = workspace.getDescription();
- return wd.isAutoBuilding();
- }
-
- /**
- * Get the project associated with the given object.
- *
- * @param object
- * may be an <code>IProject, IResource, IAdaptable (to an IProject), EObject (gets IProject if object is in a ProjectResourceSet</code>.
- * @param natureId
- * if <code>null</code> then returns project. If not <code>null</code> then returns project only if project has this nature id.
- * @return project associated with the object or <code>null</code> if not found.
- *
- * @since 1.0.0
- */
- public static IProject getProject(Object object, String natureId) {
- IProject result = getProject(object);
- if (natureId == null)
- return result;
- if (result != null && result.isAccessible() && natureId != null)
- try {
- if (result.hasNature(natureId))
- return result;
- } catch (CoreException e) {
- Logger.getLogger().logError(e);
- }
- return null;
- }
-
- /**
- * Get the project associated with the given object.
- *
- * @param object
- * may be an <code>IProject, IResource, IAdaptable (to an IProject), EObject (gets IProject if object is in a ProjectResourceSet</code>.
- * @return project associated with the object or <code>null</code> if not found.
- *
- * @since 1.0.0
- */
- public static IProject getProject(Object object) {
- IProject result = null;
-
- if (object instanceof IProject)
- result = (IProject) object;
- else if (object instanceof IResource)
- result = ((IResource) object).getProject();
- else if (object instanceof IAdaptable)
- result = (IProject) ((IAdaptable) object).getAdapter(IProject.class);
- else if (object instanceof EObject)
- result = getProject((EObject) object);
-
- return result;
- }
-
- /**
- * Get the project associated with the given EObject. (If in a ProjectResourceSet, then the project from that resource set).
- *
- * @param aRefObject
- * @return project if associated or <code>null</code> if not found.
- *
- * @since 1.0.0
- */
- public static IProject getProject(EObject aRefObject) {
- if (aRefObject != null) {
- Resource resource = aRefObject.eResource();
- return getProject(resource);
- }
- return null;
- }
-
- /**
- * Get the project associated with the given Resource. (If in a ProjectResourceSet, then the project from that resource set).
- *
- * @param resource
- * @return project if associated or <code>null</code> if not found.
- *
- * @since 1.0.0
- */
- public static IProject getProject(Resource resource) {
- ResourceSet set = resource == null ? null : resource.getResourceSet();
- if (set instanceof ProjectResourceSet)
- return ((ProjectResourceSet) set).getProject();
- URIConverter converter = set == null ? null : set.getURIConverter();
- if (converter != null && converter instanceof WorkbenchURIConverter && ((WorkbenchURIConverter) converter).getOutputContainer() != null)
- return ((WorkbenchURIConverter) converter).getOutputContainer().getProject();
- else
- return null;
- }
-
- /**
- * Remove the list of projects from the list of "referenced projects" in the project's description.
- *
- * @param project
- * @param toBeRemovedProjectList
- * @throws org.eclipse.core.runtime.CoreException
- *
- * @since 1.0.0
- */
- public static void removeReferenceProjects(IProject project, List toBeRemovedProjectList) throws org.eclipse.core.runtime.CoreException {
- IProjectDescription description = project.getDescription();
- IProject[] projects = description.getReferencedProjects();
-
- ArrayList projectsList = new ArrayList();
-
- for (int i = 0; i < projects.length; i++) {
- projectsList.add(projects[i]);
- }
-
- for (int i = 0; i < toBeRemovedProjectList.size(); i++) {
- projectsList.remove(toBeRemovedProjectList.get(i));
- }
-
- IProject[] refProjects = new IProject[projectsList.size()];
-
- for (int i = 0; i < refProjects.length; i++) {
- refProjects[i] = (IProject) (projectsList.get(i));
- }
-
- description.setReferencedProjects(refProjects);
- project.setDescription(description, null);
- }
-
- /**
- * Remove the project from the list of "referenced projects" in the description for the given project.
- *
- * @param project
- * @param toBeRemovedProject
- * @throws org.eclipse.core.runtime.CoreException
- *
- * @since 1.0.0
- */
- public static void removeReferenceProjects(IProject project, IProject toBeRemovedProject) throws org.eclipse.core.runtime.CoreException {
- IProjectDescription description = project.getDescription();
- IProject[] projects = description.getReferencedProjects();
-
- ArrayList projectsList = new ArrayList();
-
- for (int i = 0; i < projects.length; i++) {
- projectsList.add((projects[i]));
- }
-
- projectsList.remove(toBeRemovedProject);
-
- IProject[] refProjects = new IProject[projectsList.size()];
-
- for (int i = 0; i < refProjects.length; i++) {
- refProjects[i] = (IProject) (projectsList.get(i));
- }
-
- description.setReferencedProjects(refProjects);
- project.setDescription(description, null);
- }
-
- /**
- * Turn auto-building off.
- *
- *
- * @since 1.0.0
- */
- public static void turnAutoBuildOff() {
- try {
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- IWorkspaceDescription wd = workspace.getDescription();
- wd.setAutoBuilding(false);
- workspace.setDescription(wd);
- } catch (CoreException ce) {
- //Logger.getLogger().logError(ce);
- }
- }
-
- /**
- * Turn auto-building on.
- *
- *
- * @since 1.0.0
- */
- public static void turnAutoBuildOn() {
- try {
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- IWorkspaceDescription wd = workspace.getDescription();
- wd.setAutoBuilding(true);
- workspace.setDescription(wd);
- } catch (CoreException ce) {
- //Logger.getLogger().logError(ce);
- }
- }
-
- /**
- * Set the auto-building state.
- *
- * @param aBoolean
- * <code>true</code> to turn auto-building on.
- *
- * @since 1.0.0
- */
- public static void turnAutoBuildOn(boolean aBoolean) {
- try {
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- IWorkspaceDescription wd = workspace.getDescription();
- wd.setAutoBuilding(aBoolean);
- workspace.setDescription(wd);
- } catch (CoreException ce) {
- //Logger.getLogger().logError(ce);
-
- }
- }
-
- /**
- * Adds a builder to the build spec for the given project.
- *
- * @param builderID
- * The id of the builder.
- * @param project
- * Project to add to.
- * @return whether the builder id was actually added (it may have already existed)
- * @throws CoreException
- * @since 1.0.0
- */
- public static boolean addToBuildSpec(String builderID, IProject project) throws CoreException {
- return addToBuildSpecBefore(builderID, null, project);
- }
-
- /**
- * Adds a builder to the build spec for the given project, immediately before the specified successor builder.
- *
- * @param builderID
- * The id of the builder.
- * @param successorID
- * The id to put the builder before.
- * @return whether the builder id was actually added (it may have already existed)
- * @throws CoreException
- * @since 1.0.0
- */
- public static boolean addToBuildSpecBefore(String builderID, String successorID, IProject project) throws CoreException {
- IProjectDescription description = project.getDescription();
- ICommand[] commands = description.getBuildSpec();
- boolean found = false;
- for (int i = 0; i < commands.length; ++i) {
- if (commands[i].getBuilderName().equals(builderID)) {
- found = true;
- break;
- }
- }
- if (!found) {
- boolean successorFound = false;
- ICommand command = description.newCommand();
- command.setBuilderName(builderID);
- ICommand[] newCommands = new ICommand[commands.length + 1];
- for (int j = 0, index = 0; j < commands.length; j++, index++) {
- if (successorID != null && commands[j].getBuilderName().equals(successorID)) {
- successorFound = true;
- newCommands[index++] = command;
- }
- newCommands[index] = commands[j];
- }
- if (!successorFound)
- newCommands[newCommands.length - 1] = command;
- description.setBuildSpec(newCommands);
- project.setDescription(description, null);
- }
- return !found;
- }
-
- /**
- * Remove the builder from the build spec.
- *
- * @param builderID
- * The id of the builder.
- * @param project
- * Project to remove from.
- * @return boolean if the builder id was found and removed
- * @throws CoreException
- * @since 1.0.0
- */
- public static boolean removeFromBuildSpec(String builderID, IProject project) throws CoreException {
- IProjectDescription description = project.getDescription();
- ICommand[] commands = description.getBuildSpec();
- boolean found = false;
- for (int i = 0; i < commands.length; ++i) {
- if (commands[i].getBuilderName().equals(builderID)) {
- found = true;
- break;
- }
- }
- if (found) {
- ICommand[] newCommands = new ICommand[commands.length - 1];
- int newCount = 0;
- for (int i = 0; i < commands.length; ++i) {
- if (!(commands[i].getBuilderName().equals(builderID))) {
- //Add the existng to the new array
- newCommands[newCount] = commands[i];
- newCount++;
- }
- }
-
- description.setBuildSpec(newCommands);
- project.setDescription(description, null);
-
- }
- return found;
-
- }
-
- /**
- * Ensure the container is not read-only.
- * <p>
- * For Linux, a Resource cannot be created in a ReadOnly folder. This is only necessary for new files.
- *
- * @param resource
- * workspace resource to make read/write
- * @since 1.0.0
- */
- public static void ensureContainerNotReadOnly(IResource resource) {
- if (resource != null && !resource.exists()) { //it must be new
- IContainer container = resource.getParent();
- ResourceAttributes attr = container.getResourceAttributes();
- while (attr != null && !attr.isReadOnly()) {
- container = container.getParent();
- if (container == null)
- break;
- attr = container.getResourceAttributes();
- }
- if (container != null && attr != null)
- attr.setReadOnly(false);
- }
- }
-
- /**
- * Get projects from primary nature.
- *
- * @param natureID
- * @return All projects that have the given nature id as the first nature id.
- *
- * @since 1.0.0
- */
- public static IProject[] getProjectsForPrimaryNature(String natureID) {
- IProject[] projectsWithNature = new IProject[] {};
- List result = new ArrayList();
- IProject[] projects = getAllProjects();
- for (int i = 0; i < projects.length; i++) {
- if (isProjectPrimaryNature(projects[i], natureID))
- result.add(projects[i]);
- }
- return (IProject[]) result.toArray(projectsWithNature);
- }
-
- /**
- * Get all projects in the workspace
- *
- * @return all workspace projects
- *
- * @since 1.0.0
- */
- public static IProject[] getAllProjects() {
- return ResourcesPlugin.getWorkspace().getRoot().getProjects();
- }
-
- /**
- * Is this nature id the primary nature id for the project
- *
- * @param project
- * @param natureID
- * @return <code>true</code> if first nature id for the project.
- *
- * @since 1.0.0
- */
- public static boolean isProjectPrimaryNature(IProject project, String natureID) {
- String[] natures = null;
- try {
- natures = project.getDescription().getNatureIds();
- } catch (Exception e1) {
- }
- return (natures != null && natures.length > 0 && natures[0].equals(natureID));
- }
-
- protected static IPath createPath(IProject p, String defaultSourceName) {
- IPath path = new Path(p.getName());
- path = path.append(defaultSourceName);
- path = path.makeAbsolute();
- return path;
- }
-
- /**
- * Returns a list of existing files which will be modified if the classpath changes for the given proeject.
- *
- * @param p
- * project
- * @return list of affected files.
- *
- * @since 1.0.0
- */
- public static List getFilesAffectedByClasspathChange(IProject p) {
- List result = new ArrayList(2);
- addFileIfExists(p, result, DOT_CLASSPATH);
- addFileIfExists(p, result, DOT_PROJECT);
- return result;
- }
-
- protected static void addFileIfExists(IProject p, List aList, String filename) {
- IFile aFile = p.getFile(filename);
- if (aFile != null && aFile.exists())
- aList.add(aFile);
- }
-
- /**
- * Strip off a leading "/" from each project name in the array, if it has one.
- *
- * @param projecNames
- * @return array of project names with all leading '/' removed.
- *
- * @since 1.0.0
- */
- public static String[] getProjectNamesWithoutForwardSlash(String[] projecNames) {
- String[] projNames = new String[projecNames.length];
- List temp = java.util.Arrays.asList(projecNames);
- for (int i = 0; i < temp.size(); i++) {
- String name = (String) (temp.get(i));
- if (name.startsWith("/")) { //$NON-NLS-1$
- projNames[i] = name.substring(1, name.length());
- } else {
- projNames[i] = name;
- }
- }
- return projNames;
- }
-
- protected static URL createFileURL(IPath path) {
- try {
- return path.toFile().toURL();
- } catch (MalformedURLException e) {
- Logger.getLogger().log(e, Level.WARNING);
- return null;
- }
- }
-
- /**
- * Find first newObject that is not in the oldObjects array (using "==").
- *
- * @param oldObjects
- * @param newObjects
- * @return first newObject not found in oldObjects, or <code>null</code> if all found.
- *
- * @since 1.0.0
- */
- public static Object getNewObject(Object[] oldObjects, Object[] newObjects) {
- if (oldObjects != null && newObjects != null && oldObjects.length < newObjects.length) {
- for (int i = 0; i < newObjects.length; i++) {
- boolean found = false;
- Object object = newObjects[i];
- for (int j = 0; j < oldObjects.length; j++) {
- if (oldObjects[j] == object) {
- found = true;
- break;
- }
- }
- if (!found)
- return object;
- }
- }
- if (oldObjects == null && newObjects != null && newObjects.length == 1)
- return newObjects[0];
- return null;
- }
-
- /**
- * List of all files in the project.
- * <p>
- * Note: A more efficient way to do this is to use {@link IResource#accept(org.eclipse.core.resources.IResourceProxyVisitor, int)}
- *
- * @param 1.0.0
- * @return list of files in the project
- *
- * @see IResource#accept(org.eclipse.core.resources.IResourceProxyVisitor, int)
- * @since 1.0.0
- */
- public static List getAllProjectFiles(IProject project) {
- List result = new ArrayList();
- if (project == null)
- return result;
- try {
- result = collectFiles(project.members(), result);
- } catch (CoreException e) {
- }
- return result;
- }
-
- private static List collectFiles(IResource[] members, List result) throws CoreException {
- // recursively collect files for the given members
- for (int i = 0; i < members.length; i++) {
- IResource res = members[i];
- if (res instanceof IFolder) {
- collectFiles(((IFolder) res).members(), result);
- } else if (res instanceof IFile) {
- result.add(res);
- }
- }
- return result;
- }
-
- /**
- * Get the project.
- *
- * @param projectName
- * @return a IProject given the projectName
- * @since 1.0.0
- */
- public static IProject getProject(String projectName) {
- return ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- }
-
- /**
- * Return whether the given builder name is attached to the project.
- *
- * @param project
- * @param builderName
- * @return <code>true</code> if builder name is attached to the project.
- *
- * @since 1.0.0
- */
- public static boolean hasBuilder(IProject project, String builderName) {
- try {
- ICommand[] builders = project.getDescription().getBuildSpec();
- for (int i = 0; i < builders.length; i++) {
- ICommand builder = builders[i];
- if (builder != null) {
- if (builder.getBuilderName().equals(builderName))
- return true;
- }
- }
- } catch (Exception e) {
- }
- return false;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/ResourceHandler.java b/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/ResourceHandler.java
deleted file mode 100644
index 0170780cc..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/ResourceHandler.java
+++ /dev/null
@@ -1,65 +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
- *******************************************************************************/
-/*
- * $$RCSfile: ResourceHandler.java,v $$
- * $$Revision: 1.2 $$ $$Date: 2005/02/15 23:04:14 $$
- */
-package org.eclipse.jem.util.emf.workbench;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-
-/**
- * Implementers of this interface are provide extension capabilities on resource set. Such as looking or creating in other resource sets for a
- * resource or an EObject.
- *
- * @see org.eclipse.jem.util.emf.workbench.ProjectResourceSet#add(ResourceHandler)
- * @since 1.0.0
- */
-public interface ResourceHandler {
-
- /**
- * Each ResourceHandler for a WorkbenchContext (which holds a ProjectResourceSet) will get an oportunity to get the Resource given the uriString
- * prior to the originatingResourceSet getting it in the normal manner.
- *
- * If this handler loaded a Resource in its create(ResourceSet, uriString) then this method should be able to return it as well.
- *
- * @param originatingResourceSet
- * @param uri
- * @return resource if found or <code>nulll/code> if this handler didn't find it.
- *
- * @since 1.0.0
- */
- Resource getResource(ResourceSet originatingResourceSet, URI uri);
-
- /**
- * Get the EObject for the given URI, if it can. Load the resource if loadOnDemand is <code>true</code>.
- *
- * @param originatingResourceSet
- * @param uri
- * uri of EObject being requested
- * @param loadOnDemand
- * <code>true</code> if resource should be loaded
- * @return eobject if found or <code>null</code> if not.
- */
- EObject getEObjectFailed(ResourceSet originatingResourceSet, URI uri, boolean loadOnDemand);
-
- /**
- * Create the resource pointed to be the URI if this handler will handle it.
- *
- * @param originatingResourceSet
- * @param uri
- * @return resource if created, or <code>null</code> if handler doesn't handle this type.
- */
- Resource createResource(ResourceSet originatingResourceSet, URI uri);
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/ResourceSetWorkbenchSynchronizer.java b/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/ResourceSetWorkbenchSynchronizer.java
deleted file mode 100644
index 1cec597f5..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/ResourceSetWorkbenchSynchronizer.java
+++ /dev/null
@@ -1,192 +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
- *******************************************************************************/
-/*
- * $$RCSfile: ResourceSetWorkbenchSynchronizer.java,v $$
- * $$Revision: 1.4 $$ $$Date: 2006/05/17 20:13:45 $$
- */
-
-package org.eclipse.jem.util.emf.workbench;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-
-import org.eclipse.jem.internal.util.emf.workbench.EMFWorkbenchContextFactory;
-import org.eclipse.jem.util.plugin.JEMUtilPlugin;
-
-
-/**
- * Synchronizer on the workbench. It listens for the project to see if it is closed or deleted. If it does it notifies this out.
- *
- * @since 1.0.0
- */
-public class ResourceSetWorkbenchSynchronizer implements IResourceChangeListener {
-
- protected IProject project;
-
- protected ResourceSet resourceSet;
-
- /** Extenders that will be notified after a pre build resource change */
- protected List extenders;
-
- /** The delta for this project that will be broadcast to the extenders */
- protected IResourceDelta currentProjectDelta;
-
- private int currentEventType = -1;
-
- /**
- * Constructor taking a resource set and project.
- *
- * @param aResourceSet
- * @param aProject
- *
- * @since 1.0.0
- */
- public ResourceSetWorkbenchSynchronizer(ResourceSet aResourceSet, IProject aProject) {
- resourceSet = aResourceSet;
- project = aProject;
- if (aResourceSet != null && aResourceSet instanceof ProjectResourceSet)
- ((ProjectResourceSet) aResourceSet).setSynchronizer(this);
- initialize();
- }
-
- /**
- * Get the project for this synchronizer
- *
- * @return project
- *
- * @since 1.0.0
- */
- public IProject getProject() {
- return project;
- }
-
- /*
- * @see IResourceChangeListener#resourceChanged(IResourceChangeEvent)
- */
- public void resourceChanged(IResourceChangeEvent event) {
- currentEventType = event.getType();
- currentProjectDelta = null;
- if ((currentEventType == IResourceChangeEvent.PRE_CLOSE || currentEventType == IResourceChangeEvent.PRE_DELETE)
- && event.getResource().equals(getProject())) {
- notifyExtendersOfClose();
- release();
- }
- }
-
-
- protected void notifyExtendersIfNecessary() {
- if (currentEventType != IResourceChangeEvent.POST_CHANGE || extenders == null || currentProjectDelta == null)
- return;
- for (int i = 0; i < extenders.size(); i++) {
- ISynchronizerExtender extender = (ISynchronizerExtender) extenders.get(i);
- extender.projectChanged(currentProjectDelta);
- }
- }
-
- protected void notifyExtendersOfClose() {
- if (extenders != null && !extenders.isEmpty()) {
- for (int i = 0; i < extenders.size(); i++) {
- ISynchronizerExtender extender = (ISynchronizerExtender) extenders.get(i);
- extender.projectClosed();
- }
- }
- }
-
- protected IWorkspace getWorkspace() {
- if (getProject() == null)
- return ResourcesPlugin.getWorkspace();
- return getProject().getWorkspace();
- }
-
- protected void initialize() {
- getWorkspace().addResourceChangeListener(this,
- IResourceChangeEvent.PRE_CLOSE | IResourceChangeEvent.PRE_DELETE | IResourceChangeEvent.POST_CHANGE | IResourceChangeEvent.PRE_BUILD);
- }
-
- /**
- * Dispose of the synchronizer. Called when no longer needed.
- *
- *
- * @since 1.0.0
- */
- public void dispose() {
- getWorkspace().removeResourceChangeListener(this);
- }
-
- /**
- * The project is going away so we need to cleanup ourself and the ResourceSet.
- */
- protected void release() {
- if (JEMUtilPlugin.isActivated()) {
- try {
- if (resourceSet instanceof ProjectResourceSet)
- ((ProjectResourceSet) resourceSet).release();
- } finally {
- EMFWorkbenchContextFactory.INSTANCE.removeCachedProject(getProject());
- dispose();
- }
- }
- }
-
- /**
- * Add an extender to be notified of events.
- *
- * @param extender
- *
- * @since 1.0.0
- */
- public void addExtender(ISynchronizerExtender extender) {
- if (extenders == null)
- extenders = new ArrayList(3);
- extenders.add(extender);
- }
-
- /**
- * Remove extender from notification of events.
- *
- * @param extender
- *
- * @since 1.0.0
- */
- public void removeExtender(ISynchronizerExtender extender) {
- if (extenders == null)
- return;
- extenders.remove(extender);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#toString()
- */
- public String toString() {
- return getClass().getName() + '(' + ((getProject() != null) ? getProject().getName() : "null") + ')'; //$NON-NLS-1$
- }
-
- /**
- * Tell Synchronizer that a file is about to be saved. This method should be called prior to writing to an IFile from an EMF resource.
- * <p>
- * Default does nothing, but subclasses can do something.
- * </p>
- *
- * @param aFile
- * file about to be saved.
- *
- * @since 1.0.0
- */
- public void preSave(IFile aFile) {
- //Default is do nothing
- }
-
-}
diff --git a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/WorkbenchByteArrayOutputStream.java b/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/WorkbenchByteArrayOutputStream.java
deleted file mode 100644
index 9d72f5141..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/WorkbenchByteArrayOutputStream.java
+++ /dev/null
@@ -1,148 +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
- *******************************************************************************/
-/*
- * $$RCSfile: WorkbenchByteArrayOutputStream.java,v $$
- * $$Revision: 1.2 $$ $$Date: 2005/02/15 23:04:14 $$
- */
-package org.eclipse.jem.util.emf.workbench;
-
-import java.io.IOException;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.emf.ecore.resource.impl.URIConverterImpl;
-
-/**
- * ByteArray OutputStream for the Workbench. It works with the synchronizer {@link org.eclipse.jem.util.emf.workbench.ResourceSetWorkbenchSynchronizer}to
- * notify of a save. It also changes all of the line separators to the current system line separator, i.e. if there are some '\r' and we are on
- * Windows(R) then they will be converted to '\n\r'), if the setting for the stream is to do eol conversion.
- *
- * @since 1.0.0
- */
-public class WorkbenchByteArrayOutputStream extends URIConverterImpl.PlatformResourceOutputStream {
-
- private boolean fConvertEOL = false;
-
- protected ResourceSetWorkbenchSynchronizer synchronizer;
-
- /**
- * Construct with an IFile
- *
- * @param aFile
- *
- * @since 1.0.0
- */
- public WorkbenchByteArrayOutputStream(IFile aFile) {
- this(aFile, null);
- }
-
- /**
- * Construct with a IFile and a synchronizer. This way synchronizer will know when file is about to be saved.
- *
- * @param aFile
- * @param aSynchronizer
- *
- * @since 1.0.0
- */
- public WorkbenchByteArrayOutputStream(IFile aFile, ResourceSetWorkbenchSynchronizer aSynchronizer) {
- super(aFile, false, true, null);
- synchronizer = aSynchronizer;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.io.OutputStream#close()
- */
- public void close() throws IOException {
- if (synchronizer != null)
- synchronizer.preSave(file);
- super.close();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.ecore.resource.impl.URIConverterImpl.PlatformResourceOutputStream#flush()
- */
- public void flush() throws IOException {
- if (synchronizer != null)
- synchronizer.preSave(file);
- super.flush();
- }
-
- /*
- * Convert the end of line characters.
- */
- private int convertEOL(byte[] data) {
- // Algorithm:
- // Remove all '\r' chars
- // Replace all '\n' chars with line seperator chars
-
- String EOL = System.getProperties().getProperty("line.separator"); //$NON-NLS-1$
- byte[] EOLBytes = EOL.getBytes();
-
- int out = 0;
-
- for (int in = 0; in < data.length; in++) {
- if (data[in] == '\r') {
- // don't output (ie, throw the char away)
- } else if (data[in] == '\n') {
- // The code does not currently handle expanding the array
- if ((in - out + 1) < EOLBytes.length)
- throw new UnsupportedOperationException("WorkbenchByteArrayOutputStream: Expanding EOL chars not implemented"); //$NON-NLS-1$
-
- for (int i = 0; i < EOLBytes.length; i++) {
- data[out++] = EOLBytes[i];
- }
- } else {
- // Just copy the data
- data[out++] = data[in];
- }
- }
-
- return out;
- }
-
- /**
- * Is EOL conversion turned on.
- *
- * @return <code>true</code> if EOL conversion is turned on.
- *
- * @since 1.0.0
- */
- public boolean isConvertEOLChars() {
- return fConvertEOL;
- }
-
- /**
- * Set the EOL conversion flag.
- *
- * @param set
- * <code>true</code> if EOL should be converted to current line separator.
- *
- * @since 1.0.0
- */
- public void setConvertEOLChars(boolean set) {
- fConvertEOL = set;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.io.ByteArrayOutputStream#toByteArray()
- */
- public synchronized byte[] toByteArray() {
- byte[] contents = super.toByteArray();
- if (isConvertEOLChars())
- convertEOL(contents);
- return contents;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/WorkbenchResourceHelperBase.java b/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/WorkbenchResourceHelperBase.java
deleted file mode 100644
index 27bb8f13e..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/WorkbenchResourceHelperBase.java
+++ /dev/null
@@ -1,694 +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
- *******************************************************************************/
-/*
- * $$RCSfile: WorkbenchResourceHelperBase.java,v $$
- * $$Revision: 1.5 $$ $$Date: 2006/08/09 15:40:22 $$
- */
-package org.eclipse.jem.util.emf.workbench;
-
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.common.util.WrappedException;
-import org.eclipse.emf.ecore.*;
-import org.eclipse.emf.ecore.resource.*;
-import org.eclipse.emf.ecore.util.InternalEList;
-
-import org.eclipse.jem.internal.util.emf.workbench.EMFWorkbenchContextFactory;
-import org.eclipse.jem.internal.util.emf.workbench.WorkspaceResourceHandler;
-import org.eclipse.jem.util.plugin.JEMUtilPlugin;
-
-
-/**
- * Workbench resource helper
- *
- * @since 1.0.0
- */
-public class WorkbenchResourceHelperBase {
-
- /**
- * Everything is static, don't know why there is an instance here.
- */
- public static final WorkbenchResourceHelperBase INSTANCE = new WorkbenchResourceHelperBase();
-
- protected static WorkspaceResourceHandler workspaceURILoader = new WorkspaceResourceHandler();
-
- protected static void resolveContainedProxies(EObject refObject) {
- List contained = refObject.eContents();
- EObject mofObject;
- for (int i = 0; i < contained.size(); i++) {
- mofObject = (EObject) contained.get(i);
- resolveProxies(mofObject);
- }
- }
-
- protected static void resolveNonContainedProxies(EObject refObject) {
- List references = refObject.eClass().getEAllReferences();
- EReference reference;
- for (int i = 0; i < references.size(); i++) {
- reference = (EReference) references.get(i);
- if (!reference.isContainment()) {
- if (reference.isMany()) {
- List value = (List) refObject.eGet(reference);
- for (int j = 0; j < value.size(); j++)
- value.get(j);
- } else {
- refObject.eGet(reference);
- }
- }
- }
- }
-
- /**
- * Force all of the proxies with <code>resource</code> to be resolved.
- *
- * @param resource
- *
- * @since 1.0.0
- */
- public static void resolveProxies(Resource resource) {
- if (resource != null) {
- List topLevels = resource.getContents();
- EObject mofObject;
- for (int i = 0; i < topLevels.size(); i++) {
- mofObject = (EObject) topLevels.get(i);
- resolveProxies(mofObject);
- }
- }
- }
-
- /**
- * Return a List of proxies that are contained by the <code>resource</code>.
- *
- * @param resource
- * @return list of proxies.
- *
- * @since 1.0.0
- */
- public static List gatherProxies(Resource resource) {
- if (resource == null)
- return Collections.EMPTY_LIST;
- List list = new ArrayList();
- List topLevels = resource.getContents();
- int size = topLevels.size();
- EObject mofObject;
- for (int i = 0; i < size; i++) {
- mofObject = (EObject) topLevels.get(i);
- gatherProxies((InternalEObject) mofObject, list);
- }
- return list;
- }
-
- protected static void gatherProxies(InternalEObject refObject, List proxies) {
- if (refObject == null)
- return;
- List contains = refObject.eClass().getEAllContainments();
- if (contains != null) {
- int size = contains.size();
- EStructuralFeature sf = null;
- for (int i = 0; i < size; i++) {
- sf = (EStructuralFeature) contains.get(i);
- gatherProxies(refObject, sf, proxies);
- }
- }
- }
-
- protected static void gatherProxies(InternalEObject refObject, EStructuralFeature sf, List proxies) {
- Object value = null;
- InternalEObject proxy = null;
- if (sf.isMany() || refObject.eIsSet(sf)) {
- value = refObject.eGet(sf, false);
- if (value != null) {
- if (sf.isMany()) {
- Iterator j = ((InternalEList) value).basicIterator();
- while (j.hasNext()) {
- proxy = (InternalEObject) j.next();
- if (proxy.eIsProxy())
- proxies.add(proxy);
- }
- } else if (((InternalEObject) value).eIsProxy())
- proxies.add(value);
- }
- }
- }
-
- protected static void resolveProxies(EObject refObject) {
- if (refObject != null) {
- resolveNonContainedProxies(refObject);
- resolveContainedProxies(refObject);
- }
- }
-
- /**
- * Return an existing context base on <code>aProject</code>.
- *
- * @param aProject
- * @return the context base for the project or <code>null</code> if none.
- *
- * @since 1.0.0
- */
- public static EMFWorkbenchContextBase getEMFContext(IProject aProject) {
- return EMFWorkbenchContextFactory.INSTANCE.getEMFContext(aProject);
- }
-
- /**
- * Create a resource from the URI. The URI must contain the project name, either as the first segment, or if in platform resource url protocol.
- * {@link #getResourceSet(URI)}
- *
- * @param uri
- * @return a new resource for the uri or <code>null</code> if not a project uri
- *
- * @since 1.0.0
- */
- public static Resource createResource(URI uri) {
- ResourceSet set = getResourceSet(uri);
- if (set != null)
- return set.createResource(uri);
- return null;
- }
-
- /**
- * Check for a cached Resource for the given URI, if none is found, create a new Resource for with the URI against the proper ResourceSet.
- *
- * @param uri The URI MUST be either a "<b>platform:/resource/</b>project-name/...." type URI or it
- * must be of type "project-name/...". This method will only return resources that are workbench project resources.
- * Any other type of URI will cause <code>null</code> to be returned.
- * @return resource or <code>null</code> if not a project uri.
- *
- * @since 1.0.0
- */
- public static Resource getExistingOrCreateResource(URI uri) {
- return getExistingOrCreateResource(uri, getResourceSet(uri));
- }
-
- /**
- * Get the IFile for the URI. The URI must be a workbench project style URI.
- * @param uri The URI MUST be either a "<b>platform:/resource/</b>project-name/...." type URI or it
- * must be of type "project-name/...". This method will only return resources that are workbench project resources.
- * Any other type of URI will cause <code>null</code> to be returned.
- * @return the IFile if the URI is a project form, <code>null</code> if not a project form, OR the project doesn't exist. The IFile returned doesn't necessarily exist. Use {@link IFile#exists()} to test that.
- *
- * @since 1.2.0
- */
- public static IFile getIFile(URI uri) {
- IProject project = getProject(uri);
- if (project != null) {
- IPath path;
- if (isPlatformResourceURI(uri)) {
- // Need to get the path and remove the first two segments (/resource/project name/).
- path = new Path(URI.decode(uri.path())).removeFirstSegments(2);
- } else {
- // Need to get the path and remove the first segment (/project name/).
- path = new Path(URI.decode(uri.path())).removeFirstSegments(1);
- }
- return project.getFile(path);
- } else
- return null;
- }
-
- /**
- * Check for a cached Resource for the given URI, if none is found, create a new Resource for with the URI against the given ResourceSet.
- *
- * @param uri
- * @param set
- * @return resource or <code>null</code> if set was <code>null</code>.
- *
- * @since 1.0.0
- */
- public static Resource getExistingOrCreateResource(URI uri, ResourceSet set) {
- if (set != null) {
- Resource res = set.getResource(uri, false);
- if (res == null)
- res = set.createResource(uri);
- return res;
- } else
- return null;
- }
-
- /**
- * Return a new or existing context base on <code>aProject</code>. Allow the <code>contributor</code> to contribute to the new or existing
- * nature prior to returning.
- *
- * @param aProject
- * @param contributor
- * @return the context base for the project.
- *
- * @since 1.0.0
- */
- public static EMFWorkbenchContextBase createEMFContext(IProject aProject, IEMFContextContributor contributor) {
- return EMFWorkbenchContextFactory.INSTANCE.createEMFContext(aProject, contributor);
- }
-
- /**
- * Does the passed URI have the form platform:/resource/... ?
- *
- * @param uri
- * @return <code>true</code> if it is a platform resource protocol.
- *
- * @since 1.0.0
- */
- public static boolean isPlatformResourceURI(URI uri) {
- return JEMUtilPlugin.PLATFORM_PROTOCOL.equals(uri.scheme()) && JEMUtilPlugin.PLATFORM_RESOURCE.equals(uri.segment(0));
- }
-
- /**
- * This api may be used to cache a Resource if it has a URI that is Workspace relative. Return true if it is cached.
- *
- * @param aResource
- * @return <code>true</code> if it was successful to cache.
- *
- * @since 1.0.0
- */
- public static boolean cacheResource(Resource aResource) {
- if (aResource != null) {
- ResourceSet set = getResourceSet(aResource.getURI());
- if (set != null)
- return set.getResources().add(aResource);
- }
- return false;
- }
-
- /**
- * This api is used if you create a new MOF resource and you want to add it to the correct ResourceSet. In order to do that, we need the IProject
- * that you want aResource to be cached within as well as the IPath which is the full path of the location of the new Resource.
- *
- * @param aProject
- * @param aResource
- * @param fullPath
- * @return <code>true</code> if resource was cached.
- *
- * @since 1.0.0
- */
- public static boolean cacheResource(IProject aProject, Resource aResource, IPath fullPath) {
- if (aProject == null || aResource == null || !aProject.isAccessible())
- return false;
- ResourceSet set = getResourceSet(aProject);
- if (set != null) {
- URI converted = set.getURIConverter().normalize(aResource.getURI());
- if (converted != aResource.getURI())
- aResource.setURI(converted);
- return set.getResources().add(aResource);
- }
- return false;
- }
-
- /**
- * Get the path of the project resource relative to the workspace or relative to the list of containers in this project.
- *
- * @param aResource
- * @return path
- *
- * @since 1.0.0
- */
- public static String getActualProjectRelativeURI(IResource aResource) {
- if (aResource == null || !aResource.isAccessible())
- return null;
- IProject project = aResource.getProject();
- IPath path = getPathInProject(project, aResource.getFullPath());
- return path.makeRelative().toString();
- }
-
- /**
- * Return an IPath that can be used to load a Resource using the <code>fullPath</code>. This will be a project relative path.
- *
- * @param project
- * @param fullPath
- * @return path
- *
- * @since 1.0.0
- */
- public static IPath getPathInProject(IProject project, IPath fullPath) {
- List containers = getProjectURIConverterContainers(project);
- if (!containers.isEmpty())
- return getPathFromContainers(containers, fullPath);
- return fullPath;
- }
-
- protected static List getProjectURIConverterContainers(IProject project) {
- EMFWorkbenchContextBase nature = createEMFContext(project, null);
- if (nature != null) {
- WorkbenchURIConverter conv = (WorkbenchURIConverter) nature.getResourceSet().getURIConverter();
- if (conv != null)
- return conv.getInputContainers();
- }
- return Collections.EMPTY_LIST;
- }
-
- /**
- * If this path is contained within one of the listed containers, then return the path relative to the container.
- *
- * @param containers
- * @param fullPath
- * @return path relative to a container, or unchanged path if not in a container.
- *
- * @since 1.0.0
- */
- public static IPath getPathFromContainers(List containers, IPath fullPath) {
- IContainer container = null;
- IPath result;
- int size = containers.size();
- int matching = -1;
- IPath containerPath;
- for (int i = 0; i < size; i++) {
- container = (IContainer) containers.get(i);
- containerPath = container.getFullPath();
- matching = fullPath.matchingFirstSegments(containerPath);
- if (matching > 0 && matching == containerPath.segmentCount()) {
- result = fullPath.removeFirstSegments(matching);
- result = result.makeRelative();
- return result;
- }
- }
- return fullPath;
- }
-
- /**
- * Return true if the <code>uri</code> has its container segments visible from the input containers for the <code>project</code>.
- *
- * @param project
- * @param uri
- * @return <code>true</code> if the uri is visible from the input containers.
- *
- * @since 1.0.0
- */
- public static boolean hasContainerStructure(IProject project, URI uri) {
- if (project != null && uri != null) {
- IPath path = new Path(uri.toString());
- List containers = getProjectURIConverterContainers(project);
- int segmentCount = path.segmentCount();
- IPath containerPath = segmentCount > 1 ? path.removeLastSegments(1) : null;
- IContainer container = null;
- for (int i = 0; i < containers.size(); i++) {
- container = (IContainer) containers.get(i);
- if (!container.isAccessible())
- continue;
- if (segmentCount == 1) {
- if (container == project)
- return true;
- } else if (containerPath != null) {
- IFolder folder = container.getFolder(containerPath);
- if (folder != null && folder.isAccessible())
- return true;
- }
- }
- }
- return false;
- }
-
- /**
- * Get the resource for the uri. The URI MUST be either a "<b>platform:/resource/</b>project-name/...." type URI or it
- * must be of type "project-name/...". This method will only return resources that are workbench project resources.
- * Any other type of URI will cause <code>null</code> to be returned. It will be loaded if not already loaded. If it is not to
- * be loaded if not loaded use {@link #getResource(URI, boolean)} instead.
- *
- * @param uri must be either a "<b>platform:/resource/</b>project-name/..." form or it must be "project-name/...". Any other form will be invalid.
- * @return resource if uri is for a valid workbench project resource or <code>null</code> if project not found or not a valid project resource.
- *
- * @throws WrappedException if valid project format URI but file not found or some other error on load.
- * @since 1.0.0
- */
- public static Resource getResource(URI uri) {
- return getResource(uri, true);
- }
-
- /**
- * Return the Resource for the passed IFile without forcing a load.
- *
- * @param aFile
- * @return
- *
- * @since 1.0.0
- */
- public static Resource getResource(IFile aFile) {
- return getResource(aFile, false);
- }
-
- /**
- * Return the Resource for the passed IFile, forcing a load if <code>loadOnDemand</code> says so.
- *
- * @param aFile
- * @param loadOnDemand
- * <code>true</code> will force a load of resource if not loaded.
- * @return
- *
- * @since 1.0.0
- */
- public static Resource getResource(IFile aFile, boolean loadOnDemand) {
- if (aFile != null)
- return getResource(URI.createPlatformResourceURI(aFile.getFullPath().toString()), loadOnDemand);
- return null;
- }
-
- /**
- * Return the Resource for the passed IFile without a load if not loaded.
- *
- * @param aFile
- * @return
- *
- * @since 1.0.0
- */
- public static Resource load(IFile aFile) {
- return getResource(aFile, true);
- }
-
- /**
- * Get the resource for the uri. The URI MUST be either a "<b>platform:/resource/</b>project-name/...." type URI or it
- * must be of type "project-name/...". This method will only return resources that are workbench project resources.
- * Any other type of URI will cause <code>null</code> to be returned.
- *
- * @param uri must be either a "<b>platform:/resource/</b>project-name/..." form or it must be "project-name/...". Any other form will be invalid.
- * @param loadOnDemand <code>true</code> will cause resource to be loaded if not already loaded.
- * @return resource if uri is for a valid workbench project resource, or <code>null</code> if project not found, or not a valid project resource uri.
- *
- * @throws WrappedException if valid project format URI but file not found or some other error on load if loadOnDemand is true.
- * @since 1.0.0
- */
- public static Resource getResource(URI uri, boolean loadOnDemand) {
- ResourceSet set = getResourceSet(uri);
- if (set != null)
- return set.getResource(uri, loadOnDemand);
- return null;
- }
-
- /**
- * Return a ResourceSet for the passed URI. The URI should be in the format platform:/resource/{project name}/... or {project name}/... for this
- * api to work.
- *
- * @param uri
- * @return the resource set or <code>null</code> if not of correct form or project doesn't have a resource set.
- *
- * @since 1.0.0
- */
- public static ResourceSet getResourceSet(URI uri) {
- IProject project = getProject(uri);
- if (project != null && project.isAccessible())
- return getResourceSet(project);
- else
- return null;
- }
-
- /*
- * Get the project for the uri if the uri is a valid workbench project format uri. null otherwise.
- */
- private static IProject getProject(URI uri) {
- String projectName;
- if (isPlatformResourceURI(uri))
- projectName = uri.segment(1);
- else if (uri.scheme() == null) {
- projectName = new Path(uri.path()).segment(0); //assume project name is first in the URI
- } else
- return null;
- IProject project = getWorkspace().getRoot().getProject(URI.decode(projectName));
- if (project != null && project.isAccessible())
- return project;
- else
- return null;
- }
-
- /**
- * Return the ResourceSet for the passed IProject.
- *
- * @param project
- * @return resource set
- */
- public static ResourceSet getResourceSet(IProject project) {
- EMFWorkbenchContextBase nat = createEMFContext(project, null);
- if (nat != null)
- return nat.getResourceSet();
- return null;
- }
-
- /**
- * Get the workspace. (just use {@link ResourcesPlugin#getWorkspace()}).
- *
- * @return
- *
- * @since 1.0.0
- */
- public static IWorkspace getWorkspace() {
- return ResourcesPlugin.getWorkspace();
- }
-
- /**
- * Get the project associated with the resource set.
- *
- * @param set
- * @return project or <code>null</code> if resource set not associated with a project.
- *
- * @since 1.0.0
- */
- public static IProject getProject(ResourceSet set) {
- if (set != null) {
- if (set instanceof ProjectResourceSet) {
- ProjectResourceSet pset = (ProjectResourceSet) set;
- return pset.getProject();
- }
- }
- return null;
- }
-
- protected static boolean isRegisteredURIMapping(String href) {
- if (href != null) {
- String file = href;
- int index = href.indexOf('#');
- if (index > -1)
- file = href.substring(0, index);
- return URIConverter.URI_MAP.get(file) != null;
- }
- return false;
- }
-
- /**
- * Remove all of the resources from the resource set and then unload them. Unload forces all of the objects to become proxies so next resolve will
- * reload the resource.
- *
- * @param resources
- * @param aSet
- *
- * @since 1.0.0
- */
- public static void removeAndUnloadAll(List resources, ResourceSet aSet) {
- if (aSet == null || resources == null || resources.isEmpty())
- return;
- aSet.getResources().removeAll(resources);
- Resource res;
- for (int i = 0; i < resources.size(); i++) {
- res = (Resource) resources.get(i);
- res.unload();
- }
- }
-
- /**
- * Turn object into a proxy.
- *
- * @param anObject
- * @return <code>true</code> if object was able to become a proxy.
- *
- * @since 1.0.0
- */
- public static boolean becomeProxy(EObject anObject) {
- if (anObject != null) {
- Resource res = anObject.eResource();
- if (res != null) {
- URI uri = res.getURI();
- ((InternalEObject) anObject).eSetProxyURI(uri.appendFragment(res.getURIFragment(anObject)));
- //anObject.eAdapters().clear();
- return true;
- }
- }
- return false;
- }
-
- /**
- * Return true if the WrappedException is actually a Resource Not Found.
- *
- * @param wrappedEx
- * @return <code>true</code> is exception wrappers a resource not found.
- * @since 1.0.0
- */
- public static boolean isResourceNotFound(WrappedException wrappedEx) {
- Exception excep = wrappedEx.exception();
- while (excep instanceof WrappedException) {
- excep = ((WrappedException) excep).exception();
- }
- return primIsResourceNotFound(excep);
- }
-
- private static boolean primIsResourceNotFound(Throwable excep) {
- if (excep instanceof CoreException) {
- IStatus status = ((CoreException) excep).getStatus();
- return status.getCode() == IResourceStatus.RESOURCE_NOT_FOUND && ResourcesPlugin.PI_RESOURCES.equals(status.getPlugin());
- }
- return false;
- }
-
- /**
- * Return true if the WrappedException is actually a Resource Not Found.
- *
- * @param wrappedEx
- * @return <code>true</code> is exception wrappers a resource not found.
- * @since 1.0.0
- */
- public static boolean isResourceNotFound(Resource.IOWrappedException wrappedEx) {
- return primIsResourceNotFound(wrappedEx.getCause());
- }
-
- /**
- * Return a URI represenation of the platformURI without the leading "platform:/resource/" if present.
- *
- * @param platformURI
- * @return uri
- * @since 1.0.0
- */
- public static URI getNonPlatformURI(URI platformURI) {
- if (isPlatformResourceURI(platformURI)) {
- String uriString = primGetNonPlatformURIString(platformURI);
- return URI.createURI(uriString);
- }
- return platformURI;
- }
-
- /**
- * Return a String represenation of the platformURI without the leading "platform:/resource/" if present.
- *
- * @param platformURI
- * @return
- * @since 1.0.0
- */
- public static String getNonPlatformURIString(URI platformURI) {
- if (isPlatformResourceURI(platformURI)) { return primGetNonPlatformURIString(platformURI); }
- return platformURI.toString();
- }
-
- /*
- * Remove "platform:/resource/" from the front of the platformURI and return the remaining String.
- */
- private static String primGetNonPlatformURIString(URI platformURI) {
- String uriString = platformURI.toString();
- //"platform:/resource/" is 19 characters.
- return uriString.substring(19, uriString.length());
- }
-
- /**
- * Does the passed URI have the form platform:/plugin/... ?
- *
- * @param uri
- * @return <code>true</code> if uri is platform plugin protocol.
- *
- * @since 1.0.0
- */
- public static boolean isPlatformPluginResourceURI(URI uri) {
- return JEMUtilPlugin.PLATFORM_PROTOCOL.equals(uri.scheme()) && JEMUtilPlugin.PLATFORM_PLUGIN.equals(uri.segment(0));
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/WorkbenchURIConverter.java b/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/WorkbenchURIConverter.java
deleted file mode 100644
index e556851ca..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/WorkbenchURIConverter.java
+++ /dev/null
@@ -1,154 +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
- *******************************************************************************/
-/*
- * $$RCSfile: WorkbenchURIConverter.java,v $$
- * $$Revision: 1.2 $$ $$Date: 2005/02/15 23:04:14 $$
- */
-package org.eclipse.jem.util.emf.workbench;
-
-import java.util.List;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.emf.ecore.resource.URIConverter;
-
-/**
- * Implementers of this interface are WorkbenchURI converters. Workbench URI converters handle references to files in the project's containers.
- * This converter is only necessary to resolve old ambiguous workbench URIs.
- * @since 1.0.0
- */
-public interface WorkbenchURIConverter extends URIConverter {
-
- /**
- * Add input container to to the converter.
- *
- * @param aContainer
- *
- * @since 1.0.0
- */
- void addInputContainer(IContainer aContainer);
-
- /**
- * Add list of containers to the converter.
- *
- * @param containers
- * list of <code>IContainer</code>
- *
- * @since 1.0.0
- */
- void addInputContainers(List containers);
-
- /**
- * Get the file relative to a container.
- *
- * @param uri
- * @return file relative to a container or <code>null</code> if not.
- *
- * @since 1.0.0
- */
- IFile getFile(String uri);
-
- /**
- * Get first input container
- *
- * @return first input container or <code>null</code> if none set.
- *
- * @since 1.0.0
- */
- IContainer getInputContainer();
-
- /**
- * Get all input containers.
- *
- * @return all input containers.
- *
- * @since 1.0.0
- */
- List getInputContainers();
-
- /**
- * Get the output container if set.
- *
- * @return output container or <code>null</code> if not set.
- *
- * @since 1.0.0
- */
- IContainer getOutputContainer();
-
- /**
- * Set the output container.
- *
- * @param container
- *
- * @since 1.0.0
- */
- void setOutputContainer(IContainer container);
-
- /**
- * Return an IFile for
- *
- * @aPath. If we have a parent and we do not contain the first segment of the aPath, forward to the parent to retrieve the file.
- * @param aPath
- * @return
- *
- * @since 1.0.0
- */
- IFile getOutputFile(IPath aPath);
-
- /**
- * Get output file with mapping applied.
- *
- * @param uri
- * @return
- *
- * @since 1.0.0
- */
- IFile getOutputFileWithMappingApplied(String uri);
-
- /**
- * Remove input container from list.
- *
- * @param aContainer
- * @return <code>true</code> if removed.
- *
- * @since 1.0.0
- */
- boolean removeInputContainer(IContainer aContainer);
-
- /**
- * Return true if we can retrieve the resource used to open an input stream on.
- *
- * @param aFileName
- * @return <code>true</code> if filename is valid for file stream access.
- * @since 1.0.0
- *
- */
- boolean canGetUnderlyingResource(String aFileName);
-
- /**
- * Is force save relative flag turned on.
- *
- * @return <code>true</code> if force save relative is turned on.
- *
- * @since 1.0.0
- */
- boolean isForceSaveRelative();
-
- /**
- * Set to true if you do not want any path manipulation when creating the output stream..
- *
- * @param forceSaveRelative
- * <code>true</code> to force saves as relative.
- */
- void setForceSaveRelative(boolean forceSaveRelative);
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/WorkbenchURIConverterImpl.java b/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/WorkbenchURIConverterImpl.java
deleted file mode 100644
index 63655515f..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/WorkbenchURIConverterImpl.java
+++ /dev/null
@@ -1,514 +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
- *******************************************************************************/
-/*
- * $$RCSfile: WorkbenchURIConverterImpl.java,v $$
- * $$Revision: 1.6 $$ $$Date: 2006/05/17 20:13:45 $$
- */
-package org.eclipse.jem.util.emf.workbench;
-
-import java.io.*;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.impl.URIConverterImpl;
-
-import org.eclipse.jem.util.plugin.JEMUtilPlugin;
-
-
-/**
- * A default implementation of the WorkbenchURIConverter interface.
- *
- * @since 1.0.0
- */
-public class WorkbenchURIConverterImpl extends URIConverterImpl implements WorkbenchURIConverter {
-
- private final static IWorkspaceRoot WORKSPACE_ROOT = URIConverterImpl.workspaceRoot;
- private final static String WORKSPACE_ROOT_LOCATION = WORKSPACE_ROOT.getLocation().toString();
-
- private static final String FILE_PROTOCOL = "file"; //$NON-NLS-1$
-
- private static final IPath INVALID_PATH = new Path("!!!!~!!!!"); //$NON-NLS-1$
-
- private static final IFile INVALID_FILE = WORKSPACE_ROOT.getFile(INVALID_PATH.append(INVALID_PATH));
-
- //Used to avoid trying to fixup the URI when getting the
- //OutputStream
- protected boolean forceSaveRelative = false;
-
- protected List inputContainers;
-
- protected IContainer outputContainer;
-
- protected ResourceSetWorkbenchSynchronizer resourceSetSynchronizer;
-
- /*
- * KLUDGE: We need to know the meta data area. This is so that any uri that starts with the metadata directory
- * is considered a file uri and NOT a workspace uri. The metadata is where plugin's store their working data.
- * It is not part of the workspace root.
- *
- * There is no request for simply the metadata area. The log file is in the metadata directory. So we will
- * get the log file location and just remove the log file name. That should leave us with the metadata directory
- * only. If Eclipse ever decides to move it from here, this will no longer work. But it hasn't moved in three
- * versions.
- *
- * @since 1.1.0
- */
- static protected final String METADATA_LOCATION = Platform.getLogFileLocation().removeLastSegments(1).toString();
-
- /**
- * Default converter constructor, no containers.
- *
- *
- * @since 1.0.0
- */
- public WorkbenchURIConverterImpl() {
- super();
- }
-
- /**
- * Construct with an input container.
- *
- * @param anInputContainer
- *
- * @since 1.0.0
- */
- public WorkbenchURIConverterImpl(IContainer anInputContainer) {
- this(anInputContainer, (ResourceSetWorkbenchSynchronizer) null);
- }
-
- /**
- * Construct with an input container and a synchronzier.
- *
- * @param aContainer
- * @param aSynchronizer
- *
- * @since 1.0.0
- */
- public WorkbenchURIConverterImpl(IContainer aContainer, ResourceSetWorkbenchSynchronizer aSynchronizer) {
- this(aContainer, null, aSynchronizer);
- }
-
- /**
- * Construct with an input container and an output container.
- *
- * @param anInputContainer
- * @param anOutputContainer
- *
- * @since 1.0.0
- */
- public WorkbenchURIConverterImpl(IContainer anInputContainer, IContainer anOutputContainer) {
- this(anInputContainer, anOutputContainer, null);
- }
-
- /**
- * Construct with an input container, output container, and a synchronizer.
- *
- * @param anInputContainer
- * @param anOutputContainer
- * @param aSynchronizer
- *
- * @since 1.0.0
- */
- public WorkbenchURIConverterImpl(IContainer anInputContainer, IContainer anOutputContainer, ResourceSetWorkbenchSynchronizer aSynchronizer) {
- addInputContainer(anInputContainer);
- setOutputContainer(anOutputContainer);
- resourceSetSynchronizer = aSynchronizer;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.emf.workbench.WorkbenchURIConverter#addInputContainer(org.eclipse.core.resources.IContainer)
- */
- public void addInputContainer(IContainer aContainer) {
- if (aContainer != null && !getInputContainers().contains(aContainer))
- getInputContainers().add(aContainer);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.emf.workbench.WorkbenchURIConverter#addInputContainers(java.util.List)
- */
- public void addInputContainers(List containers) {
- for (int i = 0; i < containers.size(); i++) {
- addInputContainer((IContainer) containers.get(i));
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.emf.workbench.WorkbenchURIConverter#removeInputContainer(org.eclipse.core.resources.IContainer)
- */
- public boolean removeInputContainer(IContainer aContainer) {
- return getInputContainers().remove(aContainer);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.emf.workbench.WorkbenchURIConverter#getInputContainers()
- */
- public List getInputContainers() {
- if (inputContainers == null)
- inputContainers = new ArrayList();
- return inputContainers;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.emf.workbench.WorkbenchURIConverter#getInputContainer()
- */
- public IContainer getInputContainer() {
- if (!getInputContainers().isEmpty())
- return (IContainer) getInputContainers().get(0);
- else
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.emf.workbench.WorkbenchURIConverter#getOutputContainer()
- */
- public IContainer getOutputContainer() {
- if (outputContainer == null)
- outputContainer = getInputContainer();
- return outputContainer;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.emf.workbench.WorkbenchURIConverter#setOutputContainer(org.eclipse.core.resources.IContainer)
- */
- public void setOutputContainer(IContainer newOutputContainer) {
- outputContainer = newOutputContainer;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.emf.workbench.WorkbenchURIConverter#getOutputFile(org.eclipse.core.runtime.IPath)
- */
- public IFile getOutputFile(IPath aPath) {
- IFile file = null;
- if (getOutputContainer() != null) {
- if (forceSaveRelative)
- return primGetOutputFile(aPath);
- file = getOutputFileForPathWithContainerSegments(aPath);
- if (file != null)
- return file;
- else
- return primGetOutputFile(aPath);
- }
- return file;
- }
-
- protected IFile primGetOutputFile(IPath aPath) {
- return primGetFile(getOutputContainer(), aPath);
- }
-
- protected IFile getOutputFileForPathWithContainerSegments(IPath aPath) {
- IContainer out = getOutputContainer();
- return getFileForPathWithContainerSegments(aPath, out, false);
- }
-
- protected IFile getFileForPathWithContainerSegments(IPath aPath, IContainer container, boolean testExists) {
- IPath containerPath = null;
- IFile file = null;
- if (testExists) {
- containerPath = container.getProjectRelativePath();
- if (!containerPath.isEmpty()) {
- file = getFileForMatchingPath(aPath, containerPath, container);
- if (file != null && file.exists())
- return file;
- }
- }
- containerPath = container.getFullPath();
- file = getFileForMatchingPath(aPath, containerPath, container);
- return file;
- }
-
- protected IFile getFileForMatchingPath(IPath containerPath, IPath sourcePath, IContainer container) {
- int matches = 0;
- matches = containerPath.matchingFirstSegments(sourcePath);
- if (matches > 0 && matches == sourcePath.segmentCount()) {
- IPath loadPath = containerPath.removeFirstSegments(matches);
- return primGetFile(container, loadPath);
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.emf.workbench.WorkbenchURIConverter#getFile(java.lang.String)
- */
- public IFile getFile(String uri) {
- return getFile(new Path(uri));
- }
-
- /**
- * Get the file from the path.
- *
- * @param path
- * @return
- * @see WorkbenchURIConverter#getFile(String)
- * @since 1.0.0
- */
- public IFile getFile(IPath path) {
- IFile file = null;
- if (getInputContainer() != null) {
- path = path.makeRelative();
- java.util.Iterator it = getInputContainers().iterator();
- while (it.hasNext()) {
- IContainer con = (IContainer) it.next();
- file = getInputFile(con, path);
- if (file != null && file.exists())
- return file;
- }
- }
- if (file == null)
- return INVALID_FILE;
- return file;
- }
-
- /**
- * Get output file from string path.
- *
- * @param uri
- * @return
- *
- * @see WorkbenchURIConverter#getOutputFile(IPath)
- * @since 1.0.0
- */
- public IFile getOutputFile(String uri) {
- return getOutputFile(new Path(uri));
- }
-
- /**
- * Get the input file from the container and path.
- *
- * @param con
- * @param path
- * @return
- *
- * @since 1.0.0
- */
- public IFile getInputFile(IContainer con, IPath path) {
- IFile file = null;
- if (WORKSPACE_ROOT.equals(con) && path.segmentCount() < 2)
- path = INVALID_PATH.append(path);
- file = primGetFile(con, path);
- if (file == null || !file.exists())
- file = getFileForPathWithContainerSegments(path, con, true);
- return file;
- }
-
- protected IFile primGetFile(IContainer container, IPath path) {
- try {
- return container.getFile(path);
- } catch (IllegalArgumentException ex) {
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.emf.workbench.WorkbenchURIConverter#canGetUnderlyingResource(java.lang.String)
- */
- public boolean canGetUnderlyingResource(String aFileName) {
- IFile file = getFile(aFileName);
- return file != null && file.exists();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.emf.workbench.WorkbenchURIConverter#isForceSaveRelative()
- */
- public boolean isForceSaveRelative() {
- return forceSaveRelative;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.emf.workbench.WorkbenchURIConverter#setForceSaveRelative(boolean)
- */
- public void setForceSaveRelative(boolean forceSaveRelative) {
- this.forceSaveRelative = forceSaveRelative;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.ecore.resource.URIConverter#normalize(org.eclipse.emf.common.util.URI)
- */public URI normalize(URI uri) {
- URI result = uri;
- String fragment = null;
- if (uri.hasFragment()) {
- fragment = uri.fragment();
- result = uri.trimFragment();
- }
- result = getInternalURIMap().getURI(result);
- if (WorkbenchResourceHelperBase.isPlatformResourceURI(result))
- return appendFragment(result, fragment);
- if (WorkbenchResourceHelperBase.isPlatformPluginResourceURI(result)) {
- URI normalized = normalizePluginURI(result, fragment);
- return (normalized != null) ? normalized : uri;
- }
- String protocol = result.scheme();
- URI fileSearchURI = null;
- if (protocol == null) {
- fileSearchURI = normalizeEmptyProtocol(result, fragment);
- if (fileSearchURI != null)
- return fileSearchURI;
- } else if (FILE_PROTOCOL.equals(protocol)) {
- fileSearchURI = normalizeFileProtocol(result, fragment);
- if (fileSearchURI != null)
- return fileSearchURI;
- } else if (JEMUtilPlugin.WORKSPACE_PROTOCOL.equals(protocol))
- return normalizeWorkspaceProtocol(result, fragment);
- return super.normalize(uri);
- }
-
- /*
- * Resolves a plugin format into the actual.
- */
- protected URI normalizePluginURI(URI uri, String fragment) {
- if (uri.segmentCount() < 2)
- return uri; // Invalid, just let it go on.
- // See if already normalized.
- int u_scoreNdx = uri.segment(1).lastIndexOf('_');
- if (u_scoreNdx != -1) {
- // Not normalized. Remove the version to make it normalized.
- String[] segments = uri.segments();
- segments[1] = segments[1].substring(0, u_scoreNdx);
- return URI.createHierarchicalURI(uri.scheme(), uri.authority(), uri.device(), segments, uri.query(), fragment);
- } else
- return uri;
- }
-
- protected URI normalizeWorkspaceProtocol(URI aWorkspaceURI, String fragment) {
- URI result;
- String uriString = aWorkspaceURI.toString();
- uriString = uriString.substring(JEMUtilPlugin.WORKSPACE_PROTOCOL.length() + 1);
- result = URI.createPlatformResourceURI(uriString);
- if (fragment != null)
- result = appendFragment(aWorkspaceURI, fragment);
- return result;
- }
-
- protected URI normalizeEmptyProtocol(URI aFileUri, String fragment) {
- //Make the relative path absolute and return a platform URI.
- IPath path = new Path(aFileUri.toString());
- return normalizeToWorkspaceURI(path, fragment);
- }
-
- private URI normalizeToWorkspaceURI(IPath path, String fragment) {
- URI result = null;
- IFile file = getFile(path);
- if (file == null || !file.exists())
- file = getOutputFile(path);
- if (file != null) {
- result = URI.createPlatformResourceURI(file.getFullPath().toString());
- result = appendFragment(result, fragment);
- }
- return result;
- }
-
- protected URI normalizeFileProtocol(URI aFileUri, String fragment) {
- URI result = null;
- //Make the relative path absolute and return a platform URI.
- String devicePath = aFileUri.devicePath();
- //Test for workspace location.
- if (!devicePath.startsWith(METADATA_LOCATION) &&
- devicePath.startsWith(WORKSPACE_ROOT_LOCATION) && devicePath.length() > WORKSPACE_ROOT_LOCATION.length()) {
- //test for workspace location
- result = normalizeToWorkspaceURI(new Path(devicePath.substring(WORKSPACE_ROOT_LOCATION.length())), fragment);
- } else if (aFileUri.isRelative()) {
- result = normalizeToWorkspaceURI(new Path(aFileUri.toString()), fragment);
- } else {
- result = aFileUri;
- }
- return result;
- }
-
- protected URI appendFragment(URI result, String fragment) {
- if (fragment != null)
- return result.appendFragment(fragment);
- else
- return result;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.emf.workbench.WorkbenchURIConverter#getOutputFileWithMappingApplied(java.lang.String)
- */
- public IFile getOutputFileWithMappingApplied(String uri) {
- URI converted = getInternalURIMap().getURI(URI.createURI(uri));
- return getOutputFile(new Path(converted.toString()));
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.ecore.resource.impl.URIConverterImpl#createPlatformResourceOutputStream(java.lang.String)
- */
- public OutputStream createPlatformResourceOutputStream(String platformResourcePath) throws IOException {
- IFile file = WORKSPACE_ROOT.getFile(new Path(platformResourcePath));
- ProjectUtilities.ensureContainerNotReadOnly(file);
- return new WorkbenchByteArrayOutputStream(file, resourceSetSynchronizer);
- }
-
- protected URI getContainerRelativeURI(IFile aFile) {
- IPath path = WorkbenchResourceHelperBase.getPathFromContainers(inputContainers, aFile.getFullPath());
- if (path != null)
- return URI.createURI(path.toString());
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.ecore.resource.impl.URIConverterImpl#createPlatformResourceInputStream(java.lang.String)
- */
- public InputStream createPlatformResourceInputStream(String platformResourcePath) throws IOException {
- IFile file = WORKSPACE_ROOT.getFile(new Path(platformResourcePath));
- try {
- if (!file.isSynchronized(IResource.DEPTH_ONE)) {
- try {
- File iofile = file.getFullPath().toFile();
- if (iofile.exists() || file.exists())
- file.refreshLocal(IResource.DEPTH_ONE, null);
- } catch (CoreException ce) {
- if (ce.getStatus().getCode() != IResourceStatus.WORKSPACE_LOCKED)
- throw ce;
- }
- }
- // CHANGED from <no-args> to <true> [94015]
- return file.getContents(true);
- } catch (CoreException exception) {
- throw new Resource.IOWrappedException(exception);
- }
- }
-
-}
diff --git a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/nature/EMFNature.java b/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/nature/EMFNature.java
deleted file mode 100644
index f7f288af1..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/emf/workbench/nature/EMFNature.java
+++ /dev/null
@@ -1,554 +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
- *******************************************************************************/
-/*
- * $$RCSfile: EMFNature.java,v $$
- * $$Revision: 1.4 $$ $$Date: 2005/02/15 23:04:14 $$
- */
-package org.eclipse.jem.util.emf.workbench.nature;
-
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.emf.common.util.*;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.xmi.XMLParserPool;
-import org.eclipse.emf.ecore.xmi.impl.XMLParserPoolImpl;
-
-import org.eclipse.jem.internal.util.emf.workbench.nature.EMFNatureRegistry;
-import org.eclipse.jem.util.emf.workbench.*;
-import org.eclipse.jem.util.logger.proxy.Logger;
-
-
-/**
- * The base EMFNature.
- * <p>
- * This is expected to be subclassed by clients, but there are default subclasses available.
- * </p>
- *
- * @since 1.0.0
- */
-public abstract class EMFNature implements IProjectNature, IEMFContextContributor {
-
- protected IProject project;
-
- protected EMFWorkbenchContextBase emfContext;
-
- protected boolean hasConfigured = false;
-
- public static XMLParserPool SHARED_PARSER_POOL = new XMLParserPoolImpl();
-
- public EMFNature() {
- super();
- }
-
- /**
- * Add the nature id to the project.
- *
- * @param proj
- * @param natureId
- * @throws CoreException
- *
- * @since 1.0.0
- */
- protected static void addNatureToProject(IProject proj, String natureId) throws CoreException {
- ProjectUtilities.addNatureToProject(proj, natureId);
- }
-
- /**
- * Configures the project with this nature. This is called by <code>IProject.addNature</code> and should not be called directly by clients. The
- * nature extension id is added to the list of natures on the project by <code>IProject.addNature</code>, and need not be added here.
- *
- * <p>
- * All subtypes must call super. The better way for subtypes is to override primConfigure instead.
- * </p>
- *
- * @throws CoreException
- * @since 1.0.0
- */
- public void configure() throws org.eclipse.core.runtime.CoreException {
- if (!hasConfigured) {
- hasConfigured = true;
- primConfigure();
- }
- }
-
- /**
- * Called from configure the first time configure is called on the nature. Default is do nothing. Subclasses should override and add in their own
- * configuration.
- *
- * @throws org.eclipse.core.runtime.CoreException
- *
- * @since 1.0.0
- */
- protected void primConfigure() throws org.eclipse.core.runtime.CoreException {
-
- }
-
- /**
- * Create an EMF context for the project.
- *
- * @throws CoreException
- *
- * @since 1.0.0
- */
- protected void createEmfContext() throws CoreException {
- WorkbenchResourceHelperBase.createEMFContext(getProject(), this);
- }
-
- /**
- * Create a folder relative to the project based on aProjectRelativePathString.
- *
- * @param aProjectRelativePathString
- * @return
- * @throws CoreException
- *
- * @since 1.0.0
- */
- public IFolder createFolder(String aProjectRelativePathString) throws CoreException {
- if (aProjectRelativePathString != null && aProjectRelativePathString.length() > 0)
- return createFolder(new Path(aProjectRelativePathString));
- return null;
- }
-
- /**
- * Create a folder relative to the project based on aProjectRelativePathString.
- *
- * @param aProjectRelativePath
- * @return
- * @throws CoreException
- *
- * @since 1.0.0
- */
- public IFolder createFolder(IPath aProjectRelativePath) throws CoreException {
- if (aProjectRelativePath != null && !aProjectRelativePath.isEmpty()) {
- IFolder folder = getWorkspace().getRoot().getFolder(getProjectPath().append(aProjectRelativePath));
- if (!folder.exists()) {
- ProjectUtilities.ensureContainerNotReadOnly(folder);
- folder.create(true, true, null);
- }
- return folder;
- }
- return null;
- }
-
- /**
- * Removes this nature from the project, performing any required deconfiguration. This is called by <code>IProject.removeNature</code> and
- * should not be called directly by clients. The nature id is removed from the list of natures on the project by
- * <code>IProject.removeNature</code>, and need not be removed here.
- *
- * @throws CoreException
- * @since 1.0.0
- */
- public void deconfigure() throws org.eclipse.core.runtime.CoreException {
- emfContext = null;
- }
-
- /**
- * Return true if the IFile with the given name exists in this project.
- *
- * @param aFileName
- * filename can be relative to one of the input file paths for the WorkbenchURIConverter.
- * @return <code>true</code> if filename exists in this project
- *
- * @since 1.0.0
- */
- public boolean fileExists(String aFileName) {
- if (aFileName == null)
- return false;
-
- IPath path = new Path(aFileName);
- if (path.isAbsolute())
- return ResourcesPlugin.getWorkspace().getRoot().getFile(path).exists();
- else
- return getWorkbenchURIConverter().canGetUnderlyingResource(aFileName);
- }
-
- /**
- * Get the resource set for the project
- *
- * @return
- *
- * @since 1.0.0
- */
- public ResourceSet getResourceSet() {
- return getEmfContextBase().getResourceSet();
- }
-
- /**
- * Returns the EMF root folder for the project. Defaults to the project. Subclasses can override.
- *
- * @return EMF root folder for the project.
- *
- * @since 1.0.0
- */
- public IContainer getEMFRoot() {
- return getProject();
- }
-
- /**
- * Used for optimizations; answers whether a mof context for this nature has exists yet
- *
- * @deprecated use hasResourceSet();
- * @since 1.0.0
- */
- public boolean hasContext() {
- return hasResourceSet();
- }
-
- /**
- * Is there a resource set yet for the project.
- *
- * @return <code>true</code> if there is a resource set for the project.
- *
- * @since 1.0.0
- */
- public boolean hasResourceSet() {
- return emfContext != null && emfContext.hasResourceSet();
- }
-
- /**
- * Lazy initializer; for migration of existing workspaces where configure will never get called.
- *
- * @return context base for the project.
- *
- * @since 1.0.0
- */
- protected EMFWorkbenchContextBase getEmfContextBase() {
- if (emfContext == null) {
- try {
- createEmfContext();
- } catch (CoreException ex) {
- Logger.getLogger().logError(ex);
- }
- }
- return emfContext;
- }
-
- /**
- * Get the IFile with the given name if it is in this project.
- *
- * @param aFileName
- * filename can be relative to one of the input file paths for the WorkbenchURIConverter.
- * @return file it it is in this project, or <code>null</code> if it doesn't.
- *
- * @since 1.0.0
- */
- public IFile getFile(String aFileName) {
- return getWorkbenchURIConverter().getFile(aFileName);
- }
-
- /**
- * Return the nature's ID.
- *
- * @return nature id
- *
- * @since 1.0.0
- */
- public abstract String getNatureID();
-
- /**
- * Return the ID of the plugin that this nature is contained within.
- *
- * @return
- *
- * @since 1.0.0
- */
- protected abstract String getPluginID();
-
- /**
- * Returns the project to which this project nature applies.
- *
- * @return the project handle
- * @since 1.0.0
- */
- public org.eclipse.core.resources.IProject getProject() {
- return project;
- }
-
- /**
- * Return the full path of the project.
- *
- * @return full project path (relative to workspace)
- * @since 1.0.0
- */
- public IPath getProjectPath() {
- return getProject().getFullPath();
- }
-
- /**
- * Get the server property of the project from the supplied key
- *
- * @param key
- * java.lang.String
- * @deprecated we cannont use persistent properties because they are not stored in the repository
- * @since 1.0.0
- */
- protected String getProjectServerValue(String key) {
- if (key == null)
- return null;
- try {
- QualifiedName wholeName = qualifiedKey(key);
- return getProject().getPersistentProperty(wholeName);
- } catch (CoreException exception) {
- //If we can't find it assume it is null
- exception.printStackTrace();
- return null;
- }
- }
-
- /**
- * Get WorkbenchURIConverter for this project.
- * <p>
- * This method assumes the URIConverter on the ResourceSet is the one that was created for the ResourceSet on behalf of this nature runtime.
- * </p>
- *
- * @return
- *
- * @since 1.0.0
- */
- protected WorkbenchURIConverter getWorkbenchURIConverter() {
- return (WorkbenchURIConverter) getResourceSet().getURIConverter();
- }
-
- public IWorkspace getWorkspace() {
- return getProject().getWorkspace();
- }
-
- /**
- * @deprecated use getResource(URI)
- */
- public Resource getXmiResource(String uri) {
- return getResource(URI.createURI(uri));
- }
-
- /**
- * Get the resource for this uri. It will use the resource set of the project to find it. It will load if not already loaded.
- *
- * @param uri
- * @return resource or <code>null</code> if resource is not found.
- *
- * @since 1.0.0
- */
- public Resource getResource(URI uri) {
- try {
- return getResourceSet().getResource(uri, true);
- } catch (WrappedException ex) {
- if (!WorkbenchResourceHelperBase.isResourceNotFound(ex))
- throw ex;
- }
- return null;
- }
-
- /**
- * @deprecated use getResourceSet()
- */
- public ResourceSet getXmiResourceSet() {
- return getResourceSet();
- }
-
- /**
- * Make sure that all dependent components are initialized before creating the ResourceSet.
- */
- protected void initializeDependentComponents() {
- //com.ibm.etools.java.init.JavaInit.init();
- }
-
- /**
- * @deprecated use createResource(URI)
- */
- public Resource makeXmiResource(String uri) {
- return createResource(URI.createURI(uri));
- }
-
- /**
- * @deprecated use createResource(URI)
- */
- public Resource makeXmiResource(String uri, EList anExtent) {
- Resource res = makeXmiResource(uri);
- if (res != null)
- res.getContents().addAll(anExtent);
- return res;
- }
-
- /**
- * Create the resource for this uri. It will use the resource set of the project to create it.
- *
- * @param uri
- * @return resource
- *
- * @since 1.0.0
- */
- public Resource createResource(URI uri) {
- return getResourceSet().createResource(uri);
- }
-
- /*
- * Return the QualifedValue for key for storage in the repository. The key is qualifed with the package name to avoid collision. @return
- * QualifedName @param key java.lang.String
- */
- private QualifiedName qualifiedKey(String key) {
- return new QualifiedName(getPluginID(), key);
- }
-
- /**
- * Register the given nature id as an EMFNature.
- *
- * @param natureID
- *
- * @since 1.0.0
- */
- public static void registerNatureID(String natureID) {
- EMFNatureRegistry.singleton().REGISTERED_NATURE_IDS.add(natureID);
- }
-
- /**
- * Sets the project to which this nature applies. Used when instantiating this project nature runtime. This is called by
- * <code>IProject.addNature</code> and should not be called directly by clients.
- *
- * @param project
- * the project to which this nature applies
- *
- * @since 1.0.0
- */
- public void setProject(org.eclipse.core.resources.IProject newProject) {
- project = newProject;
- }
-
- /**
- * Set the server property of the project from the supplied value
- *
- * @param key
- * java.lang.String
- * @param value
- * String
- * @deprecated we cannont use persistent properties because they are not stored in the repository
- */
- protected void setProjectServerValue(String key, String value) {
- if (key != null) {
- try {
- QualifiedName wholeName = qualifiedKey(key);
- getProject().setPersistentProperty(wholeName, value);
- } catch (CoreException exception) {
- //If we can't find it assume it is null
- exception.printStackTrace();
- return;
- }
- }
- }
-
- /**
- * Shutdown the EMF nature
- *
- *
- * @since 1.0.0
- */
- public void shutdown() {
- if (getResourceSet() != null)
- ((ProjectResourceSet) getResourceSet()).release();
- }
-
- /**
- * Return a list of EMFNatures based on the natures that have been configured for this project.
- *
- * @return List of EMFNatures
- * @param project
- * @return list of natures configured for the project.
- * @since 1.0.0
- */
- public static List getRegisteredRuntimes(IProject project) {
- List result = null;
- EMFNature nature = null;
- if (project != null && project.isAccessible()) {
- String natureID;
- Iterator it = EMFNatureRegistry.singleton().REGISTERED_NATURE_IDS.iterator();
- while (it.hasNext()) {
- natureID = (String) it.next();
- try {
- nature = (EMFNature) project.getNature(natureID);
- } catch (CoreException e) {
- }
- if (nature != null) {
- if (result == null)
- result = new ArrayList(2);
- result.add(nature);
- }
- }
- }
- return result == null ? Collections.EMPTY_LIST : result;
- }
-
- /**
- * Return a list of nature ids based on the natures that have been configured for this project.
- *
- * @return list of configured nature ids.
- * @param project
- */
- public static List getRegisteredRuntimeIDs(IProject project) {
- List result = null;
- String natureID = null;
- if (project != null && project.isAccessible()) {
- Iterator it = EMFNatureRegistry.singleton().REGISTERED_NATURE_IDS.iterator();
- while (it.hasNext()) {
- natureID = (String) it.next();
- try {
- if (project.hasNature(natureID)) {
- if (result == null)
- result = new ArrayList(2);
- result.add(natureID);
- }
- } catch (CoreException e) {
- }
- }
- }
- return result == null ? Collections.EMPTY_LIST : result;
- }
-
- /**
- * Return if the project has the given nature.
- *
- * @param project
- * @param natureId
- * @return <code>true</code> if project has given nature
- *
- * @since 1.0.0
- */
- public static boolean hasRuntime(IProject project, String natureId) {
- if (project == null || !project.isAccessible())
- return false;
- try {
- return project.hasNature(natureId);
- } catch (CoreException e) {
- return false;
- }
- }
-
- /**
- * Return if the project has any one of the possible given nature ids.
- *
- * @param project
- * @param possibleNatureIds
- * @return <code>true</code> if at least one of the possible natures id is configured for the project.
- *
- * @since 1.0.0
- */
- public static boolean hasRuntime(IProject project, String[] possibleNatureIds) {
- if (project != null) {
- for (int i = 0; i < possibleNatureIds.length; i++) {
- if (hasRuntime(project, possibleNatureIds[i]))
- return true;
- }
- }
- return false;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/logger/proxyrender/AbstractWorkBenchRenderer.java b/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/logger/proxyrender/AbstractWorkBenchRenderer.java
deleted file mode 100644
index 428556607..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/logger/proxyrender/AbstractWorkBenchRenderer.java
+++ /dev/null
@@ -1,472 +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
- *******************************************************************************/
-/*
- * $RCSfile: AbstractWorkBenchRenderer.java,v $
- * $Revision: 1.5 $ $Date: 2005/12/14 21:24:26 $
- */
-package org.eclipse.jem.util.logger.proxyrender;
-
-import java.lang.reflect.Field;
-import java.util.logging.Level;
-
-import org.eclipse.core.runtime.*;
-import org.osgi.framework.Bundle;
-
-import org.eclipse.jem.util.logger.proxy.*;
-
-
-/**
- * Base log renderer that logs to the workbench.
- *
- * @since 1.1.0
- */
-public abstract class AbstractWorkBenchRenderer implements ILogRenderer2 {
-
- private boolean fTraceMode = false; // will we actually punch trace messaged or not
-
- private boolean fSettingTrace = false;
-
- protected Bundle fMyBundle = null;
-
- protected Logger fMyLogger = null;
-
- protected ILog fWorkBenchLogger = null;
-
- /**
- * Constructer taking a logger.
- *
- * @param logger
- *
- * @since 1.1.0
- */
- public AbstractWorkBenchRenderer(Logger logger) {
- super();
- fMyLogger = logger;
- fTraceMode = fMyLogger.getTraceMode();
-
- String pluginID = fMyLogger.getPluginID();
- fMyBundle = Platform.getBundle(pluginID);
- if (fMyBundle == null)
- throw new RuntimeException("Invalid Plugin ID"); //$NON-NLS-1$
-
- fWorkBenchLogger = Platform.getLog(fMyBundle);
- setTraceMode(fMyLogger.getTraceMode() || isDebugging(fMyBundle));
- fMyLogger.setRenderer(this);
- }
-
- /*
- * This used to come from the Plugin instance. But in new OSGi, there is not necessarily a Plugin instance. So use the same logic they use.
- */
- private boolean isDebugging(Bundle bundle) {
- String symbolicName = bundle.getSymbolicName();
- if (symbolicName != null) {
- String key = symbolicName + "/debug"; //$NON-NLS-1$
- String value = Platform.getDebugOption(key);
- return value == null ? false : value.equalsIgnoreCase("true"); //$NON-NLS-1$
- }
- return false;
- }
-
- /**
- * Is the console log for eclipse turned on to sysout. If true, then we shouldn't log to console anything already logged because Eclipse would of
- * logged it for us. This comes from the -Declipse.consoleLog="true" which is the default when starting eclipse from PDE.
- */
- protected static final boolean consoleLogOn;
- static {
- String consologPropertyName = null;
- try {
- // Accessing an internal field, so using reflection. This way if changes in future we won't crash.
- Class eclipseStarter = Class.forName("org.eclipse.core.runtime.adaptor.EclipseStarter"); //$NON-NLS-1$
- Field consolelog = eclipseStarter.getDeclaredField("PROP_CONSOLE_LOG"); //$NON-NLS-1$
- consologPropertyName = (String) consolelog.get(null);
- } catch (SecurityException e) {
- } catch (IllegalArgumentException e) {
- } catch (ClassNotFoundException e) {
- } catch (NoSuchFieldException e) {
- } catch (IllegalAccessException e) {
- }
- consoleLogOn = consologPropertyName != null && "true".equals(System.getProperty(consologPropertyName)) ; //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.logger.proxy.ILogRenderer#setTraceMode(boolean)
- */
- public void setTraceMode(boolean flag) {
- if (fSettingTrace)
- return; // Do not allow cycles
-
- fSettingTrace = true;
- fTraceMode = flag;
- fMyLogger.setTraceMode(flag);
- fSettingTrace = false;
- }
-
- // The following methods are for historical renderers in case this has been subclassed outside
- // of util.
-
- /**
- * Log a string to the trace.
- *
- * @param param
- * @return
- *
- * @since 1.0.0
- */
- public abstract String log(String param);
-
- /**
- * Default one that log a string to the trace given a level. Default simply passes it to log(String) so that we don't break old subclasses.
- * <p>
- * If loggedToWorkbench is true, then it shouldn't be logged to console if consoleLogOn is true because workbench already logged to console.
- *
- * @param msg
- * @param l
- *
- * @since 1.0.0
- */
- protected void log(String msg, Level l, boolean loggedToWorkbench) {
- log(msg);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.logger.proxy.ILogRenderer#log(java.lang.String, int)
- */
- public String log(String msg, int type) {
-
- String target = logWorkBench(msg, type);
- if (fTraceMode || target.equals(NOLOG_DESCRIPTION))
- return log(msg);
- else
- return target;
- }
-
- /**
- * Log to workbench, a string of the given level <code>ILogRenderer.LOG_</code>. levels.
- *
- * @param msg
- * @param type
- * @return description of the log's destination e.g., <code>CONSOLE_DESCRIPTION</code>
- *
- * @see ILogRenderer#LOG_ERROR and all of the other log types.
- * @see ILogRenderer#CONSOLE_DESCRIPTION
- * @since 1.0.0
- */
- public String logWorkBench(String msg, int type) {
-
- try {
- int ErrCode;
- if (fWorkBenchLogger != null) {
- switch (type) {
- case (ILogRenderer.LOG_ERROR):
- ErrCode = IStatus.ERROR;
- break;
- case (ILogRenderer.LOG_WARNING):
- ErrCode = IStatus.WARNING;
- break;
- case (ILogRenderer.LOG_INFO):
- ErrCode = IStatus.INFO;
- break;
- case (ILogRenderer.LOG_TRACE):
- ErrCode = IStatus.OK;
- break;
- default:
- throw new RuntimeException("Invalid Log Type"); //$NON-NLS-1$
- }
- Status status = new Status(ErrCode, fMyBundle.getSymbolicName(), IStatus.OK, msg, null);
- fWorkBenchLogger.log(status);
- return WORKBENCH_DESCRIPTION;
- } else
- return NOLOG_DESCRIPTION;
- } catch (Throwable t) {
- return NOLOG_DESCRIPTION;
- }
- }
-
- // Default implentation of the ILogRenderer2 interface.
- protected boolean isLogging(Level level) {
- return fTraceMode || fMyLogger.isLoggingLevel(level);
- }
-
- private static final int[] STATUS_LEVEL;
-
- private static final Level[] STATUS_LEVEL_LOOKUP;
-
- private static final Level[] LEVEL_STATUS;
-
- static {
- // Status levels that correspond to the log levels, from finest to none, same indexes as from STATUS_LEVEL_LOOKUP.
- STATUS_LEVEL_LOOKUP = new Level[] { Level.INFO, Level.WARNING, Level.SEVERE};
- STATUS_LEVEL = new int[] { IStatus.INFO, IStatus.WARNING, IStatus.ERROR};
-
- // Levels that correspond to the IStatus levels.
- int maxID = Math.max(IStatus.OK, Math.max(IStatus.INFO, Math.max(IStatus.WARNING, IStatus.ERROR)));
- LEVEL_STATUS = new Level[maxID + 1];
- LEVEL_STATUS[IStatus.OK] = Level.FINE;
- LEVEL_STATUS[IStatus.INFO] = Level.INFO;
- LEVEL_STATUS[IStatus.WARNING] = Level.WARNING;
- LEVEL_STATUS[IStatus.ERROR] = Level.SEVERE;
- }
-
- /**
- * Return the Java Level for the status code from the given IStatus.
- *
- * @param status
- * @return the Java Level
- *
- * @since 1.0.0
- */
- protected Level getLogLevel(IStatus status) {
- return LEVEL_STATUS[status.getSeverity()];
- }
-
- /**
- * Return the IStatus status code for the given Java Level.
- *
- * @param logLevel
- * @return the IStatus status code.
- *
- * @since 1.0.0
- */
- protected int getStatusSeverity(Level logLevel) {
- for (int i = 0; i < STATUS_LEVEL_LOOKUP.length; i++) {
- if (STATUS_LEVEL_LOOKUP[i] == logLevel)
- return STATUS_LEVEL[i];
- }
- return IStatus.OK; // Default to ok.
- }
-
- /**
- * Log the string to the workbench for the given level
- *
- * @param msg
- * @param level
- * @return description of the log's destination e.g., <code>CONSOLE_DESCRIPTION</code>
- *
- * @since 1.1.0
- */
- protected String logWorkbench(String msg, Level level) {
- String result = NOLOG_DESCRIPTION;
- // Test again because we could be here simply due to trace mode, in which case we
- // don't want to workbench log it.
- if (fMyLogger.isLoggingLevel(level)) {
- Platform.getLog(fMyBundle).log(new Status(getStatusSeverity(level), fMyBundle.getSymbolicName(), 0, msg, null));
- result = WORKBENCH_DESCRIPTION;
- if (fTraceMode)
- log(msg, level, true);
- } else if (fTraceMode)
- log(msg, level, false);
- return result;
- }
-
- private String getStatusMsg(IStatus s, Level l) {
- if (s.getException() != null)
- return fMyLogger.getGenericMsg(s.toString() + fMyLogger.fLineSeperator + fMyLogger.exceptionToString(s.getException()), l);
- else
- return fMyLogger.getGenericMsg(s.toString(), l);
- }
-
- /**
- * Log the IStatus to the workbench at the given level.
- *
- * @param s
- * @param level
- * @return description of the log's destination e.g., <code>CONSOLE_DESCRIPTION</code>
- *
- * @since 1.0.0
- */
- protected String logWorkbench(IStatus s, Level level) {
- if (level == DEFAULT)
- level = getLogLevel(s);
- String result = NOLOG_DESCRIPTION;
- // Test again because we could be here simply due to trace mode, in which case we
- // don't want to workbench log it.
- if (fMyLogger.isLoggingLevel(level)) {
- Platform.getLog(fMyBundle).log(s);
- result = WORKBENCH_DESCRIPTION;
- if (fTraceMode)
- log(getStatusMsg(s, level), level, true);
- } else if (fTraceMode)
- log(getStatusMsg(s, level), level, false);
- return result;
- }
-
- /**
- * Log to the workbench the Throwable at the given level.
- *
- * @param t
- * @param level
- * @return description of the log's destination e.g., <code>CONSOLE_DESCRIPTION</code>
- *
- * @since 1.0.0
- */
- protected String logWorkbench(Throwable t, Level level) {
- String result = NOLOG_DESCRIPTION;
- // Test again because we could be here simply due to trace mode, in which case we
- // don't want to workbench log it.
- if (fMyLogger.isLoggingLevel(level)) {
- Platform.getLog(fMyBundle).log(new Status(getStatusSeverity(level), fMyBundle.getSymbolicName(), 0, "Exception thrown.", t)); //$NON-NLS-1$
- result = WORKBENCH_DESCRIPTION;
- if (fTraceMode)
- log(fMyLogger.getGenericMsg(fMyLogger.exceptionToString(t), level), level, true);
- } else if (fTraceMode)
- log(fMyLogger.getGenericMsg(fMyLogger.exceptionToString(t), level), level, false);
- return result;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.logger.proxy.ILogRenderer2#log(byte, java.util.logging.Level)
- */
- public String log(boolean b, Level level) {
- if (level == DEFAULT)
- level = Level.FINEST;
- if (isLogging(level))
- return logWorkbench(fMyLogger.getGenericMsg(String.valueOf(b), level), level);
- else
- return NOLOG_DESCRIPTION;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.logger.proxy.ILogRenderer2#log(byte, java.util.logging.Level)
- */
- public String log(byte b, Level level) {
- if (level == DEFAULT)
- level = Level.FINEST;
- if (isLogging(level))
- return logWorkbench(fMyLogger.getGenericMsg(String.valueOf(b), level), level);
- else
- return NOLOG_DESCRIPTION;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.logger.proxy.ILogRenderer2#log(char, java.util.logging.Level)
- */
- public String log(char c, Level level) {
- if (level == DEFAULT)
- level = Level.FINEST;
- if (isLogging(level))
- return logWorkbench(fMyLogger.getGenericMsg(String.valueOf(c), level), level);
- else
- return NOLOG_DESCRIPTION;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.logger.proxy.ILogRenderer2#log(double, java.util.logging.Level)
- */
- public String log(double d, Level level) {
- if (level == DEFAULT)
- level = Level.FINEST;
- if (isLogging(level))
- return logWorkbench(fMyLogger.getGenericMsg(String.valueOf(d), level), level);
- else
- return NOLOG_DESCRIPTION;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.logger.proxy.ILogRenderer2#log(float, java.util.logging.Level)
- */
- public String log(float f, Level level) {
- if (level == DEFAULT)
- level = Level.FINEST;
- if (isLogging(level))
- return logWorkbench(fMyLogger.getGenericMsg(String.valueOf(f), level), level);
- else
- return NOLOG_DESCRIPTION;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.logger.proxy.ILogRenderer2#log(int, java.util.logging.Level)
- */
- public String log(int i, Level level) {
- if (level == DEFAULT)
- level = Level.FINEST;
- if (isLogging(level))
- return logWorkbench(fMyLogger.getGenericMsg(String.valueOf(i), level), level);
- else
- return NOLOG_DESCRIPTION;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.logger.proxy.ILogRenderer2#log(long, java.util.logging.Level)
- */
- public String log(long l, Level level) {
- if (level == DEFAULT)
- level = Level.FINEST;
- if (isLogging(level))
- return logWorkbench(fMyLogger.getGenericMsg(String.valueOf(l), level), level);
- else
- return NOLOG_DESCRIPTION;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.logger.proxy.ILogRenderer2#log(java.lang.Object, java.util.logging.Level)
- */
- public String log(Object o, Level level) {
- if (o instanceof IStatus)
- return logWorkbench((IStatus) o, level);
- if (level == DEFAULT)
- level = Level.FINEST;
- if (isLogging(level))
- return logWorkbench(fMyLogger.getGenericMsg(String.valueOf(o), level), level);
- else
- return NOLOG_DESCRIPTION;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.logger.proxy.ILogRenderer2#log(short, java.util.logging.Level)
- */
- public String log(short s, Level level) {
- if (level == DEFAULT)
- level = Level.FINEST;
- if (isLogging(level))
- return logWorkbench(fMyLogger.getGenericMsg(String.valueOf(s), level), level);
- else
- return NOLOG_DESCRIPTION;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.logger.proxy.ILogRenderer2#log(java.lang.Throwable, java.util.logging.Level)
- */
- public String log(Throwable t, Level level) {
- if (t instanceof CoreException)
- return logWorkbench(((CoreException) t).getStatus(), level);
- if (level == DEFAULT)
- level = Level.SEVERE;
- if (isLogging(level)) {
- return logWorkbench(t, level);
- } else
- return NOLOG_DESCRIPTION;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/logger/proxyrender/ConsoleLogRenderer.java b/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/logger/proxyrender/ConsoleLogRenderer.java
deleted file mode 100644
index 90b2963e7..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/logger/proxyrender/ConsoleLogRenderer.java
+++ /dev/null
@@ -1,67 +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
- *******************************************************************************/
-/*
- * $RCSfile: ConsoleLogRenderer.java,v $
- * $Revision: 1.2 $ $Date: 2005/02/15 23:04:14 $
- */
-package org.eclipse.jem.util.logger.proxyrender;
-
-import java.util.logging.Level;
-
-import org.eclipse.jem.util.logger.proxy.ILogRenderer;
-import org.eclipse.jem.util.logger.proxy.Logger;
-
-
-/**
- * Log renderer to the console.
- *
- * @since 1.0.0
- */
-public class ConsoleLogRenderer extends AbstractWorkBenchRenderer {
-
- /**
- * Constructor taking a logger.
- *
- * @param logger
- *
- * @since 1.0.0
- */
- public ConsoleLogRenderer(Logger logger) {
- super(logger);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.logger.proxyrender.AbstractWorkBenchRenderer#log(java.lang.String)
- */
- public String log(String msg) {
-
- System.out.println(msg);
- return ILogRenderer.CONSOLE_DESCRIPTION;
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.logger.proxyrender.AbstractWorkBenchRenderer#log(java.lang.String, java.util.logging.Level, boolean)
- */
- protected void log(String msg, Level l, boolean loggedToWorkbench) {
- if (!loggedToWorkbench || !consoleLogOn) {
- if (l == Level.SEVERE)
- System.err.println(msg);
- else
- System.out.println(msg);
- }
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/logger/proxyrender/DefaultPluginTraceRenderer.java b/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/logger/proxyrender/DefaultPluginTraceRenderer.java
deleted file mode 100644
index bedf203c7..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/logger/proxyrender/DefaultPluginTraceRenderer.java
+++ /dev/null
@@ -1,113 +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
- *******************************************************************************/
-/*
- * $RCSfile: DefaultPluginTraceRenderer.java,v $
- * $Revision: 1.2 $ $Date: 2005/02/15 23:04:14 $
- */
-package org.eclipse.jem.util.logger.proxyrender;
-
-import java.io.*;
-import java.util.logging.Level;
-
-import org.eclipse.core.runtime.Platform;
-
-import org.eclipse.jem.util.logger.proxy.Logger;
-
-
-/**
- * Logger that also logs to a trace file in the plugin's metadata area.
- *
- * @since 1.0.0
- */
-public class DefaultPluginTraceRenderer extends AbstractWorkBenchRenderer {
-
- /**
- * Name of the trace file in the metadata area.
- *
- * @since 1.0.0
- */
- public static final String PluginTraceFileName = "/.log"; //$NON-NLS-1$
-
- private String fTraceFile = null;
-
- private PrintWriter traceFile = null;
-
- /**
- * DefaultUILogRenderer constructor.
- *
- * @param logger
- */
- public DefaultPluginTraceRenderer(Logger logger) {
- super(logger);
-
- fTraceFile = Platform.getStateLocation(fMyBundle).toString() + PluginTraceFileName;
- (new File(fTraceFile)).delete(); // Start from fresh ... do not want to leak on disk space
-
- }
-
- private void closeTraceFile() {
- if (traceFile == null)
- return;
- try {
- traceFile.flush();
- traceFile.close();
- } finally {
- traceFile = null;
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.logger.proxyrender.AbstractWorkBenchRenderer#log(java.lang.String)
- */
- public String log(String msg) {
-
- System.out.println(msg);
-
- openTraceFile();
- if (traceFile != null) {
- traceFile.println(msg);
- closeTraceFile();
- }
- return fTraceFile;
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.logger.proxyrender.AbstractWorkBenchRenderer#log(java.lang.String, java.util.logging.Level, boolean)
- */
- protected void log(String msg, Level l, boolean loggedToWorkbench) {
- if (!loggedToWorkbench || !consoleLogOn) {
- if (l == Level.SEVERE)
- System.err.println(msg);
- else
- System.out.println(msg);
- }
-
- openTraceFile();
- if (traceFile != null) {
- traceFile.println(msg);
- closeTraceFile();
- }
- }
-
- private void openTraceFile() {
- try {
- traceFile = new PrintWriter(new FileOutputStream(fTraceFile, true));
- } catch (IOException e) {
- // there was a problem opening the log file so log to the console
- traceFile = null;
- }
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/logger/proxyrender/EclipseLogger.java b/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/logger/proxyrender/EclipseLogger.java
deleted file mode 100644
index 9e40f90f6..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/logger/proxyrender/EclipseLogger.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * $RCSfile: EclipseLogger.java,v $
- * $Revision: 1.4 $ $Date: 2005/08/24 21:10:34 $
- */
-package org.eclipse.jem.util.logger.proxyrender;
-
-import java.util.logging.Level;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.Bundle;
-
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jem.util.plugin.JEMUtilPlugin;
-
-
-/**
- * Get an Eclipse logger. This gets a logger that knows it is for a plugin.
- *
- * For each plugin, the following can be specified in the .option file:
- * {plugin-id}/debug/logTrace
- * The values valid for this are "true", "false", or "default". If true then loggers will be set into
- * trace mode. This means everything logged (even those that are filtered out due to not meeting log level)
- * will be traced out. If the value is "true" they will be traced to the system console.
- * If it is "default" or not set at all, then it will be the value in the "org.eclipse.jem.util/debug/logTrace" .options setting.
- * If not set there, then default value will be false.
- *
- * {plugin-id}/debug/logTraceFile
- * The values valid for this are "true", "false", or "default". If true then loggers will trace to
- * the system console AND to the ".log" file in the plugins work area in the metadata section of the workspace.
- * If "false" then not traced to a trace file.
- * If it is "default" or not set at all, then it will be the value in the "org.eclipse.jem.util/debug/logTraceFile" .options setting.
- * If not set there, then default value will be false.
- *
- * {plugin-id}.debug/logLevel
- * The values valid for this are the names from <code>java.util.logging.Level</code>, and "default". These
- * are the trace cutoff levels to use. For instance, if the level was SEVERE, then only level SEVERE msgs
- * are logged. The rest are skipped. Or if the level was WARNING, then only level SEVERE and WARNING are
- * logged.
- * If it is "default" or not set at all, then it will be the value in the "org.eclipse.jem.util/debug/logLevel" .options setting.
- * If not set there, then default value will be WARNING.
- *
- *
- * @since 1.0.0
- */
-public class EclipseLogger extends Logger {
-
- public static final String DEBUG_TRACE_OPTION = "/debug/logtrace"; //$NON-NLS-1$
- public static final String DEBUG_TRACE_FILE_OPTION = "/debug/logtracefile"; //$NON-NLS-1$
- public static final String DEBUG_LOG_LEVEL_OPTION = "/debug/loglevel"; // The logging level to use when no Hyaedes. (which we don't support at this time). //$NON-NLS-1$
- public static final String DEFAULT_OPTION = "default"; // If option value is this, then the value from WTP Common plugin options will be used for both logTrace and logLevel. //$NON-NLS-1$
-
- /**
- * Return a logger based upon the Plugin.
- * @param plugin
- * @return
- *
- * @since 1.0.0
- */
- public static Logger getEclipseLogger(Plugin plugin) {
- return getEclipseLogger(plugin.getBundle());
- }
-
- /**
- * Return a logger based upon the bundle.
- *
- * @param bundle
- * @return
- *
- * @since 1.0.0
- */
- public static Logger getEclipseLogger(Bundle bundle) {
- String id = bundle.getSymbolicName();
- Logger logger = getLoggerIfExists(id);
- if (logger != null)
- return logger;
-
- logger = getLogger(id); // Create one, we will now customize it.
-
- String pluginOption = Platform.getDebugOption(id + DEBUG_TRACE_OPTION);
- if (pluginOption == null || "default".equalsIgnoreCase(pluginOption)) //$NON-NLS-1$
- pluginOption = Platform.getDebugOption(JEMUtilPlugin.getDefault().getBundle().getSymbolicName() + DEBUG_TRACE_OPTION);
- boolean logTrace = "true".equalsIgnoreCase(pluginOption); //$NON-NLS-1$
-
- pluginOption = Platform.getDebugOption(id + DEBUG_TRACE_FILE_OPTION);
- if (pluginOption == null || "default".equalsIgnoreCase(pluginOption)) //$NON-NLS-1$
- pluginOption = Platform.getDebugOption(JEMUtilPlugin.getDefault().getBundle().getSymbolicName() + DEBUG_TRACE_FILE_OPTION);
- boolean logTraceFile = "true".equalsIgnoreCase(pluginOption); //$NON-NLS-1$
-
- pluginOption = Platform.getDebugOption(id + DEBUG_LOG_LEVEL_OPTION);
- if (pluginOption == null || "default".equalsIgnoreCase(pluginOption)) //$NON-NLS-1$
- pluginOption = Platform.getDebugOption(JEMUtilPlugin.getDefault().getBundle().getSymbolicName() + DEBUG_LOG_LEVEL_OPTION);
-
- Level logLevel = Level.WARNING;
- if (pluginOption != null) {
- try {
- logLevel = Level.parse(pluginOption);
- } catch (IllegalArgumentException e) {
- }
- }
-
- if (logTrace)
- logger.setTraceMode(true);
- logger.setLevel(logLevel);
- if (!logTraceFile)
- logger.setRenderer(new ConsoleLogRenderer(logger));
- else
- logger.setRenderer(new DefaultPluginTraceRenderer(logger));
-
- return logger;
- }
-
-}
diff --git a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/logger/proxyrender/IMsgLogger.java b/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/logger/proxyrender/IMsgLogger.java
deleted file mode 100644
index 972ecdd17..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/logger/proxyrender/IMsgLogger.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
- *******************************************************************************/
-/*
- * $RCSfile: IMsgLogger.java,v $
- * $Revision: 1.2 $ $Date: 2005/02/15 23:04:14 $
- */
-package org.eclipse.jem.util.logger.proxyrender;
-
-import org.eclipse.jem.util.logger.proxy.Logger;
-
-/**
- * Interface for a message logger.
- *
- * @since 1.0.0
- */
-public interface IMsgLogger {
- public Logger getMsgLogger();
-}
diff --git a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/plugin/JEMUtilPlugin.java b/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/plugin/JEMUtilPlugin.java
deleted file mode 100644
index a7b9b8f08..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/plugin/JEMUtilPlugin.java
+++ /dev/null
@@ -1,399 +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
- *******************************************************************************/
-/*
- * $$RCSfile: JEMUtilPlugin.java,v $$
- * $$Revision: 1.5 $$ $$Date: 2006/05/17 20:13:45 $$
- */
-package org.eclipse.jem.util.plugin;
-
-import java.io.File;
-import java.text.MessageFormat;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.osgi.framework.Bundle;
-
-import org.eclipse.jem.internal.util.emf.workbench.ProjectResourceSetImpl;
-import org.eclipse.jem.internal.util.emf.workbench.WorkspaceResourceNotifier;
-import org.eclipse.jem.internal.util.emf.workbench.nls.EMFWorkbenchResourceHandler;
-import org.eclipse.jem.util.emf.workbench.ProjectResourceSet;
-import org.eclipse.jem.util.emf.workbench.ResourceHandler;
-import org.eclipse.jem.util.logger.proxy.Logger;
-
-
-/**
- * Plugin for EMFWorkbench utils.
- *
- * @since 1.0.0
- */
-public class JEMUtilPlugin extends Plugin {
-
- public static final String ID = "org.eclipse.jem.util"; //$NON-NLS-1$
-
- /**
- * Plugin id of this plugin.
- *
- * @since 1.0.0
- */
- public static final String PLUGIN_ID = ID;
-
- /**
- * UI Context extension point.
- *
- * @since 1.0.0
- */
- public static final String UI_CONTEXT_EXTENSION_POINT = "uiContextSensitiveClass"; //$NON-NLS-1$
-
- /**
- * UITester element name.
- *
- * @since 1.0.0
- */
- public static final String UI_TESTER_EXTENSION_POINT = "uiTester"; //$NON-NLS-1$
-
- /**
- * Protocol for workspace
- *
- * @since 1.0.0
- */
- public static final String WORKSPACE_PROTOCOL = "workspace"; //$NON-NLS-1$
-
- /**
- * Protocol for platform uri's. i.e. "platform:/..."
- *
- * @since 1.0.0
- *
- */
- public static final String PLATFORM_PROTOCOL = "platform"; //$NON-NLS-1$
-
- /**
- * Resource indication in platform protocol. Indicates url is for a resource in the workspace. i.e. "platform:/resource/projectname/..."
- *
- * @since 1.0.0
- */
- public static final String PLATFORM_RESOURCE = "resource"; //$NON-NLS-1$
-
- /**
- * Plugin indication in platform protocol. Indicates url is for a file/directory in the plugins area. i.e. "platform:/plugin/pluginid/..."
- *
- * @since 1.0.0
- */
- public static final String PLATFORM_PLUGIN = "plugin"; //$NON-NLS-1$
-
- private static WorkspaceResourceNotifier sharedCache;
-
- private static ResourceSet pluginResourceSet;
-
- private static String[] GLOBAL_LOADING_PLUGIN_NAMES;
-
- private static JEMUtilPlugin DEFAULT;
-
- public JEMUtilPlugin() {
- super();
- DEFAULT = this;
- }
-
- /**
- * Get the workspace. Just use ResourcePlugin.getWorkspace() instead.
- *
- * @return
- *
- * @since 1.0.0
- */
- public static IWorkspace getWorkspace() {
- return ResourcesPlugin.getWorkspace();
- }
-
- /**
- * Get the plugin instance.
- *
- * @return plugin instance.
- *
- * @since 1.0.0
- */
- public static JEMUtilPlugin getDefault() {
- return DEFAULT;
- }
-
- /**
- * Gets the sharedCache.
- * <p>
- * This is not meant to be called by clients.
- * </p>
- *
- * @return a WorkspaceResourceNotifier
- * @since 1.0.0
- */
- public static WorkspaceResourceNotifier getSharedCache() {
- if (sharedCache == null)
- sharedCache = new WorkspaceResourceNotifier();
- return sharedCache;
- }
-
- /**
- * Sets the sharedCache.
- * <p>
- * This is not meant to be called by clients.
- * </p>
- *
- * @param sharedCache
- * The sharedCache to set
- * @since 1.0.0
- */
- public static void setSharedCache(WorkspaceResourceNotifier aSharedCache) {
- sharedCache = aSharedCache;
- }
-
- /**
- * @deprecated use createIsolatedResourceSet(IProject)
- */
- public static ResourceSet createIsolatedResourceSet() {
- return null;
- }
-
- /**
- * Add an Adapter. You can use this api to listen for any shared resource being loaded or removed from any ProjectResourceSet in the Workbench
- * instead of trying to listen to each individual ProjectResourceSet.
- *
- * @param adapter
- *
- * @since 1.0.0
- */
- public static void addWorkspaceEMFResourceListener(Adapter adapter) {
- if (adapter != null && !getSharedCache().eAdapters().contains(adapter))
- getSharedCache().eAdapters().add(adapter);
- }
-
- /**
- * Removes the adapter.
- *
- * @param adapter
- *
- * @see #addWorkspaceEMFResourceListener(Adapter)
- * @since 1.0.0
- */
- public static void removeWorkspaceEMFResourceListener(Adapter adapter) {
- if (adapter != null)
- getSharedCache().eAdapters().remove(adapter);
- }
-
- /**
- * Is this plugin active.
- *
- * @return <code>true</code> if active
- *
- * @since 1.0.0
- */
- public static boolean isActivated() {
- Bundle bundle = Platform.getBundle(ID);
- if (bundle != null)
- return bundle.getState() == Bundle.ACTIVE;
- return false;
- }
-
- /**
- * This method will be called when a WorkbenchContext is instantiated on an EMFNature.
- * <p>
- * This not meant to be called by clients.
- * </p>
- *
- * @param aResourceSet
- *
- * @see plugin.xml#ResourceHandlerExtension extension point.
- * @since 1.0.0
- */
- public void addExtendedResourceHandlers(ProjectResourceSet aResourceSet) {
- if (aResourceSet == null)
- return;
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IExtensionPoint pct = registry.getExtensionPoint(getBundle().getSymbolicName(), "ResourceHandlerExtension"); //$NON-NLS-1$
- IExtension[] extension = pct.getExtensions();
- IExtension config;
- for (int l = 0; l < extension.length; ++l) {
- config = extension[l];
- IConfigurationElement[] cElems = config.getConfigurationElements();
- ResourceHandler handler = null;
- for (int i = 0; i < cElems.length; i++) {
- try {
- handler = (ResourceHandler) cElems[i].createExecutableExtension("run"); //$NON-NLS-1$
-
- } catch (Exception ex) {
- handler = null;
- }
- if (handler != null)
- aResourceSet.add(handler);
- }
- }
- }
-
- /**
- * Delete the contents of the directory (and the directory if deleteRoot is true).
- * @param root
- * @param deleteRoot <code>true</code> to delete the root directory too.
- * @param monitor
- * @return <code>true</code> if there was an error deleting anything.
- *
- * @since 1.1.0
- */
- public static boolean deleteDirectoryContent(File root, boolean deleteRoot, IProgressMonitor monitor) {
- boolean error = false;
- if (root.canRead()) {
- if (root.isDirectory()) {
- File[] files = root.listFiles();
- monitor.beginTask(MessageFormat.format(EMFWorkbenchResourceHandler.getString("ProjectUtil_Delete_1"), new Object[] {root.getName()}), files.length+(deleteRoot ? 1 : 0)); //$NON-NLS-1$
- for (int i = 0; i < files.length; i++) {
- if (files[i].isDirectory())
- error |= deleteDirectoryContent(files[i], true, new SubProgressMonitor(monitor, 1));
- else {
- error |= !files[i].delete();
- }
- monitor.worked(1);
- }
- } else {
- monitor.beginTask(MessageFormat.format(EMFWorkbenchResourceHandler.getString("ProjectUtil_Delete_1"), new Object[] {root.getName()}), 1); //$NON-NLS-1$
- }
- if (deleteRoot) {
- error |= !root.delete();
- monitor.worked(1);
- }
- monitor.done();
- } else {
- error = true;
- }
- return error;
- }
-
- /**
- * Add a clean resource changelistener.
- * @param listener
- * @param eventMask mask of event types to listen for in addition to ones that are necessary for clean. Use 0 if no additional ones.
- *
- * @since 1.1.0
- */
- public static void addCleanResourceChangeListener(CleanResourceChangeListener listener, int eventMask) {
- // PRE_BUILD: Handle Clean.
- // TODO Until https://bugs.eclipse.org/bugs/show_bug.cgi?id=101942 is fixed, we must do POST_BUILD, that will probably be sent because a clean will cause a build to occur which should cause a delta.
- ResourcesPlugin.getWorkspace().addResourceChangeListener(listener, eventMask | IResourceChangeEvent.POST_BUILD);
- }
-
- /**
- * A resource listener that can be used in addition to listen for Clean requests and process them.
- * <p>
- * Use <code>{@link IResourceChangeEvent#PRE_BUILD}</code> when adding as listener to get the
- * clean events.
- * <p>
- * <b>Note</b> : TODO Until https://bugs.eclipse.org/bugs/show_bug.cgi?id=101942 is fixed, you must do POST_BUILD, that will probably be sent because a clean will cause a build to occur which should cause a delta.
- * @since 1.1.0
- */
- public abstract static class CleanResourceChangeListener implements IResourceChangeListener {
-
- public void resourceChanged(IResourceChangeEvent event) {
- // Subclasses can override this to handle more events than just clean.
- if (event.getBuildKind() == IncrementalProjectBuilder.CLEAN_BUILD) {
- if (event.getSource() instanceof IProject)
- cleanProject((IProject) event.getSource());
- else if (event.getSource() instanceof IWorkspace)
- cleanAll();
- }
- }
-
- /**
- * Clear out the project.
- * @param project
- *
- * @since 1.1.0
- */
- protected abstract void cleanProject(IProject project);
-
- /**
- * Clean all.
- * <p>
- * By default this will simply call a clean project on each open project. Subclasses should override and either
- * add more function to clear out non-project data and then call super. Or if they can handle all of the projects
- * in a faster way, then can completely handle this.
- *
- * @since 1.1.0
- */
- protected void cleanAll() {
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- for (int i = 0; i < projects.length; i++) {
- IProject project = projects[i];
- if (project.isOpen()) {
- cleanProject(project);
- }
- }
- }
- }
-
- /**
- * Get the project resource set for the plugin (there is one for the whole system).
- *
- * @return system-wide resource set.
- * @since 1.0.0
- */
- public static ResourceSet getPluginResourceSet() {
- if (pluginResourceSet == null)
- pluginResourceSet = new ProjectResourceSetImpl(null);
- return pluginResourceSet;
- }
-
- /**
- * Set the system-wide resource set.
- *
- * @param set
- * @since 1.0.0
- */
- public static void setPluginResourceSet(ResourceSet set) {
- pluginResourceSet = set;
- }
-
- /**
- * Get the global loading plugin names.
- * <p>
- * This is not meant to be called by clients.
- * </p>
- *
- * @return
- *
- * @since 1.0.0
- */
- public static String[] getGlobalLoadingPluginNames() {
- if (GLOBAL_LOADING_PLUGIN_NAMES == null)
- GLOBAL_LOADING_PLUGIN_NAMES = readGlobalLoadingPluginNames();
- return GLOBAL_LOADING_PLUGIN_NAMES;
- }
-
- /**
- * Get the Logger for this plugin.
- *
- * @return logger for this plugin.
- *
- * @since 1.0.0
- */
- public static Logger getLogger() {
- return Logger.getLogger(ID);
- }
-
- private static String[] readGlobalLoadingPluginNames() {
- IExtensionRegistry reg = Platform.getExtensionRegistry();
- IExtensionPoint exPoint = reg.getExtensionPoint(ID, "globalPluginResourceLoad"); //$NON-NLS-1$
- IExtension[] extensions = exPoint.getExtensions();
- String[] names = new String[extensions.length];
- if (extensions.length > 0) {
- for (int i = 0; i < extensions.length; i++)
- names[i] = extensions[i].getContributor().getName();
- }
- return names;
- }
-
-}
diff --git a/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/.classpath b/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/.classpath
deleted file mode 100644
index 065ac06e1..000000000
--- a/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/.cvsignore b/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/.cvsignore
deleted file mode 100644
index c5e82d745..000000000
--- a/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin \ No newline at end of file
diff --git a/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/.project b/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/.project
deleted file mode 100644
index 5e29c8204..000000000
--- a/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.perfmsr.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/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/PERFMSR.README.txt b/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/PERFMSR.README.txt
deleted file mode 100644
index 3186a369f..000000000
--- a/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/PERFMSR.README.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-This is a stub plugin for perfmsr. It is here just so that org.eclipse.jem.util can compile.
-
-It should not be an open project during normal usage. Whenever any of the files in this project
-are changed, "perfmsr.jardesc" should be used to create the new changed appropriate jar. Do this by:
-
-1) Select perfmsr.jardesc
-2) On popup menu select "Create JAR"
-3) Hit "Finish"
-4) Commit all changes to CVS.
-5) Go to org.eclipse.jem.util project, select the org.eclipse.perfmsr.core.stub folder
- and select Replace->Latest from HEAD. This will cause your just committed changes
- from step 4 to be put into org.eclipse.jem.util and will be picked up for that
- plugin to compile against.
-6) Either close or delete the org.eclipse.perfmsr.core.stuf project from the workspace. \ No newline at end of file
diff --git a/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/about.html b/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/about.html
deleted file mode 100644
index f9f238ed9..000000000
--- a/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/about.html
+++ /dev/null
@@ -1,32 +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">
-<h2>About This Content</h2>
-
-<p>30th March, 2004</p>
-<h3>License</h3>
-<p>Eclipse.org 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/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<h3>Contributions</h3>
-
-<p>If this Content is licensed to you under the terms and conditions of the EPL, any Contributions, as defined in the EPL, uploaded, submitted, or otherwise
-made available to Eclipse.org, members of Eclipse.org and/or the host of Eclipse.org web site, by you that relate to such
-Content are provided under the terms and conditions of the EPL and can be made available to others under the terms of the EPL.</p>
-
-<p>If this Content is licensed to you under license terms and conditions other than the EPL (&quot;Other License&quot;), any modifications, enhancements and/or
-other code and/or documentation (&quot;Modifications&quot;) uploaded, submitted, or otherwise made available to Eclipse.org, members of Eclipse.org and/or the
-host of Eclipse.org, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
-to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also
-providing the Modifications under the terms and conditions of the EPL and such Modifications can be made available to others under the terms of
-the EPL.</p>
-
-<p><b>Version:</b> v20040624a
-
-</body>
-</html> \ No newline at end of file
diff --git a/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/build.properties b/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/build.properties
deleted file mode 100644
index 3a4db5731..000000000
--- a/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.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,\
- plugin.properties,\
- *.jar
-source.perfmsr.jar = src/
diff --git a/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/perfmsr.jar b/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/perfmsr.jar
deleted file mode 100644
index 1ebba8f4f..000000000
--- a/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/perfmsr.jar
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/perfmsr.jardesc b/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/perfmsr.jardesc
deleted file mode 100644
index d48e22352..000000000
--- a/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/perfmsr.jardesc
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<jardesc>
- <jar path="org.eclipse.perfmsr.core.stub/perfmsr.jar"/>
- <options buildIfNeeded="true" compress="true" descriptionLocation="/org.eclipse.perfmsr.core.stub/perfmsr.jardesc" exportErrors="true" exportWarnings="true" overwrite="false" saveDescription="true" useSourceFolders="false"/>
- <manifest generateManifest="true" manifestLocation="/VEScrapProject/MANIFEST.mf" manifestVersion="1.0" reuseManifest="false" saveManifest="false" usesManifest="true">
- <sealing sealJar="false">
- <packagesToSeal/>
- <packagesToUnSeal/>
- </sealing>
- </manifest>
- <selectedElements exportClassFiles="true" exportJavaFiles="true" exportOutputFolder="false">
- <javaElement handleIdentifier="=org.eclipse.perfmsr.core.stub/src"/>
- </selectedElements>
-</jardesc>
diff --git a/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/plugin.properties b/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/plugin.properties
deleted file mode 100644
index 5720eeb98..000000000
--- a/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-Plugin.name=Performance Monitor
-
diff --git a/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/plugin.xml b/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/plugin.xml
deleted file mode 100644
index 596926d01..000000000
--- a/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/plugin.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.perfmsr.core"
- name="%Plugin.name"
- version="3.0.0"
- provider-name="Eclipse.org"
- class="org.eclipse.perfmsr.core.PerfMsrCorePlugin">
-
- <runtime>
- <library name="perfmsr.jar"><export name="*"/></library>
- </runtime>
-
- <requires>
- <import plugin="org.eclipse.core.runtime"/>
- </requires>
-</plugin>
diff --git a/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/src/org/eclipse/perfmsr/core/IPerformanceMonitor.java b/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/src/org/eclipse/perfmsr/core/IPerformanceMonitor.java
deleted file mode 100644
index bd992c788..000000000
--- a/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/src/org/eclipse/perfmsr/core/IPerformanceMonitor.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.perfmsr.core;
-
-/**
- * Take snapshots of the various performance counters.
- * ************* This is just a stub of the real interface to get org.eclipse.jem.util
- * to compile. It is not usable by itself. ****************************
- */
-public interface IPerformanceMonitor
-{
- /**
- * These constants control how much information is gathered for a particular snapshot.
- * They are or'ed together and passed into the snapshot method.
- */
- interface Types
- {
- /**
- * 1 - Write out the performance counters from the operating system. These
- * include working set, peak working set, elapsed time, user time, and
- * kernel time.
- */
- int OperatingSystemCounters = 1;
-
- /**
- * 2 - Write out the global performance info. This includes things like the total
- * committed memory for the entire system.
- *
- * This function depends on the GetPerformanceInfo() function being available in
- * the Windows psapi.dll. This is available in XP but is usually not available
- * in Win/2000. If it is not available then this function throws an UnsupportedOperationException.
- */
- int GlobalSystemCounters = 2;
-
- /**
- * 4 - Write out the size of the Java Heap.
- */
- int JavaHeapSize = 4;
-
- /**
- * 8 - Write out how much of the Java heap is being used. This calls the
- * garbage collector so it may skew timing results.
- */
- int JavaHeapUsed = 8;
-
- /**
- * 16 - The plugin startup and size information.
- */
- int PluginInfo = 16;
-
- /** 0xffff - Everything. */
- int All = 0xffff;
- }
-
- /**
- * Add some more "extra" variations.
- *
- * The variations that are in effect are made up of these extra variations plus any variations
- * that may have been set with the setVar() method.
- *
- * @param varList a comma separated list of variations
- */
- public void addVarAppend(String varList);
-
- /**
- * Set the driver name.
- *
- * @param driver a label that identifies the driver that is being tested. If it is a WSAD
- * driver, this will usually be set by the extension.
- */
- public void setDriver(String driver);
-
- /**
- * Set the location of the performance measurement file, that is the place where
- * the measurements are stored.
- *
- * @param logFile the file name of where the log should be written. Usually this is fully qualified
- * path name. For example "x:\logs\timer.xml".
- */
- public void setLogFile(String logFile);
-
- /**
- * Set the performance monitor to be on or off. If it is off then most of the other
- * operations will no-op.
- *
- * The default is for the performance monitor to be off unless it's special environment variable is set.
- * When called from the UI, the UI should call this to make sure that it is on.
- */
- public void setIsOn(boolean isOn);
-
- /**
- * Sets the test case number for this measurement run.
- *
- * @param testd test case identifier
- */
- public void setTestd(int testd);
-
- /**
- * Sets the test case name. If will cause a new test case to be created if it does not already exist.
- *
- * @param testName a simple (short) test case name. In the case of JUnit test cases, it would usually
- * be the JUnit name.
- */
- public void setTestName(String testName);
-
- /**
- * Set the variations that are in effect.
- *
- * @param var a comma delimited string of variation numbers
- */
- public void setVar(String var);
-
- /**
- * Set the upload host
- *
- * @param host DNS name of the upload host
- */
- public void setUploadHost(String host);
-
- /**
- * Set the upload port
- *
- * @param port upload port
- */
- public void setUploadPort(int port);
-
- /**
- * Set the upload userid
- *
- * @param userid
- */
- public void setUploadUserid(String userid);
-
- /**
- * Take a snapshot of some default performance measurements.
- *
- * @param step this identifies the step that the snapshot is for
- */
- void snapshot(int step);
-
- /**
- * Take a snapshot of the selected performance measurements.
- *
- * @param step this identifies the step that the snapshot is for
- *
- * @param types This controls which measurements are selected. It is an or'd together
- * list of the IPerformanceMonitor.Types constants.
- *
- * @see IPerformanceMonitor.Types
- */
- void snapshot(int step, int types);
-
- /**
- * Write the comment to the performance measurement file.
- *
- * @param comment
- */
- void writeComment(String comment);
-
- /**
- * Upload the results to the server. This causes the file to be
- * closed, and the monitor to be placed into the finished state.
- *
- * This method can only be called if the uploadhost, uploadport and uploaduserid
- * have been configured before hand.
- *
- * @param description an optional description (it can be null)
- *
- * @return some status information
- */
- public Upload.Status upload(String description);
-//
-// /**
-// * Upload the results to the server. This causes the file to be
-// * closed, and the monitor to be placed into the finished state.
-// *
-// * @param host the host name that the file is being sent to
-// * @param port the port on the host
-// * @param userid the userid that is doing the upload
-// * @param description an optional description (it can be null)
-// *
-// * @return some status information
-// */
-// Upload.Status upload(String host, int port, String userid, String description);
-
-
-}
diff --git a/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/src/org/eclipse/perfmsr/core/PerfMsrCorePlugin.java b/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/src/org/eclipse/perfmsr/core/PerfMsrCorePlugin.java
deleted file mode 100644
index 2b86e9ef2..000000000
--- a/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/src/org/eclipse/perfmsr/core/PerfMsrCorePlugin.java
+++ /dev/null
@@ -1,31 +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
- *******************************************************************************/
-/*
- * $RCSfile: PerfMsrCorePlugin.java,v $
- * $Revision: 1.2 $ $Date: 2005/02/15 23:06:47 $
- */
-package org.eclipse.perfmsr.core;
-
-import org.eclipse.core.runtime.Plugin;
-
-
-/**
- * ************* This is just a stub of the real class to get org.eclipse.jem.util
- * to compile. It is not usable by itself. ****************************
- * @since 1.0.0
- */
-public class PerfMsrCorePlugin extends Plugin {
-
- public static IPerformanceMonitor getPerformanceMonitor(boolean bool) {
- return null;
- }
-
-}
diff --git a/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/src/org/eclipse/perfmsr/core/Upload.java b/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/src/org/eclipse/perfmsr/core/Upload.java
deleted file mode 100644
index c412f52ef..000000000
--- a/plugins/org.eclipse.jem.util/org.eclipse.perfmsr.core.stub/src/org/eclipse/perfmsr/core/Upload.java
+++ /dev/null
@@ -1,27 +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
- *******************************************************************************/
-/*
- * $RCSfile: Upload.java,v $
- * $Revision: 1.2 $ $Date: 2005/02/15 23:06:47 $
- */
-package org.eclipse.perfmsr.core;
-
-
-/**
- * Upload.
- * ************* This is just a stub of the real interface to get org.eclipse.jem.util
- * to compile. It is not usable by itself. ****************************
- */
-public interface Upload {
- public static class Status {
- public boolean success;
- }
-}
diff --git a/plugins/org.eclipse.jem.util/plugin.properties b/plugins/org.eclipse.jem.util/plugin.properties
deleted file mode 100644
index a53db6a99..000000000
--- a/plugins/org.eclipse.jem.util/plugin.properties
+++ /dev/null
@@ -1,18 +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
-###############################################################################
-#
-# $Source: /cvsroot/webtools/common.move/webtools.common.git/plugins/org.eclipse.jem.util/plugin.properties,v $
-# $Revision: 1.2 $ $Date: 2005/02/15 23:07:45 $
-#
-
-
-pluginName=Java EMF Model Utilities
-providerName = Eclipse.org
diff --git a/plugins/org.eclipse.jem.util/plugin.xml b/plugins/org.eclipse.jem.util/plugin.xml
deleted file mode 100644
index 591be4264..000000000
--- a/plugins/org.eclipse.jem.util/plugin.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
-
-<!-- Extension point to register ResourceHandlers that will always be added to
- new WorkbenchContexts -->
- <extension-point id="ResourceHandlerExtension" name="ResourceHandlerExtension"/>
- <extension-point id="globalPluginResourceLoad" name="Global Plugin Resource Load"/>
- <extension-point id="nature_registration" name="EMF Nature registration"/>
- <extension-point id="internalWorkbenchContextFactory" name="Internal Workbench Context Factory"/>
- <extension-point id="uiContextSensitiveClass" name="UI Context Sensitive Class" schema="schema/uiContextSensitiveClass.exsd"/>
- <extension-point id="uiTester" name="UI Tester" schema="schema/uiTester.exsd"/>
-
-</plugin>
diff --git a/plugins/org.eclipse.jem.util/property_files/emfworkbench.properties b/plugins/org.eclipse.jem.util/property_files/emfworkbench.properties
deleted file mode 100644
index cad9483f0..000000000
--- a/plugins/org.eclipse.jem.util/property_files/emfworkbench.properties
+++ /dev/null
@@ -1,18 +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
-###############################################################################
-EMFWorkbenchContextBase_ERROR_0=IWAE0003E Method not yet implemented.
-EMFWorkbenchContextBase_ERROR_1=IWAE0005E Project can not be null.
-EMFWorkbenchContextBase_ERROR_2=IWAE0006E Attempt to create resource set with null project
-EMFNatureRegistry_ERROR_0=IWAE0007E Duplicate EMF nature registration for id: {0}
-EMFWorkbenchContextFactory_UI_0=The project should not be null.
-EMFWorkbenchContextFactory_UI_1=The project \"{0}\" is not accessible.
-
-ProjectUtil_Delete_1=Deleting \"{0}\". \ No newline at end of file
diff --git a/plugins/org.eclipse.jem.util/schema/uiContextSensitiveClass.exsd b/plugins/org.eclipse.jem.util/schema/uiContextSensitiveClass.exsd
deleted file mode 100644
index df70e98c0..000000000
--- a/plugins/org.eclipse.jem.util/schema/uiContextSensitiveClass.exsd
+++ /dev/null
@@ -1,169 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.jem.util">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.jem.util" id="uiContextSensitiveClass" name="UI Context Sensitive Class"/>
- </appInfo>
- <documentation>
- Components are often designed in such a way that the &quot;Headless&quot; or non-graphical portions are separate from the Graphical User Interface (GUI) portions. Sometimes this is done to follow good design principles, other times there is a specific use case for doing so. When plugins follow this practice because they must vary their behavior based on whether they are running in a headless environment or a graphical environment, they often need to choose the correct implementation of a particular type. The org.eclipse.jem.util.uiContextSensitiveClass extension point provided by the JEM component solves exactly this problem.
-&lt;p&gt;
-To use the extension point, you must provide two extensions that are linked by a key. The key is a unique String-based value that you will later use to instanitate your class.
-&lt;p&gt;
-The first usage of the extension specifies your key, and the Headless context, and the class that should be instantiated for this (key, context) pair. This means in the headless environment this class will be instantiated when requested.
-&lt;p&gt;
-The second extension specifies the UI context and the same key, but a different implementation designed for graphical environments. This means in the UI environment this other class will be instantiated when requested.
-&lt;p&gt;
-The actual request is done in your code via:
-&lt;pre&gt;
-IMyInterface instance = (IMyInterface) UIContextDetermination.createInstance(&quot;myKey&quot;);
-&lt;/pre&gt;
-where &lt;code&gt;&quot;myKey&quot;&lt;/code&gt; is the key used on both extensions. It will then choose either the UI or the Headless extension depending upon the context.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="uiContextSensitiveClass" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="uiContextSensitiveClass">
- <annotation>
- <documentation>
- An extension point that defines an instance of a class and its appropriate context (UI or Headless)
- </documentation>
- </annotation>
- <complexType>
- <attribute name="key" type="string" use="required">
- <annotation>
- <documentation>
- The key that should be used to create an instance of the Context Sensitive super class/interface.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="className" type="string" use="required">
- <annotation>
- <documentation>
- A concrete implementation for either a UI or Headless context.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="context" use="required">
- <annotation>
- <documentation>
- One of &quot;UI&quot; or &quot;Headless&quot; This is case-sensitive. It must match exactly as shown here.
- </documentation>
- </annotation>
- <simpleType>
- <restriction base="string">
- <enumeration value="UI">
- </enumeration>
- <enumeration value="Headless">
- </enumeration>
- </restriction>
- </simpleType>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 6.0
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- Usage for the UI context:
-&lt;pre&gt;
- &lt;extension
- id=&quot;context.Sensitive.Class.workingCopyManager&quot;
- name=&quot;Working Copy Manager - UI Context Class&quot;
- point=&quot;org.eclipse.jem.util.ContextSensitiveClass&quot;&gt;
- &lt;uiContextSensitiveClass
- context=&quot;UI&quot;
- key=&quot;workingCopyManager&quot;
- className=&quot;com.ibm.wtp.common.ui.WTPUIWorkingCopyManager&quot;/&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
-&lt;br&gt;
-Usage for the Headless context:
-&lt;pre&gt;
- &lt;extension
- id=&quot;context.Sensitive.Class.workingCopyManager&quot;
- name=&quot;Working Copy Manager - Headless Context Class&quot;
- point=&quot;org.eclipse.jem.util.ContextSensitiveClass&quot;&gt;
- &lt;uiContextSensitiveClass
- context=&quot;Headless&quot;
- key=&quot;workingCopyManager&quot;
- className=&quot;com.ibm.wtp.common.ui.WTPHeadlessWorkingCopyManager&quot;/&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
-&lt;br&gt;
-And finally the retrieval of the class for the current context:
-
-&lt;pre&gt;
-IWorkingCopyManager manager = (IWorkingCopyManager) UIContextDetermination.createInstance(&quot;workingCopyManager&quot;);
-&lt;/pre&gt;
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- See &lt;code&gt;org.eclipse.jem.util.UIContextDetermination&lt;/code&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) IBM 2003.
- </documentation>
- </annotation>
-
-</schema>
diff --git a/plugins/org.eclipse.jem.util/schema/uiTester.exsd b/plugins/org.eclipse.jem.util/schema/uiTester.exsd
deleted file mode 100644
index 729ab32cf..000000000
--- a/plugins/org.eclipse.jem.util/schema/uiTester.exsd
+++ /dev/null
@@ -1,128 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.jem.util">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.jem.util" id="uiTester" name="UI Tester"/>
- </appInfo>
- <documentation>
- This is used to tell JEM that it is running in a non-HEADLESS environment. Typically UI environment is non-HEADLESS. The default if there are no implementers of this extension point that return true is HEADLESS.
-&lt;p&gt;
-A HEADLESS environment is typically a batch situation where there is no UI and the workspace is used for one operation and then terminated. Most headless tasks are done under one operation and the JavaReflectionSynchronizer may not have a chance to flush a bad reflection before the real type needs to be found and can be found. So what would happen is if a class was created during this one operation it would not be found because the notifications had not yet gone out.
-&lt;p&gt;
-In a UI environment the operations are typically short and do only a few things and the results aren&apos;t needed until after the operation has completed. In that case it is more efficient to not keep checking if a class has appeared everytime a request is made, instead it will wait for the notification of the added class to appear before resetting the definition to allow checking again later.
-&lt;p&gt;
-If there is more than one implementer of this interface in the application, then it will go through each of them once until one returns true. As soon as one returns true it will stop and mark the application as being non-HEADLESS. This will be done only once for the application. It will not be again until the next session of the application.
-&lt;p&gt;
-This is typically an internal extension point only. The JEM UI plugin will provide an implementation that will return true if the Platform UI is active. So this will normally not be needed to be implemented by most customers.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="uiTester"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="uiTester">
- <annotation>
- <documentation>
- The uiTester definition element.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="className" type="string" use="required">
- <annotation>
- <documentation>
- The class name of the UITester for this extension. It must implement &lt;samp&gt;org.eclipse.jem.util.UITester&lt;/samp&gt;.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.jem.util.UITester"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 1.0.0
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of an implementer:
-
-&lt;p&gt;
-&lt;pre&gt;
- &lt;extension point=&quot;org.eclipse.jem.util.uiTester&quot;&gt;
- &lt;uiTester
- className=&quot;com.example.UITesterImplementation&quot;/&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
-&lt;/p&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- The &lt;samp&gt;className&lt;/samp&gt; attribute must be a fully-qualified class that implements the &lt;samp&gt;org.eclipse.jem.util.UITester&lt;/samp&gt; interface for the tester.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- There is no default implementation for this class.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2004, 2006 IBM Corporation and others.&lt;br&gt;
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Eclipse Public License v1.0 which accompanies
-this distribution, and is available at
-&lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </documentation>
- </annotation>
-
-</schema>
diff --git a/plugins/org.eclipse.wst.common.core/.classpath b/plugins/org.eclipse.wst.common.core/.classpath
deleted file mode 100644
index 202d634e7..000000000
--- a/plugins/org.eclipse.wst.common.core/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src-search"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.wst.common.core/.cvsignore b/plugins/org.eclipse.wst.common.core/.cvsignore
deleted file mode 100644
index 0f861fdeb..000000000
--- a/plugins/org.eclipse.wst.common.core/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-bin
-build.xml
-javaCompiler...args
-src.zip
-@dot
-temp.folder
diff --git a/plugins/org.eclipse.wst.common.core/.options b/plugins/org.eclipse.wst.common.core/.options
deleted file mode 100644
index 2e5ed2a14..000000000
--- a/plugins/org.eclipse.wst.common.core/.options
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.wst.common.search/perf=false \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.core/.project b/plugins/org.eclipse.wst.common.core/.project
deleted file mode 100644
index 6bb12ef5e..000000000
--- a/plugins/org.eclipse.wst.common.core/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.common.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/plugins/org.eclipse.wst.common.core/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.wst.common.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 7406de6ec..000000000
--- a/plugins/org.eclipse.wst.common.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,59 +0,0 @@
-#Mon Jan 30 23:40:52 EST 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-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.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=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-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=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-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=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-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=ignore
-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=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-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=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/plugins/org.eclipse.wst.common.core/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.wst.common.core/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index c68ceb49c..000000000
--- a/plugins/org.eclipse.wst.common.core/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Mon Jan 30 19:45:41 EST 2006
-eclipse.preferences.version=1
-internal.default.compliance=default
diff --git a/plugins/org.eclipse.wst.common.core/META-INF/MANIFEST.MF b/plugins/org.eclipse.wst.common.core/META-INF/MANIFEST.MF
deleted file mode 100644
index ca5beffd3..000000000
--- a/plugins/org.eclipse.wst.common.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,18 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.wst.common.core; singleton:=true
-Bundle-Version: 1.1.100.qualifier
-Bundle-Activator: org.eclipse.wst.common.core.search.SearchPlugin
-Bundle-Localization: plugin
-Export-Package: org.eclipse.wst.common.core.search,
- org.eclipse.wst.common.core.search.document,
- org.eclipse.wst.common.core.search.internal;x-internal:=true,
- org.eclipse.wst.common.core.search.pattern,
- org.eclipse.wst.common.core.search.scope,
- org.eclipse.wst.common.core.search.util
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.2.0,3.4.0)",
- org.eclipse.core.resources;bundle-version="[3.2.0,3.4.0)",
- org.eclipse.core.expressions;bundle-version="[3.2.0,3.4.0)"
-Eclipse-LazyStart: true
-Bundle-Vendor: %pluginProvider
diff --git a/plugins/org.eclipse.wst.common.core/about.html b/plugins/org.eclipse.wst.common.core/about.html
deleted file mode 100644
index 4ec598958..000000000
--- a/plugins/org.eclipse.wst.common.core/about.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<HTML>
-
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-
-<BODY lang="EN-US">
-
-<H3>About This Content</H3>
-
-<P>May 2, 2006</P>
-
-<H3>License</H3>
-
-<P>The Eclipse Foundation makes available all content in this plug-in
-("Content"). Unless otherwise indicated below, the Content is provided to you
-under the terms and conditions of the Eclipse Public License Version 1.0
-("EPL"). A copy of the EPL is available at
-<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
-For purposes of the EPL, "Program" will mean the Content.</P>
-
-<P>If you did not receive this Content directly from the Eclipse Foundation, the
-Content is being redistributed by another party ("Redistributor") and different
-terms and conditions may apply to your use of any object code in the Content.
-Check the Redistributor’s license that was provided with the Content. If no such
-license exists, contact the Redistributor. Unless otherwise indicated below, the
-terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at
-<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P>
-
-</BODY>
-</HTML>
diff --git a/plugins/org.eclipse.wst.common.core/build.properties b/plugins/org.eclipse.wst.common.core/build.properties
deleted file mode 100644
index cd3e92ff6..000000000
--- a/plugins/org.eclipse.wst.common.core/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source.. = src-search/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- schema/,\
- plugin.properties,\
- about.html
diff --git a/plugins/org.eclipse.wst.common.core/component.xml b/plugins/org.eclipse.wst.common.core/component.xml
deleted file mode 100644
index 3e9239cfc..000000000
--- a/plugins/org.eclipse.wst.common.core/component.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<component xmlns="http://eclipse.org/wtp/releng/tools/component-model"
- name="org.eclipse.wst.common.core">
- <component-depends unrestricted="true"></component-depends>
- <plugin id="org.eclipse.wst.common.core" fragment="false" />
-</component> \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.core/plugin.properties b/plugins/org.eclipse.wst.common.core/plugin.properties
deleted file mode 100644
index ff6cdefb8..000000000
--- a/plugins/org.eclipse.wst.common.core/plugin.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-! Plug-in properties
-pluginName = WST Common Core Plug-in
-pluginProvider = Eclipse.org \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.core/plugin.xml b/plugins/org.eclipse.wst.common.core/plugin.xml
deleted file mode 100644
index c82f6a039..000000000
--- a/plugins/org.eclipse.wst.common.core/plugin.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
- <extension-point id="searchParticipants" name="%searchParticipants" />
-</plugin>
-
-
diff --git a/plugins/org.eclipse.wst.common.core/schema/searchParticipants.exsd b/plugins/org.eclipse.wst.common.core/schema/searchParticipants.exsd
deleted file mode 100644
index 367c9434b..000000000
--- a/plugins/org.eclipse.wst.common.core/schema/searchParticipants.exsd
+++ /dev/null
@@ -1,89 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.wst.common.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.wst.common.search" id="searchParticipants" name="%searchPArticipants"/>
- </appInfo>
- <documentation>
- [Enter description of this extension point.]
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <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/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/ISearchOptions.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/ISearchOptions.java
deleted file mode 100644
index 33305e5ce..000000000
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/ISearchOptions.java
+++ /dev/null
@@ -1,60 +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.common.core.search;
-
-/**
- * This interface provides values that can be used in the map of search options passed
- * to
- * {@link SearchEngine#search(org.eclipse.wst.common.core.search.pattern.SearchPattern, SearchRequestor, org.eclipse.wst.common.core.search.scope.SearchScope, java.util.Map, org.eclipse.core.runtime.IProgressMonitor)
- * SearchEngine.search()}.
- * <p>
- * Note that not all search participants will provide specialized behavior based on
- * use of these search options.
- * <p>
- * Also note that individual search participants may support additional options not
- * listed here. These search options should be formed so that a search participant can
- * safely ignore any that it does not understand.
- *
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- */
-public interface ISearchOptions {
-
- /**
- * Search option specifying a trade-off choice between search performance and
- * completeness.
- */
- public static final String PRIORITY_OPTION = "org.eclipse.wst.common.core.search.PRIORITY"; //$NON_NLS_1$
- /**
- * Choice for the {@link #PRIORITY_OPTION} search option that emphasizes
- * performance at the possible expense of accuracy. This value should be used for
- * all search calls made on the user interface thread. In some cases, search
- * results may not be complete because of inaccuracies caused by timing windows.
- */
- public static final String PRIORITY_VALUE_TIMELINESS = "FAST_SEARCH"; //$NON_NLS_1$
- /**
- * Choice for the {@link #PRIORITY_OPTION} search option that emphasizes
- * accuracy at the possible expense of timeliness. This value should never be used
- * for search calls made on the user interface thread, because some search
- * participants may choose to use time-consuming background processing to return a
- * complete set of matches.
- */
- public static final String PRIORITY_VALUE_COMPLETENESS = "COMPLETE_SEARCH"; //$NON_NLS_1$
- /**
- * Default choice for the {@link #PRIORITY_OPTION} search option.
- */
- public static final String PRIORITY_VALUE_DEFAULT = PRIORITY_VALUE_TIMELINESS;
-
-}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchEngine.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchEngine.java
deleted file mode 100644
index 3fed11741..000000000
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchEngine.java
+++ /dev/null
@@ -1,213 +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.common.core.search;
-
-import java.util.Map;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.wst.common.core.search.document.SearchDocumentSet;
-import org.eclipse.wst.common.core.search.internal.Messages;
-import org.eclipse.wst.common.core.search.internal.SearchDocumentSetImpl;
-import org.eclipse.wst.common.core.search.pattern.SearchPattern;
-import org.eclipse.wst.common.core.search.scope.SearchScope;
-
-/**
- * The {@link SearchEngine} class provides a generic way of searching for information
- * without the need of knowing how or where that information is stored. The results
- * returned by a search could be scattered in a number of files or stored in an index.
- * Examples of the information you can search for include element declarations and
- * references, references between files, and use of qualifiers.
- * <p>
- * The search can be limited to a specified search scope, or the entire workspace can
- * be searched. Search matches are returned to the specified {@link SearchRequestor}.
- * <p>
- * This class may be instantiated; it is not intended to be subclassed.
- *
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- */
-public class SearchEngine implements ISearchOptions
-{
-
- /**
- * Searches for matches of a given search pattern using a specified set of search
- * participants and search scope. Search patterns can be created using factory
- * methods and encapsulate the description of the information to be searched for
- * (for example, element declarations of a specified type, in a case sensitive
- * manner).
- * @param pattern
- * The pattern describing the information to search for
- * @param requestor
- * Callback object to notify with the results of the search (each match
- * is reported to {@link SearchRequestor#acceptSearchMatch(SearchMatch)})
- * @param participants
- * The search participants that will conduct the search
- * @param scope
- * Optional search scope to limit the source of search candidates;
- * specify <code>null</code> to search the entire workspace
- * @param searchOptions
- * Optional map of options and values defining behavior of the search;
- * some options and values are provided by {@link ISearchOptions}
- * @param monitor
- * Optional progress monitor used to report work completed
- * @exception CoreException
- * if the search fails
- */
- public void search(SearchPattern pattern, SearchRequestor requestor,
- SearchParticipant[] participants, SearchScope scope, Map searchOptions,
- IProgressMonitor monitor) throws CoreException
- {
-
- if (monitor != null && monitor.isCanceled())
- throw new OperationCanceledException();
-
- /* initialize progress monitor */
- if (monitor != null)
- monitor.beginTask(Messages.engine_searching, 100);
-
- SearchDocumentSet set = new SearchDocumentSetImpl();
- try
- {
- // requestor.beginReporting();
- SearchScope[] scopeArray = new SearchScope[participants.length];
- for (int i = 0, l = participants == null ? 0 : participants.length; i < l; i++)
- {
- if (monitor != null && monitor.isCanceled())
- throw new OperationCanceledException();
-
- SearchParticipant participant = participants[i];
- SubProgressMonitor subMonitor = monitor == null ? null
- : new SubProgressMonitor(monitor, 1000);
- if (subMonitor != null)
- subMonitor.beginTask("", 1000); //$NON-NLS-1$
- try
- {
- if (subMonitor != null)
- subMonitor.subTask(Messages.bind(
- Messages.engine_searching_locatingDocuments,
- new String[]
- { participant.getDescription() }));
- participant.beginSearching(pattern, searchOptions);
- // requestor.enterParticipant(participant);
- // participant creates it's own search scope
- SearchScope newScope =
- participant.selectDocumentLocations(pattern, scope, searchOptions, monitor);
- scopeArray[i] = newScope;
- // participant creates search documents based on it's search scope
- participant.createSearchDocuments(set, pattern, newScope, searchOptions, subMonitor);
- }
- catch(Exception e)
- {
- }
- }
- for (int i = 0, l = participants == null ? 0 : participants.length; i < l; i++)
- {
- if (monitor != null && monitor.isCanceled())
- throw new OperationCanceledException();
-
- SearchParticipant participant = participants[i];
- SubProgressMonitor subMonitor = monitor == null ? null
- : new SubProgressMonitor(monitor, 1000);
- if (subMonitor != null && subMonitor.isCanceled())
- throw new OperationCanceledException();
- try
- {
- // locate index matches if any (note that all search matches
- // could have been issued during index querying)
- if (subMonitor != null)
- subMonitor.subTask(Messages.bind(
- Messages.engine_searching_matching,
- new String[]
- { participant.getDescription() }));
- // a search document set should contain enough info to reduce the search scope even further
- // before finding precize locations
-
- // the scope could be null if the partcipant barfed and exeption in the first loop
- if (scopeArray[i] != null)
- {
- participant.locateMatches(set, pattern, scopeArray[i], requestor, searchOptions, subMonitor);
- }
- }
- catch (Exception e)
- {
-
- }
- finally
- {
- // requestor.exitParticipant(participant);
- participant.doneSearching(pattern, searchOptions);
- }
- }
- } finally
- {
- set.dispose();
- // requestor.endReporting();
- if (monitor != null)
- monitor.done();
- }
- }
-
- /**
- * Searches for matches of a given search pattern. Search patterns can be created
- * using factory methods and encapsulate the description of the information to be
- * searched for (for example, element declarations of a specified type, in a case
- * sensitive manner).
- * @param pattern
- * The pattern describing the information to search for
- * @param requestor
- * Callback object to notify with the results of the search (each match
- * is reported to {@link SearchRequestor#acceptSearchMatch(SearchMatch)})
- * @param scope
- * Optional search scope to limit the source of search candidates;
- * specify <code>null</code> to search the entire workspace
- * @param searchOptions
- * Optional map of options and values defining behavior of the search;
- * some options and values are provided by {@link ISearchOptions}
- * @param monitor
- * Optional progress monitor used to report work completed
- * @exception CoreException
- * if the search fails
- */
- public void search(SearchPattern pattern, SearchRequestor requestor,
- SearchScope scope, Map searchOptions, IProgressMonitor monitor)
- throws CoreException
- {
- SearchParticipant[] participants =
- getApplicableParticipants(pattern, searchOptions);
- //System.out.println("participants = " + participants.length);
- search(pattern, requestor, participants, scope, searchOptions, monitor);
- }
-
- /**
- * Queries the set of participants that support searches described by the
- * specified search pattern and options.
- * @param pattern
- * The pattern describing the information to search for
- * @param searchOptions
- * Optional map of options and values defining behavior of the search;
- * some options and values are provided by {@link ISearchOptions}
- * @return Array of applicable search participants
- */
- public SearchParticipant[] getApplicableParticipants(SearchPattern pattern,
- Map searchOptions)
- {
- return SearchPlugin.getDefault().loadSearchParticipants(pattern, searchOptions);
- }
-
-}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchMatch.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchMatch.java
deleted file mode 100644
index 4890fc553..000000000
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchMatch.java
+++ /dev/null
@@ -1,157 +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.common.core.search;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.wst.common.core.search.pattern.SearchPattern;
-
-/**
- * A search match represents the result of a search query.
- * <p>
- * This class is intended to be instantiated and subclassed by clients.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- *
- * @see SearchEngine#search(SearchPattern, SearchParticipant[], ISearchScope,
- * SearchRequestor, org.eclipse.core.runtime.IProgressMonitor)
- */
-public class SearchMatch implements IAdaptable
-{
-
- /**
- * Optional resource of the element
- */
- IFile file; // resource where match is found
-
- /**
- * The offset the match starts at, or -1 if unknown
- */
- int offset;
-
- /**
- * The length the length of the match, or -1 if unknown
- */
- int length;
-
- /**
- * Optional element that encloses or corresponds to the match
- */
- Object object;
-
- /**
- * Creates a new search match.
- *
- * @param element
- * the element that encloses or corresponds to the match, or
- * <code>null</code> if none
- * @param offset
- * the offset the match starts at, or -1 if unknown
- * @param length
- * the length of the match, or -1 if unknown
- * @param participant
- * the search participant that created the match
- * @param resource
- * the resource of the element, or <code>null</code> if none
- */
- public SearchMatch(Object element, int offset, int length, IFile resource)
- {
- this.object = element;
- this.offset = offset;
- this.length = length;
- this.file = resource;
- }
-
- public IFile getFile()
- {
- return file;
- }
-
- public void setFile(IFile file)
- {
- this.file = file;
- }
-
- public int getLength()
- {
- return length;
- }
-
- public void setLength(int length)
- {
- this.length = length;
- }
-
- // issue (cs/eb) holding objects is a bit odd, since it implies the object's
- // life span
- // is the same as the SearchMatch. What happens when an object is deleted?
- // does the SearchMatch get deleted? Aren't coordinates good enough?
- // at the very least we should document that using this field has some
- // consequences
- /**
- * (eb) see comments for {@link #setObject(Object)}
- */
- public Object getObject()
- {
- return object;
- }
-
- /**
- * @param object
- * Object is an instance of some part of the model that represent
- * the content that was searched. It may require to calculate
- * some additional information that may be required by the tools
- * through {@link #getObject()) (e.g. XML node namespace,
- * nessesary to obtain the prefix for the refactoring tool).
- * <p>
- * There should be no danger here of preventing the object from
- * garbage collection because instances of the search matches
- * supposed to be short lived. {@link SearchMatch} is usually
- * collected by {@link SearchRequestor} which itself is lived for
- * the time of the search and then discarded or re-initialized.
- * Usually the tool that requested a search extracts the
- * information from the collected {@link SearchMatch} and after
- * that {@link SearchMatch} could be garbage collected, releasing
- * object that they hold to.
- * </p>
- */
- public void setObject(Object object)
- {
- this.object = object;
- }
-
- public int getOffset()
- {
- return offset;
- }
-
- public void setOffset(int offset)
- {
- this.offset = offset;
- }
-
- public Object getAdapter(Class adapter)
- {
- return Platform.getAdapterManager().getAdapter(this, adapter);
- }
-
- public Map map = new HashMap();
-
-}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchParticipant.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchParticipant.java
deleted file mode 100644
index 95a044641..000000000
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchParticipant.java
+++ /dev/null
@@ -1,281 +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.common.core.search;
-
-import java.util.Map;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.wst.common.core.search.document.SearchDocument;
-import org.eclipse.wst.common.core.search.document.SearchDocumentSet;
-import org.eclipse.wst.common.core.search.pattern.SearchPattern;
-import org.eclipse.wst.common.core.search.scope.SearchScope;
-
-/**
- * <p>
- * A search participant describes a particular extension to a generic search
- * mechanism, permitting combined search actions which will involve all required
- * participants.
- * </p>
- * <p>
- * When there is a need to search a document that has some mixed content, then
- * using a one participant will not be enough. E.g. for the searching of the JSP
- * content, a JSP participant needs to create {@link SearchDocument} that
- * contain Java compilation unit and then pass it to the default Java search
- * participant of the Java Search Engine. The same with XML: when there is an
- * XML content that default search participant could not process, but it is
- * required to be search on, a new search participant needs to be defined. That
- * search participant would know how create search document from the content and
- * then it can call default XML search participant.
- * </p>
- * <p>
- * Passing its own {@link SearchRequestor} this participant can then map the
- * match positions back to the original contents, create its own matches and
- * report them to the original requestor.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- *
- */
-public abstract class SearchParticipant implements ISearchOptions
-{
-
- protected static final boolean debugPerf = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.common.core/perf")); //$NON-NLS-1$ //$NON-NLS-2$
-
- protected String id;
- /**
- * Creates a new search participant.
- */
- protected SearchParticipant()
- {
- // do nothing
- }
-
- /**
- * Callback method allowing a search participant to indicate whether it supports
- * the specified search pattern and options.
- * <p>
- * If this method returns <code>true</code>, the participant will participate in
- * finding matches for the search defined by the search pattern. In this case, the
- * search pattern and options will be passed to the following methods of the
- * search participant:
- * <ol>
- * <li>{@link #beginSearching(SearchPattern, Map)}
- * <li>{@link #selectDocumentLocations(SearchPattern, SearchScope, Map, IProgressMonitor)}
- * <li>{@link #createSearchDocuments(SearchDocumentSet, SearchPattern, SearchScope, Map, IProgressMonitor)}
- * <li>{@link #locateMatches(SearchDocumentSet, SearchPattern, SearchScope, SearchRequestor, Map, IProgressMonitor)}
- * <li>{@link #doneSearching(SearchPattern, Map)}
- * </ol>
- * <p>
- * If this method returns <code>false</code>, none of the above methods will be
- * called, and the search participant contributes no matches for the search
- * requrest.
- * <p>
- * A search participant should only participate in a search when in understands
- * the search pattern. Unrecognized search options, however, can be ignored.
- * <p>
- * This method returns <code>false</code> by default. As a result, subclasses must
- * override this method to participate in any searches.
- * @param pattern The pattern describing the information to search for
- * @param searchOptions Map of options and values defining behavior of the search;
- * <code>null</code> if no options are specified;
- * some options and values are provided by {@link ISearchOptions}
- * @return <code>true</code> if the search participant will participate in the
- * search request; <code>false</code> otherwise
- */
- public abstract boolean isApplicable(SearchPattern pattern, Map searchOptions);
-
- /**
- * Notification that this participant's help is needed in a search.
- * <p>
- * This method should be re-implemented in subclasses that need to do
- * something when the participant is needed in a search.
- * </p>
- * @param pattern The pattern describing the information to search for
- * @param searchOptions Map of options and values defining behavior of the search;
- * <code>null</code> if no options are specified;
- * some options and values are provided by {@link ISearchOptions}
- */
- public void beginSearching(SearchPattern pattern, Map searchOptions)
- {
- // do nothing
- }
-
- /**
- * Notification that this participant's help is no longer needed.
- * <p>
- * This method should be re-implemented in subclasses that need to do
- * something when the participant is no longer needed in a search.
- * </p>
- * @param pattern
- * The pattern describing the information to search for
- * @param searchOptions
- * Map of options and values defining behavior of the search;
- * <code>null</code> if no options are specified;
- * some options and values are provided by {@link ISearchOptions}
- */
- public void doneSearching(SearchPattern pattern, Map searchOptions)
- {
- // do nothing
- }
-
- /**
- * Returns a displayable name of this search participant.
- * <p>
- * This method should be re-implemented in subclasses that need to display a
- * meaningfull name.
- * </p>
- *
- * @return the displayable name of this search participant
- */
- public String getDescription()
- {
- return "Search participant"; //$NON-NLS-1$
- }
-
- /**
- * Returns a search document for the given path. The given document path is
- * a string that uniquely identifies the document. Most of the time it is a
- * workspace-relative path, but it can also be a file system path, or a path
- * inside a zip file.
- * <p>
- * Implementors of this method can either create an instance of their own
- * subclass of {@link SearchDocument} or return an existing instance of such
- * a subclass.
- * </p>
- *
- * @param documentPath
- * the path of the document.
- * @return a search document
- */
- public abstract SearchDocument createSearchDocument(String documentPath);
-
- /**
- * Locates the matches in the given documents. This method should be called
- * by the other search participant or search client once it has
- * pre-processed documents and delegating search to this search participant.
- * @param documentSet
- * The documents to locate matches in
- * @param pattern
- * The pattern describing the information to search for
- * @param scope
- * Search scope to limit the source of search candidates;
- * <code>null</code> indicates that the entire workspace is to be
- * searched
- * @param requestor
- * Callback object to notify with the results of the search (each match
- * is reported to {@link SearchRequestor#acceptSearchMatch(SearchMatch)})
- * @param searchOptions
- * Map of options and values defining behavior of the search;
- * <code>null</code> if no options are specified;
- * some options and values are provided by {@link ISearchOptions}
- * @param monitor
- * Progress monitor used to report work completed; <code>null</code>
- * if no progress needs to be reported
- * @throws CoreException
- * If the requestor had problem accepting one of the matches
- */
- public abstract void locateMatches(SearchDocumentSet documentSet,
- SearchPattern pattern, SearchScope scope,
- SearchRequestor requestor, Map searchOptions, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- *
- * @param document
- * @param pattern
- */
- public abstract void populateSearchDocument(SearchDocument document,
- SearchPattern pattern);
-
- /**
- * Returns the collection of document locations to consider when performing
- * the given search query in the given scope. The search engine calls this
- * method before locating matches.
- * <p>
- * An document location represents a path workspace to the file with the
- * content that has potential matches
- * </p>
- * <p>
- * Clients are not expected to call this method.
- * </p>
- * @param pattern
- * The pattern describing the information to search for
- * @param scope
- * Search scope to limit the source of search candidates;
- * <code>null</code> indicates that the entire workspace is to be
- * searched
- * @param searchOptions
- * Map of options and values defining behavior of the search;
- * <code>null</code> if no options are specified;
- * some options and values are provided by {@link ISearchOptions}
- * @param monitor
- * Progress monitor used to report work completed; <code>null</code>
- * if no progress needs to be reported
- * @return the collection of document paths to consider
- */
- public SearchScope selectDocumentLocations(SearchPattern pattern,
- SearchScope scope, Map searchOptions, IProgressMonitor monitor)
- {
- return scope;
- }
-
- /**
- * <p>
- * This method calls the following methods for each file in the search scope:
- * <ol>
- * <li>{@link #createSearchDocument(String)}
- * <li>{@link #populateSearchDocument(SearchDocument, SearchPattern)}
- * </ol>
- * @param documentSet
- * The documents to locate matches in
- * @param pattern
- * The pattern describing the information to search for
- * @param scope
- * Search scope to limit the source of search candidates;
- * <code>null</code> indicates that the entire workspace is to be
- * searched
- * @param searchOptions
- * Map of options and values defining behavior of the search;
- * <code>null</code> if no options are specified;
- * some options and values are provided by {@link ISearchOptions}
- * @param monitor
- * Progress monitor used to report work completed; <code>null</code>
- * if no progress needs to be reported
- */
- public void createSearchDocuments(SearchDocumentSet documentSet,
- SearchPattern pattern, SearchScope scope, Map searchOptions,
- IProgressMonitor monitor)
- {
- Assert.isNotNull(id, "The SearchPartipants id has not been initalized");
- IFile[] files = scope.enclosingFiles();
-
- for (int i = 0; i < files.length; i++)
- {
- String location = files[i].getLocation().toString();
- SearchDocument document = documentSet.getSearchDocument(location, id);
- if(document == null && id != null){
- documentSet.putSearchDocument(id, document = createSearchDocument(location));
- }
- populateSearchDocument(document, pattern);
-
- }
-
- }
-}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchPlugin.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchPlugin.java
deleted file mode 100644
index cf7a9fc01..000000000
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchPlugin.java
+++ /dev/null
@@ -1,103 +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.common.core.search;
-
-import java.util.Map;
-
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.wst.common.core.search.internal.SearchParticipantRegistry;
-import org.eclipse.wst.common.core.search.internal.SearchParticipantRegistryReader;
-import org.eclipse.wst.common.core.search.pattern.SearchPattern;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- */
-public class SearchPlugin extends Plugin implements ISearchOptions
-{
-
- private SearchParticipantRegistry searchParticipantRegistry;
-
- // The shared instance.
- private static SearchPlugin plugin;
-
- /**
- * The constructor.
- */
- public SearchPlugin()
- {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception
- {
- super.start(context);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception
- {
- super.stop(context);
- plugin = null;
- }
-
- /**
- * Returns the shared instance.
- */
- public static SearchPlugin getDefault()
- {
- return plugin;
- }
-
- private SearchParticipantRegistry getSearchParticipantRegistry()
- {
- if (searchParticipantRegistry == null)
- {
- searchParticipantRegistry = new SearchParticipantRegistry();
- new SearchParticipantRegistryReader(searchParticipantRegistry)
- .readRegistry();
- }
- return searchParticipantRegistry;
- }
-
-
- public SearchParticipant getSearchParticipant(String id)
- {
- return getSearchParticipantRegistry().getSearchParticipant(id);
- }
-
- /**
- * Returns the registered search participants that support the specified search
- * pattern and options, loading and creating the search participants if necessary.
- * @param pattern The pattern representing a search request
- * @param searchOptions Map of options and values defining behavior of the search;
- * <code>null</code> if no options are specified;
- * some options and values are provided by {@link ISearchOptions}
- * @return Array of search participants that support the specified search request
- */
- SearchParticipant[] loadSearchParticipants(SearchPattern pattern, Map searchOptions)
- {
- return getSearchParticipantRegistry().getParticipants(pattern, searchOptions);
- }
-
-}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchRequestor.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchRequestor.java
deleted file mode 100644
index 460b589a8..000000000
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/SearchRequestor.java
+++ /dev/null
@@ -1,47 +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.common.core.search;
-
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * Collects the results from a search engine query. Clients implement a subclass
- * to pass to <code>SearchEngine.search</code> and implement the
- * {@link #acceptSearchMatch(SearchMatch)} method.
- * <p>
- * The subclasses of the SearchRequestor could collected search matches, filter,
- * sort and group them. It's up to the client to pass the required extension of
- * the SearchRequestor to the search engine.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- *
- * @see SearchEngine
- */
-public abstract class SearchRequestor
-{
-
- /**
- * Accepts the given search match.
- *
- * @param match
- * the found match
- * @throws CoreException
- */
- public abstract void acceptSearchMatch(SearchMatch match)
- throws CoreException;
-
-}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/ComponentDeclarationEntry.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/ComponentDeclarationEntry.java
deleted file mode 100644
index f19393724..000000000
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/ComponentDeclarationEntry.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.wst.common.core.search.document;
-
-import org.eclipse.wst.common.core.search.pattern.QualifiedName;
-
-/**
- *
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- *
- */
-public class ComponentDeclarationEntry extends Entry
-{
- QualifiedName metaName;
- QualifiedName name;
-
- public QualifiedName getName()
- {
- return name;
- }
-
- public void setName(QualifiedName name)
- {
- this.name = name;
- }
-
- public QualifiedName getMetaName()
- {
- return metaName;
- }
-
- public void setMetaName(QualifiedName metaName)
- {
- this.metaName = metaName;
- }
-}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/ComponentReferenceEntry.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/ComponentReferenceEntry.java
deleted file mode 100644
index d532f267d..000000000
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/ComponentReferenceEntry.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.common.core.search.document;
-
-import org.eclipse.wst.common.core.search.pattern.QualifiedName;
-
-/**
- *
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- *
- */
-public class ComponentReferenceEntry extends Entry
-{
- QualifiedName name;
-
- public QualifiedName getName()
- {
- return name;
- }
-
- public void setName(QualifiedName name)
- {
- this.name = name;
- }
-}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/Entry.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/Entry.java
deleted file mode 100644
index acd10a628..000000000
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/Entry.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
- *******************************************************************************/
-
-package org.eclipse.wst.common.core.search.document;
-
-/**
- *
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- *
- */
-public class Entry
-{
- String key;
- String category;
-
- public Entry()
-{
- super();
-
-}
-
- public String getCategory()
- {
- return category;
- }
-
-
-
- public String getKey()
- {
- return key;
- }
-
- public void setCategory(String category)
- {
- this.category = category;
- }
-
- public void setKey(String key)
- {
- this.key = key;
- }
-
-
-}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/FileReferenceEntry.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/FileReferenceEntry.java
deleted file mode 100644
index 278950304..000000000
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/FileReferenceEntry.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
- *******************************************************************************/
-
-package org.eclipse.wst.common.core.search.document;
-
-/**
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- *
- */
-public class FileReferenceEntry extends Entry
-{
- String relativeFilePath;
- String resolvedURI;
- String publicIdentifier;
-
- public String getPublicIdentifier()
- {
- return publicIdentifier;
- }
-
- public void setPublicIdentifier(String publicIdentifier)
- {
- this.publicIdentifier = publicIdentifier;
- }
-
- public String getRelativeFilePath()
- {
- return relativeFilePath;
- }
-
- public void setRelativeFilePath(String relativeFilePath)
- {
- this.relativeFilePath = relativeFilePath;
- }
-
- public String getResolvedURI()
- {
- return resolvedURI;
- }
-
- public void setResolvedURI(String resolvedURI)
- {
- this.resolvedURI = resolvedURI;
- }
-}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/SearchDocument.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/SearchDocument.java
deleted file mode 100644
index d808f193e..000000000
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/SearchDocument.java
+++ /dev/null
@@ -1,120 +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.common.core.search.document;
-
-import org.eclipse.wst.common.core.search.SearchParticipant;
-import org.eclipse.wst.common.core.search.SearchRequestor;
-
-/**
- * A search document encapsulates a content to be searched in. A search
- * participant creates a search document based on the file locations to locate
- * matches.
- * <p>
- * This class is intended to be subclassed by clients.
- * </p>
- * issue (cs/eb) does a search participant always create a SearchDocument?
- *
- * <p>
- * SearchParticipant or search client create search documents for the search
- * pass where precise locations of the matches will be determined by calling
- * {@link SearchParticipan#locateMatches}
- * </p>
- * <p>
- * SearchParticipant knows how to create search document that it can process.
- * </p>
- * <p>
- * The intent of the separation of the {@link SearchDocument} from the
- * {@link SearchParticipant} is to enable the other search participants to
- * process parts of the document. For example, if XML document has a fragment
- * that it can not process, e.g. Java, then XML participant would create
- * SearchDocument for that fragment which contains Java compilation unit, and
- * pass it to the Java search participant. Passing its own
- * {@link SearchRequestor} this participant can then map the match positions
- * back to the original contents, create its own matches and report them to the
- * original requestor.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- *
- * @see SearchParticipant
- */
-public abstract class SearchDocument
-{
-
- private String documentPath;
- private SearchParticipant participant;
-
- /**
- * Creates a new search document. The given document path is a string that
- * uniquely identifies the document. Most of the time it is a
- * workspace-relative path, but it can also be a file system path, or a path
- * inside a zip file.
- *
- * @param documentPath
- * the path to the document, or <code>null</code> if none
- */
- protected SearchDocument(String documentPath, SearchParticipant participant)
- {
- this.documentPath = documentPath;
- this.participant = participant;
- }
-
- public abstract Entry[] getEntries(String category, String key, int matchRule);
-
- /**
- * Returns the model of this document. Model may be different from actual
- * resource at corresponding document path due to preprocessing.
- * <p>
- * This method must be implemented in subclasses.
- * </p>
- *
- * @return the model of this document, or <code>null</code> if none
- */
- public abstract Object getModel();
-
-
- /**
- * Returns the participant that created this document.
- *
- * @return the participant that created this document
- */
- public final SearchParticipant getParticipant() {
- return this.participant;
- }
-
-
-// this class represents a collection of information
-// that has been produced by a search participant
-// typically after a file has been processed
-// an Entry is typically course grained info that results from the SearchParticipants
-// first step ... and is used to compute more accurate SearchMatches during a SearchParticipants 2nd step
-
- /**
- * Returns the path to the original document.
- *
- * @return the path to the document
- */
- public final String getPath()
- {
- return this.documentPath;
- }
-
- public abstract void putEntry(Entry entry);
-
- public void dispose()
- {
- }
-}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/SearchDocumentSet.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/SearchDocumentSet.java
deleted file mode 100644
index 42fb34cd5..000000000
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/document/SearchDocumentSet.java
+++ /dev/null
@@ -1,33 +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.common.core.search.document;
-
-/**
- * The class is used to manage a set of search documents
- * that have been constructed by various participants
- *
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- *
- */
-public abstract class SearchDocumentSet
-{
- public abstract SearchDocument getSearchDocument(String resourcePath, String participantId);
- public abstract SearchDocument[] getSearchDocuments(String participantId);
- public abstract void putSearchDocument(String participantId, SearchDocument document);
- public abstract SearchDocument _tempGetSearchDocumetn(String resourcePath);
- public abstract void dispose();
-}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/Messages.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/Messages.java
deleted file mode 100644
index cc3522b81..000000000
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/Messages.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.common.core.search.internal;
-
-import org.eclipse.osgi.util.NLS;
-
-// issue (cs) is this a UI issue? where does the framework need to expose stings?
-public class Messages extends NLS
-{
-
- private static final String BUNDLE_NAME = "org.eclipse.wst.common.core.internal.messages";//$NON-NLS-1$
-
- public static String engine_searching;
-
- public static String engine_searching_locatingDocuments;
-
- public static String engine_searching_matching;
-
- private Messages()
- {
- // Do not instantiate
- }
-
- static
- {
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/SearchDocumentSetImpl.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/SearchDocumentSetImpl.java
deleted file mode 100644
index e3f6c33c8..000000000
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/SearchDocumentSetImpl.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.common.core.search.internal;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.wst.common.core.search.document.SearchDocument;
-import org.eclipse.wst.common.core.search.document.SearchDocumentSet;
-
-public class SearchDocumentSetImpl extends SearchDocumentSet
-{
- public Map documentPathMap = new HashMap(); //path --> documetn
- Map documentMap = new HashMap(); // participantId - > list (document)
-
- public SearchDocumentSetImpl()
- {
- super();
- }
-
- public SearchDocument _tempGetSearchDocumetn(String resourcePath)
- {
- return (SearchDocument)documentPathMap.get(resourcePath);
- }
-
- public SearchDocument getSearchDocument(String resourcePath, String participantId)
- {
- if(resourcePath == null){
- return null;
- }
- SearchDocument[] documents = getSearchDocuments(participantId);
- for (int i = 0; i < documents.length; i++)
- {
- SearchDocument document = documents[i];
- if(resourcePath.equals(document.getPath())){
- return document;
- }
- }
- return null;
- }
-
- public SearchDocument[] getSearchDocuments(String participantId)
- {
-
- Object object = documentMap.get(participantId);
- List documentList = null;
- if(object instanceof List){
- documentList = (List)object;
- }
- else{
- documentMap.put(participantId, documentList = new ArrayList());
- }
- return (SearchDocument[]) documentList.toArray(new SearchDocument[documentList.size()]);
-
- }
-
- public void putSearchDocument(String participantId, SearchDocument document)
- {
- Object object = documentMap.get(participantId);
- List documentList = null;
- if(object instanceof List){
- documentList = (List)object;
- }
- else{
- documentMap.put(participantId, documentList = new ArrayList());
- }
- documentList.add(document);
- documentPathMap.put(document.getPath(), document);
- }
-
-
- public void dispose()
- {
- try
- {
- for (Iterator i = documentMap.values().iterator(); i.hasNext(); )
- {
- Object o = i.next();
- if (o instanceof List)
- {
- for (Iterator j = ((List)o).iterator(); j.hasNext(); )
- {
- Object o2 = j.next();
- if (o2 instanceof SearchDocument)
- {
- SearchDocument searchDocument = (SearchDocument)o2;
- searchDocument.dispose();
- }
- }
- }
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
-}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/SearchParticipantDescriptor.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/SearchParticipantDescriptor.java
deleted file mode 100644
index 8e39e12fa..000000000
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/SearchParticipantDescriptor.java
+++ /dev/null
@@ -1,89 +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.common.core.search.internal;
-
-import org.eclipse.core.expressions.EvaluationResult;
-import org.eclipse.core.expressions.Expression;
-import org.eclipse.core.expressions.ExpressionConverter;
-import org.eclipse.core.expressions.ExpressionTagNames;
-import org.eclipse.core.expressions.IEvaluationContext;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.wst.common.core.search.SearchParticipant;
-
-public class SearchParticipantDescriptor
-{
-
- private IConfigurationElement fElement;
-
- private SearchParticipant participant;
-
- public SearchParticipantDescriptor(IConfigurationElement element)
- {
- this.fElement = element;
- }
-
- public SearchParticipant getSearchParticipant()
- {
- if (participant == null)
- {
- try
- {
- participant = (SearchParticipant) fElement
- .createExecutableExtension("class"); //$NON-NLS-1$
- } catch (Exception e)
- {
- // e.printStackTrace();
- }
- }
- return participant;
- }
-
- public boolean matches(IEvaluationContext context) throws CoreException
- {
- IConfigurationElement[] elements = fElement
- .getChildren(ExpressionTagNames.ENABLEMENT);
- if (elements.length == 0)
- return false;
- Assert.isTrue(elements.length == 1);
- Expression exp = ExpressionConverter.getDefault().perform(elements[0]);
- return convert(exp.evaluate(context));
- }
-
- private boolean convert(EvaluationResult eval)
- {
- if (eval == EvaluationResult.FALSE)
- return false;
- return true;
- }
-
- /**
- * @deprecated No replacement
- */
- public String[] getSupportedContentTypes()
- {
- return new String[0];
- }
-
- /**
- * @deprecated No replacement
- */
- public void addSupportedContentTypeId(String contentTypeId)
- {
- }
-
- public String getElementId(){
- return fElement.getAttribute("id");
-
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/SearchParticipantRegistry.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/SearchParticipantRegistry.java
deleted file mode 100644
index a169e91b9..000000000
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/SearchParticipantRegistry.java
+++ /dev/null
@@ -1,116 +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.common.core.search.internal;
-
-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 java.util.Set;
-import org.eclipse.core.expressions.EvaluationContext;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.wst.common.core.search.SearchParticipant;
-import org.eclipse.wst.common.core.search.pattern.SearchPattern;
-
-public class SearchParticipantRegistry
-{
-
- protected Map idMap = new HashMap(); // maps searchParticipant id to a
- // searchParticipant descriptor
-
- public SearchParticipantRegistry()
- {
- }
-
- public void putSearchParticipant(String id,
- SearchParticipantDescriptor searchParticipantDescriptor)
- {
- idMap.put(id, searchParticipantDescriptor);
- }
-
- public String[] getSearchParticipantIds()
- {
- Set ids = idMap.keySet();
- return (String[]) ids.toArray(new String[ids.size()]);
- }
-
- public Collection getSearchParticipants()
- {
- return idMap.values();
- }
-
-
- public SearchParticipant getSearchParticipant(String id)
- {
- SearchParticipantDescriptor searchParticipantDescriptor = null;
- if (id != null)
- {
- searchParticipantDescriptor = (SearchParticipantDescriptor) idMap
- .get(id);
- }
- return searchParticipantDescriptor != null ? searchParticipantDescriptor
- .getSearchParticipant()
- : null;
-
- }
-
- public SearchParticipant[] getParticipants(SearchPattern pattern, Map searchOptions)
- {
-
- EvaluationContext evalContext = createEvaluationContext(pattern);
- List result = new ArrayList();
- for (Iterator iter = getSearchParticipants().iterator(); iter.hasNext();)
- {
- SearchParticipantDescriptor descriptor = (SearchParticipantDescriptor) iter
- .next();
- try
- {
- if (descriptor.matches(evalContext))
- {
- try
- {
- SearchParticipant participant = descriptor
- .getSearchParticipant();
- if (!SearchParticipant.class.isInstance(participant))
- throw new ClassCastException();
- if (participant.isApplicable(pattern, searchOptions))
- {
- result.add(participant);
- }
- } catch (ClassCastException e)
- {
- iter.remove();
- }
- }
-
- } catch (CoreException e)
- {
- iter.remove();
- }
-
- }
-
- return (SearchParticipant[]) result
- .toArray(new SearchParticipant[result.size()]);
- }
-
- private static EvaluationContext createEvaluationContext(
- SearchPattern pattern)
- {
- EvaluationContext result = new EvaluationContext(null, pattern);
- result.addVariable("pattern", pattern); //$NON-NLS-1$
- return result;
- }
-
-}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/SearchParticipantRegistryReader.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/SearchParticipantRegistryReader.java
deleted file mode 100644
index 7757ce3e7..000000000
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/SearchParticipantRegistryReader.java
+++ /dev/null
@@ -1,69 +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.common.core.search.internal;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.Platform;
-
-public class SearchParticipantRegistryReader
-{
- protected static final String EXTENSION_POINT_ID = "searchParticipants"; //$NON-NLS-1$
-
- protected static final String TAG_NAME = "searchParticipant"; //$NON-NLS-1$
-
- protected static final String ATT_CLASS = "class"; //$NON-NLS-1$
-
- protected static final String ATT_ID = "id"; //$NON-NLS-1$
-
- protected String pluginId, extensionPointId;
-
- protected SearchParticipantRegistry registry;
-
- public SearchParticipantRegistryReader(SearchParticipantRegistry registry)
- {
- this.registry = registry;
- }
-
- public void readRegistry()
- {
- String bundleid = "org.eclipse.wst.common.core"; //$NON-NLS-1$
- IExtensionPoint point = Platform.getExtensionRegistry()
- .getExtensionPoint(bundleid, EXTENSION_POINT_ID);
- if (point != null)
- {
- IConfigurationElement[] elements = point.getConfigurationElements();
- for (int i = 0; i < elements.length; i++)
- {
- readElement(elements[i]);
- }
- }
- }
-
- protected void readElement(IConfigurationElement element)
- {
- if (element.getName().equals(TAG_NAME))
- {
- String contributorClass = element.getAttribute(ATT_CLASS);
- String id = element.getAttribute(ATT_ID);
- if (id != null)
- {
- if (contributorClass != null)
- {
- SearchParticipantDescriptor descriptor = new SearchParticipantDescriptor(
- element);
- registry.putSearchParticipant(id, descriptor);
- }
- }
- }
- }
-}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/messages.properties b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/messages.properties
deleted file mode 100644
index e3a01a83e..000000000
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/internal/messages.properties
+++ /dev/null
@@ -1,15 +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
-###############################################################################
-### Search messages.
-
-engine_searching = Searching...
-engine_searching_locatingDocuments = {0}: locate search documents...
-engine_searching_matching = {0}: locate matches...
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/ComponentDeclarationPattern.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/ComponentDeclarationPattern.java
deleted file mode 100644
index 16f3ffe8f..000000000
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/ComponentDeclarationPattern.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.common.core.search.pattern;
-
-/**
- *
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- *
- */
-public class ComponentDeclarationPattern extends ComponentSearchPattern
-{
-
- public ComponentDeclarationPattern(QualifiedName name,
- QualifiedName metaName, int matchRule)
- {
- super(null, name, metaName, matchRule);
-
- }
-
- public ComponentDeclarationPattern(QualifiedName name,
- QualifiedName metaName)
- {
- super(null, name, metaName);
- }
-
-}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/ComponentReferencePattern.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/ComponentReferencePattern.java
deleted file mode 100644
index 2f1e101cc..000000000
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/ComponentReferencePattern.java
+++ /dev/null
@@ -1,43 +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.common.core.search.pattern;
-
-import org.eclipse.core.resources.IFile;
-
-/**
- *
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- *
- */
-public class ComponentReferencePattern extends ComponentSearchPattern
-{
-
- public ComponentReferencePattern(IFile file, QualifiedName elementQName,
- QualifiedName typeQName, int matchRule)
- {
- super(file, elementQName, typeQName, matchRule);
-
- }
-
- public ComponentReferencePattern(IFile file, QualifiedName elementQName,
- QualifiedName typeQName)
- {
- super(file, elementQName, typeQName);
-
- }
-
-}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/ComponentSearchPattern.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/ComponentSearchPattern.java
deleted file mode 100644
index 4741a10e2..000000000
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/ComponentSearchPattern.java
+++ /dev/null
@@ -1,72 +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.common.core.search.pattern;
-
-import org.eclipse.core.resources.IFile;
-
-/**
- * This class defines generic component pattern. Usually there are two types of
- * component search patterns: pattern for component declaration and for
- * component definition.
- *
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- */
-public abstract class ComponentSearchPattern extends SearchPattern
-{
-
- QualifiedName name;
-
- QualifiedName metaName;
-
- IFile file; // (optional) location where component is defined
-
- public ComponentSearchPattern(IFile file, QualifiedName elementQName,
- QualifiedName typeQName, int matchRule)
- {
- super(matchRule);
- this.file = file;
- name = elementQName;
- metaName = typeQName;
-
- }
-
- public ComponentSearchPattern(IFile file, QualifiedName elementQName,
- QualifiedName typeQName)
- {
-
- this.file = file;
- name = elementQName;
- metaName = typeQName;
-
- }
-
- public IFile getFile()
- {
- return file;
- }
-
- public QualifiedName getMetaName()
- {
- return metaName;
- }
-
- public QualifiedName getName()
- {
- return name;
- }
-
-}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/FileReferencePattern.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/FileReferencePattern.java
deleted file mode 100644
index 27c116593..000000000
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/FileReferencePattern.java
+++ /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
- *******************************************************************************/
-
-package org.eclipse.wst.common.core.search.pattern;
-
-import org.eclipse.core.resources.IFile;
-
-/**
- *
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- *
- */
-public class FileReferencePattern extends SearchPattern
-{
-
- IFile file;
-
- public FileReferencePattern(IFile file)
- {
- this.file = file;
- }
-
- public FileReferencePattern(IFile file, int matchRule)
- {
- super(matchRule);
- this.file = file;
- }
-
-}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/QualifiedName.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/QualifiedName.java
deleted file mode 100644
index 0f7ab170d..000000000
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/QualifiedName.java
+++ /dev/null
@@ -1,226 +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.common.core.search.pattern;
-
-/**
- * This data class represents a qualified name, consisting of a local name and a
- * qualifier
- *
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- */
-// issue (cs) should this go in the 'matching' package (BTW... rename
-// matching->pattern)
-public class QualifiedName
-{
-
- private String qualifier;
-
- private String name;
-
- private static final String NS_DELIM_1 = "{"; //$NON-NLS-1$
-
- private static final String NS_DELIM_2 = "}"; //$NON-NLS-1$
-
- /**
- * Constructor Creates a qualified name from a namespace and local name.
- *
- * @param namespace
- * @param localName
- */
- public QualifiedName(String namespace, String localName)
- {
-
- super();
-
- this.qualifier = namespace;
- if (namespace != null && namespace.length() == 0)
- {
- this.qualifier = null;
- }
- if (this.qualifier != null && this.qualifier.length() == 0)
- {
- this.qualifier = null;
- }
-
- this.name = localName;
- if (localName != null && localName.length() == 0)
- {
- this.name = null;
- }
-
- }
-
- /**
- * Returns the namespace component of the qualified name.
- *
- * @return The namespace; <code>null</code> if none is specified
- */
- public String getNamespace()
- {
- return this.qualifier;
- }
-
- /**
- * Returns the local name component of the qualified name.
- *
- * @return The local name; <code>null</code> if none is specified
- */
- public String getLocalName()
- {
- return this.name;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object obj)
- {
- boolean isEqual = false;
- if (this == obj)
- {
- isEqual = true;
- }
- else
- {
- if (obj instanceof QualifiedName)
- {
- QualifiedName that = (QualifiedName) obj;
- isEqual = isMatch(this.getNamespace(), that.getNamespace()) &&
- isMatch(this.getLocalName(), that.getLocalName());
- }
- }
- return isEqual;
- }
-
- protected boolean isMatch(String a, String b)
- {
- return a != null ? a.equals(b) : a == b;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#hashCode()
- */
- public int hashCode()
- {
- int hash = 0;
- if (this.qualifier != null)
- {
- hash += this.qualifier.hashCode();
- }
- if (this.name != null)
- {
- hash += this.name.hashCode();
- }
- return hash;
- }
-
- /**
- * Returns a string representation of the qualified name, of the form:
- * {namespace}localname. If no namespace is specified, the string has the
- * form: {}localname. Note that the string format may change in the future.
- *
- * @return The string value
- */
- public String toString()
- {
-
- return appendStrings(new String[]
- { NS_DELIM_1, // {
- this.qualifier, NS_DELIM_2, // }
- this.name });
-
- }
-
- /**
- * Factory-like method to create a QName object from the string form of a
- * QName. The string must have the same format as returned by
- * QName.toString().
- *
- * @param qnameString -
- * String form of a QName
- * @return The created QName object created from the specified string
- * @throws IllegalArgumentException -
- * Missing namespace delimiters
- */
- public static QualifiedName valueOf(String qnameString)
- throws IllegalArgumentException
- {
-
- String namespace = null;
- String localName = null;
- if (qnameString == null || qnameString.length() == 0)
- {
- // Both namespace and local name are null.
- } else if (qnameString.startsWith(NS_DELIM_1))
- {
- // The QName has the notation specifying a namespace.
- int index = qnameString.indexOf(NS_DELIM_2);
- if (index == -1)
- {
- // The end delimiter for the namespace was not found. The QName
- // string
- // is malformed.
- throw new IllegalArgumentException(
- "qnameString = " + qnameString); //$NON-NLS-1$
- }
- namespace = qnameString.substring(1, index);
- localName = qnameString.substring(index + 1);
- } else
- {
- // Assume no namespace is specified and the string is a local name.
- localName = qnameString;
- }
- return new QualifiedName(namespace, localName);
-
- }
-
- /**
- * Creates a single string by appending together an array of strings,
- * skipping null strings.
- *
- * @param strings -
- * Strings to be appended together
- * @return Resulting string
- */
- public static String appendStrings(String[] strings)
- {
-
- String result = null;
- if (strings != null)
- {
- StringBuffer tokenBuffer = new StringBuffer();
- int maxCount = strings.length;
- String string;
- for (int i = 0; i < maxCount; i++)
- {
- string = strings[i];
- if (string != null && string.length() > 0)
- {
- tokenBuffer.append(string);
- }// if
- }// for
- result = tokenBuffer.toString();
- }// if
- return result;
-
- }// appendStrings()
-
-}// class QName
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/SearchPattern.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/SearchPattern.java
deleted file mode 100644
index df0aaf6d2..000000000
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/pattern/SearchPattern.java
+++ /dev/null
@@ -1,85 +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.common.core.search.pattern;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-
-/**
- * A search defines how search results are found.
- *
- * This class is intended to be subclassed by clients.
- *
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- */
-public abstract class SearchPattern implements IAdaptable
-{
-
- /**
- * Match rule: The search pattern matches the search result only if cases
- * are the same. Can be combined to previous rules, e.g.
- * {@link #R_EXACT_MATCH} | {@link #R_CASE_SENSITIVE}
- */
- public static final int R_CASE_SENSITIVE = 8;
-
- // Rules for pattern matching: (exact, prefix, pattern) [ | case sensitive]
- /**
- * Match rule: The search pattern matches exactly the search result, that
- * is, the source of the search result equals the search pattern.
- */
- public static final int R_EXACT_MATCH = 0;
-
- /**
- * Match rule: The search pattern contains one or more wild cards ('*')
- * where a wild-card can replace 0 or more characters in the search result.
- */
- public static final int R_PATTERN_MATCH = 2;
-
- /**
- * Match rule: The search pattern is a prefix of the search result.
- */
- public static final int R_PREFIX_MATCH = 1;
-
- /**
- * Match rule: The search pattern contains a regular expression.
- */
- public static final int R_REGEXP_MATCH = 4;
-
- private int matchRule;
-
- public SearchPattern()
- {
- this.matchRule = R_EXACT_MATCH | R_CASE_SENSITIVE;
- }
-
- public SearchPattern(int matchRule)
- {
- this.matchRule = matchRule;
-
- }
-
- public final int getMatchRule()
- {
- return this.matchRule;
- }
-
- public Object getAdapter(Class adapter)
- {
- return Platform.getAdapterManager().getAdapter(this, adapter);
- }
-
-}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/ContentTypeSearchScope.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/ContentTypeSearchScope.java
deleted file mode 100644
index c67af173a..000000000
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/ContentTypeSearchScope.java
+++ /dev/null
@@ -1,105 +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.common.core.search.scope;
-
-import java.util.ArrayList;
-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.Platform;
-import org.eclipse.core.runtime.content.IContentDescription;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.core.runtime.content.IContentTypeManager;
-
-/**
- * Scope that has filterers files based on content types. It can limit other
- * scopes with the given file content types.
- *
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- */
-public class ContentTypeSearchScope extends SearchScopeImpl
-{
-
- private List validContentIds = new ArrayList();
-
- public ContentTypeSearchScope(SearchScope scope, String[] validContentTypes)
- {
- if (validContentTypes != null)
- {
- for (int i = 0; i < validContentTypes.length; i++)
- {
- this.validContentIds.add(validContentTypes[i]);
- }
- }
- if (scope.enclosingFiles() != null)
- {
- for (int i = 0; i < scope.enclosingFiles().length; i++)
- {
- IFile file = (IFile) scope.enclosingFiles()[i];
- acceptFile(file);
- }
- }
-
- }
-
- protected boolean acceptFile(IFile file)
- {
-
- if (file == null)
- {
- return false;
- } else
- {
- try
- {
- IContentDescription description = file.getContentDescription();
- if (description != null)
- {
- IContentType contentType = description.getContentType();
- if (contentType != null)
- {
- // TODO use IContentType.isKindOf
- for (Iterator iter = validContentIds.iterator(); iter
- .hasNext();)
- {
- String contentId = (String) iter.next();
- IContentTypeManager contentTypeManager = Platform.getContentTypeManager();
- IContentType supportedContentType = contentTypeManager.getContentType(contentId);
- if (supportedContentType != null)
- {
- if (contentType.isKindOf(supportedContentType))
- {
- files.add(file);
- projects.add(file.getProject());
- return true;
- }
- }
-
- }
-
- }
- }
- } catch (CoreException e)
- {
- // ignore the file
- }
- }
- return false;
- }
-
-}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/ProjectSearchScope.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/ProjectSearchScope.java
deleted file mode 100644
index 12ace7127..000000000
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/ProjectSearchScope.java
+++ /dev/null
@@ -1,55 +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.common.core.search.scope;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-
-/**
- *
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- */
-public class ProjectSearchScope extends SearchScopeImpl
-{
-
- /**
- * Creates a scope that ecloses workspace path and eclosing project
- *
- * @param workspacePath -
- * path to the resource in the workspace, e.g.
- * /MyProject/MyFile.xml
- */
- public ProjectSearchScope(IPath workspacePath)
- {
- super();
- initialize(workspacePath);
-
- }
-
- protected void initialize(IPath workspacePath)
- {
- IResource resource = ResourcesPlugin.getWorkspace().getRoot()
- .findMember(workspacePath);
- if (resource != null)
- {
- IProject project = resource.getProject();
- traverseContainer(project);
- }
- }
-
-}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/SearchScope.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/SearchScope.java
deleted file mode 100644
index 1dd3efd27..000000000
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/SearchScope.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.wst.common.core.search.scope;
-
-import org.eclipse.core.resources.IFile;
-
-/**
- * A <code>SearchScope</code> defines where search result should be found by a
- * <code>SearchEngine</code> (e.g. project, workspace).
- *
- * Clients must pass an instance of this class to the <code>search(...)</code>
- * methods. Such an instance can be created using the following factory methods
- * on <code>SearchScope</code>: <code>newSearchScope(IResource[])</code>,
- * <code>newWorkspaceScope()</code>
- *
- * The default implementaion of the search scope has no filter, and at creation
- * does not contain any files, It could accept any workspace file.
- *
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- */
-public abstract class SearchScope
-{
- /**
- * Returns the path to the workspace files that belong in this search scope.
- * (see <code>IResource.getFullPath()</code>). For example,
- * /MyProject/MyFile.txt
- *
- * @return an array of files in the workspace that belong to this scope.
- */
- public abstract IFile[] enclosingFiles();
-
-
-
-
-
-}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/SearchScopeImpl.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/SearchScopeImpl.java
deleted file mode 100644
index 33c4c691d..000000000
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/SearchScopeImpl.java
+++ /dev/null
@@ -1,133 +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.common.core.search.scope;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-
-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.IResourceVisitor;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-
-/**
- *
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- */
-public class SearchScopeImpl extends SearchScope
-{
-
- protected List files = new ArrayList();
-
- protected HashSet projects = new HashSet();
-
- public SearchScopeImpl()
- {
- super();
- }
-
- /**
- * Checks whether the resource at the given path is belongs to this scope.
- * Resource path could be added to the scope, if scope conditions are met.
- * if {@link ISearchScope.encloses(String resourcePath)} returns false and
- * then this method is called and returns true, next call to
- * {@link ISearchScope.eclipses(String resourcePath)} should return true.
- *
- * @param file -
- * workspace file
- * @return whether the resource is enclosed by this scope
- */
- protected boolean acceptFile(IFile file)
- {
- if (file == null)
- {
- return false;
- }
- files.add(file);
- projects.add(file.getProject());
- return true;
-
- }
-
- /**
- * Checks whether the resource at the given path is enclosed by this scope.
- *
- * @param resourcePath -
- * workspace relative resource path
- * @return whether the resource is enclosed by this scope
- */
- protected boolean encloses(String resourcePath)
- {
- IResource resource = ResourcesPlugin.getWorkspace().getRoot()
- .findMember(resourcePath);
- if (resource == null)
- return false;
- return (files.contains(resource));
- }
-
- /**
- * Returns the path to the workspace files that belong in this search scope.
- * (see <code>IResource.getFullPath()</code>). For example,
- * /MyProject/MyFile.txt
- *
- * @return an array of files in the workspace that belong to this scope.
- */
- public IFile[] enclosingFiles()
- {
- if (files == null)
- return new IFile[0];
- return (IFile[]) files.toArray(new IFile[files.size()]);
- }
-
- /**
- * Returns the paths to the enclosing projects for this search scope. (see
- * <code>IResource.getFullPath()</code>). For example, /MyProject
- *
- * @return an array of paths to the enclosing projects.
- */
- protected IProject[] enclosingProjects()
- {
-
- return (IProject[]) projects.toArray(new IProject[projects.size()]);
-
- }
-
- protected void traverseContainer(IContainer container)
- {
-
- IResourceVisitor visitor = new IResourceVisitor()
- {
- public boolean visit(IResource resource)
- {
- if (resource.getType() == IResource.FILE)
- acceptFile((IFile) resource);
- return true;
- }
- };
- try
- {
- container.accept(visitor);
- } catch (CoreException e)
- {
- // ignore resource
- }
-
- }
-}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/SelectionSearchScope.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/SelectionSearchScope.java
deleted file mode 100644
index 4ffcd3ea7..000000000
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/SelectionSearchScope.java
+++ /dev/null
@@ -1,67 +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.common.core.search.scope;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IResource;
-
-/**
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- */
-public class SelectionSearchScope extends SearchScopeImpl
-{
-
- protected IResource[] resources;
-
- /**
- * Creates a scope that ecloses workspace path and eclosing project
- *
- * @param workspacePath -
- * path to the resource in the workspace, e.g.
- * /MyProject/MyFile.xml
- */
- public SelectionSearchScope(IResource[] resources)
- {
- super();
- this.resources = resources;
- initialize();
-
- }
-
- protected void initialize()
- {
- if (resources == null)
- return;
- for (int index = 0; index < resources.length; index++)
- {
- IResource resource = resources[index];
- if (resource != null)
- {
- if (resource.getType() == IResource.FOLDER)
- {
- traverseContainer((IFolder) resource);
- } else if (resource.getType() == IResource.FILE)
- {
- acceptFile((IFile) resource);
- }
- }
-
- }
-
- }
-
-}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/WorkingSetSearchScope.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/WorkingSetSearchScope.java
deleted file mode 100644
index cab1a1909..000000000
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/WorkingSetSearchScope.java
+++ /dev/null
@@ -1,81 +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.common.core.search.scope;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IAdaptable;
-
-/**
- * This class is required to wrap the content of an IWorkingSet.
- * We can't use IWorkingSet directly because it's part of an eclipse.ui
- * component. Therefore, we need to create this object as a surrogate.
- * <br>
- * Usage: We get the array IAdaptable[] of the IWorkingSet object and use this
- * array as argument for all methods of this class including the constructor.
- */
-public class WorkingSetSearchScope extends SearchScopeImpl{
-
- /**
- * Creates an empty scope when no resources is given.
- */
- public WorkingSetSearchScope(){
- super();
- }
-
- /**
- * Intended to be used with an IWorkingSet
- * <br>
- * For example:
- * <pre>
- * IWorkingSet oneWorkingSet;
- * ...
- * IAdaptable[] elements = oneWorkingSet.getElements();
- * WorkingSetSearchScope scope = new WorkingSetSearchScope(elements);
- * </pre>
- */
- public WorkingSetSearchScope(IAdaptable[] elements)
- {
- super();
- addElementsOfWorkingSet(elements);
- }
-
- /**
- * Intended to be used with an IWorkingSet
- * <br>
- * For example:
- * <pre>
- * WorkingSetSearchScope scope = ..;
- * ...
- * IWorkingSet anotherWorkingSet;
- * IAdaptable[] elements = anotherWorkingSet.getElements();
- * scope.addAWorkingSetToScope(elements);
- * </pre>
- */
- public void addAWorkingSetToScope(IAdaptable[] elements){
- addElementsOfWorkingSet(elements);
- }
-
- private void addElementsOfWorkingSet(IAdaptable[] elements){
- for (int j = 0; j < elements.length; j++){
- IContainer container = (IContainer) elements[j].getAdapter(IContainer.class);
- if ( container != null ){
- traverseContainer(container);
- }
- else{
- IFile aFile = (IFile) elements[j].getAdapter(IFile.class);
- if ( aFile != null)
- acceptFile(aFile);
- }
- }
- }
-}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/WorkspaceSearchScope.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/WorkspaceSearchScope.java
deleted file mode 100644
index e01c20123..000000000
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/scope/WorkspaceSearchScope.java
+++ /dev/null
@@ -1,51 +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.common.core.search.scope;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-
-/**
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- */
-public class WorkspaceSearchScope extends SearchScopeImpl
-{
-
- protected IResource currentResource;
-
- /**
- * Creates a scope that ecloses workspace path and eclosing project
- *
- * @param workspacePath -
- * path to the resource in the workspace, e.g.
- * /MyProject/MyFile.xml
- */
- public WorkspaceSearchScope()
- {
- super();
- initialize();
-
- }
-
- protected void initialize()
- {
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- traverseContainer(root);
-
- }
-
-}
diff --git a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/util/CollectingSearchRequestor.java b/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/util/CollectingSearchRequestor.java
deleted file mode 100644
index d227f9317..000000000
--- a/plugins/org.eclipse.wst.common.core/src-search/org/eclipse/wst/common/core/search/util/CollectingSearchRequestor.java
+++ /dev/null
@@ -1,58 +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.common.core.search.util;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.wst.common.core.search.SearchMatch;
-import org.eclipse.wst.common.core.search.SearchRequestor;
-
-/**
- * Collects the results returned by a <code>ISearchEngine</code>.
- *
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- */
-// issue should you move this to a util package? what does jdt do?
-public class CollectingSearchRequestor extends SearchRequestor
-{
- private ArrayList fFound;
-
- public CollectingSearchRequestor()
- {
- fFound = new ArrayList();
- }
-
- /**
- * @return a List of {@link SearchMatch}es (not sorted)
- */
- public List/* <SearchMatch> */getResults()
- {
- return fFound;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.core.search.internal.provisional.SearchRequestor#acceptSearchMatch(org.eclipse.wst.common.search.internal.provisional.SearchMatch)
- */
- public void acceptSearchMatch(SearchMatch match) throws CoreException
- {
- fFound.add(match);
-
- }
-}
diff --git a/plugins/org.eclipse.wst.common.emf/.classpath b/plugins/org.eclipse.wst.common.emf/.classpath
deleted file mode 100644
index de9605dc5..000000000
--- a/plugins/org.eclipse.wst.common.emf/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="wtpemf/"/>
- <classpathentry kind="src" path="workbench/"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.wst.common.emf/.cvsignore b/plugins/org.eclipse.wst.common.emf/.cvsignore
deleted file mode 100644
index 26458b44f..000000000
--- a/plugins/org.eclipse.wst.common.emf/.cvsignore
+++ /dev/null
@@ -1,8 +0,0 @@
-bin
-runtime
-temp.folder
-build.xml
-org.eclipse.wst.common.emf_1.0.0.zip
-src.zip
-@dot
-javaCompiler...args
diff --git a/plugins/org.eclipse.wst.common.emf/.project b/plugins/org.eclipse.wst.common.emf/.project
deleted file mode 100644
index 5b5f0fe9b..000000000
--- a/plugins/org.eclipse.wst.common.emf/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.common.emf</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.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/plugins/org.eclipse.wst.common.emf/META-INF/MANIFEST.MF b/plugins/org.eclipse.wst.common.emf/META-INF/MANIFEST.MF
deleted file mode 100644
index 60c439d76..000000000
--- a/plugins/org.eclipse.wst.common.emf/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,17 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.wst.common.emf; singleton:=true
-Bundle-Version: 1.1.1.qualifier
-Bundle-Activator: org.eclipse.wst.common.internal.emf.plugin.EcoreUtilitiesPlugin
-Bundle-Vendor: %pluginProvider
-Bundle-Localization: plugin
-Export-Package: org.eclipse.wst.common.internal.emf.plugin;x-internal:=true,
- org.eclipse.wst.common.internal.emf.resource;x-friends:="org.eclipse.wst.common.modulecore",
- org.eclipse.wst.common.internal.emf.utilities;x-internal:=true
-Require-Bundle: org.eclipse.emf.ecore.xmi;bundle-version="[2.2.0,2.3.0)",
- org.eclipse.wst.common.frameworks;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.jem.util;bundle-version="[1.2.0,1.3.0)"
-Eclipse-AutoStart: true
diff --git a/plugins/org.eclipse.wst.common.emf/about.html b/plugins/org.eclipse.wst.common.emf/about.html
deleted file mode 100644
index 4ec598958..000000000
--- a/plugins/org.eclipse.wst.common.emf/about.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<HTML>
-
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-
-<BODY lang="EN-US">
-
-<H3>About This Content</H3>
-
-<P>May 2, 2006</P>
-
-<H3>License</H3>
-
-<P>The Eclipse Foundation makes available all content in this plug-in
-("Content"). Unless otherwise indicated below, the Content is provided to you
-under the terms and conditions of the Eclipse Public License Version 1.0
-("EPL"). A copy of the EPL is available at
-<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
-For purposes of the EPL, "Program" will mean the Content.</P>
-
-<P>If you did not receive this Content directly from the Eclipse Foundation, the
-Content is being redistributed by another party ("Redistributor") and different
-terms and conditions may apply to your use of any object code in the Content.
-Check the Redistributor’s license that was provided with the Content. If no such
-license exists, contact the Redistributor. Unless otherwise indicated below, the
-terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at
-<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P>
-
-</BODY>
-</HTML>
diff --git a/plugins/org.eclipse.wst.common.emf/build.properties b/plugins/org.eclipse.wst.common.emf/build.properties
deleted file mode 100644
index b37b0c53f..000000000
--- a/plugins/org.eclipse.wst.common.emf/build.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = plugin.xml,\
- META-INF/,\
- about.html,\
- plugin.properties,\
- .,\
- schema/
-jars.compile.order = .
-src.includes = component.xml,\
- schema/
-output.. = bin/
-source.. = wtpemf/,\
- workbench/
diff --git a/plugins/org.eclipse.wst.common.emf/component.xml b/plugins/org.eclipse.wst.common.emf/component.xml
deleted file mode 100644
index 9530d3307..000000000
--- a/plugins/org.eclipse.wst.common.emf/component.xml
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><component xmlns="http://eclipse.org/wtp/releng/tools/component-model" name="org.eclipse.wst.common.emf"><component-depends unrestricted="true"></component-depends><plugin id="org.eclipse.wst.common.emf" fragment="false"/><plugin id="org.eclipse.wst.common.emfworkbench.integration" fragment="false"/></component> \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/plugin.properties b/plugins/org.eclipse.wst.common.emf/plugin.properties
deleted file mode 100644
index 88459b784..000000000
--- a/plugins/org.eclipse.wst.common.emf/plugin.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-PackageURIMap=PackageURIMap
-pluginName=EMF Utilities
-pluginProvider=Eclipse.org \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/plugin.xml b/plugins/org.eclipse.wst.common.emf/plugin.xml
deleted file mode 100644
index dde6ad896..000000000
--- a/plugins/org.eclipse.wst.common.emf/plugin.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
- <extension-point id="packageURIMap" name="%PackageURIMap" schema="schema/packageURIMap.exsd"/>
- <extension-point id="translatorExtension" name="translatorExtension" schema="schema/translatorExtension.exsd"/>
-
-<!-- Need to register the Ecore specific package mappings -->
- <extension
- point="org.eclipse.wst.common.emf.packageURIMap">
- <map
- uri="http://www.eclipse.org/emf/2002/Ecore"
- prefix="ecore">
- </map>
- <map
- uri="http://www.eclipse.org/emf/2002/Mapping"
- prefix="mapping">
- </map>
-<!-- Trick to get Mapping.xmi for MOF5 serialization -->
- <map
- uri="http://www.eclipse.org/emf/2002/Mapping"
- prefix="Mapping">
- </map>
- </extension>
-
- <extension
- point="org.eclipse.jem.util.uiContextSensitiveClass">
- <uiContextSensitiveClass
- context="Headless"
- key="rendererFactory"
- className="org.eclipse.wst.common.internal.emf.resource.EMF2DOMRendererFactory">
- </uiContextSensitiveClass>
- </extension>
-
-</plugin>
diff --git a/plugins/org.eclipse.wst.common.emf/prepareforpii.xml b/plugins/org.eclipse.wst.common.emf/prepareforpii.xml
deleted file mode 100644
index 8007604c4..000000000
--- a/plugins/org.eclipse.wst.common.emf/prepareforpii.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<project name="PrepareForPII" default="main" basedir=".">
-
- <!-- Setup temp variables -->
- <target name="init">
- <property name="nlsDir" value="d:/NLS/Corona/0526"/>
- <property name="plugin" value="com.ibm.wtp.emf"/>
- <property name="plugindir" value="d:/workspaceCorona/${plugin}"/>
- <property name="outputDir" value="${nlsDir}/${plugin}"/>
-
-
- </target>
-
- <!-- Create the destination dir -->
- <target name="nlsDir" depends="init">
- <mkdir dir="${nlsDir}"/>
- </target>
-
- <!-- Create the destination dir -->
- <target name="plugindir" depends="nlsDir">
- <delete dir="${outputDir}"/>
- <mkdir dir="${outputDir}"/>
- </target>
-
- <!-- Move the files to the correct locations in the workspace. -->
- <target name="main" depends="plugindir">
-
- <messageIdGen folderPath = "${plugindir}" componentId = "E" />
-
- <copy todir = "${outputDir}/wtpemf" >
- <fileset dir="${plugindir}/wtpemf">
- <include name="**/*.properties"/>
- </fileset>
- </copy>
-
-
- </target>
-</project>
diff --git a/plugins/org.eclipse.wst.common.emf/schema/packageURIMap.exsd b/plugins/org.eclipse.wst.common.emf/schema/packageURIMap.exsd
deleted file mode 100644
index 4f9d9555c..000000000
--- a/plugins/org.eclipse.wst.common.emf/schema/packageURIMap.exsd
+++ /dev/null
@@ -1,113 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.wst.common.emf">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.wst.common.emf" id="packageURIMap" name="%PackageURIMap"/>
- </appInfo>
- <documentation>
- This extension point is used to register package mappings.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="map" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="map">
- <complexType>
- <attribute name="uri" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="prefix" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- &lt;b&gt;This extension point is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.&lt;/b&gt;
- </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>
- Copyright (c) 2005 IBM Corporation and others.&lt;br&gt;
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Eclipse Public License v1.0 which accompanies
-this distribution, and is available at &lt;a
-href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </documentation>
- </annotation>
-
-</schema>
diff --git a/plugins/org.eclipse.wst.common.emf/schema/translatorExtension.exsd b/plugins/org.eclipse.wst.common.emf/schema/translatorExtension.exsd
deleted file mode 100644
index 5aa96697d..000000000
--- a/plugins/org.eclipse.wst.common.emf/schema/translatorExtension.exsd
+++ /dev/null
@@ -1,103 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.wst.common.emf">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.wst.common.emf" id="translatorExtension" name="translatorExtension"/>
- </appInfo>
- <documentation>
- This is used to contribute child translators to the default translators in EMF2DOMAdapterImpl.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="translator"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="translator">
- <complexType>
- <attribute name="className" type="string" use="required">
- <annotation>
- <documentation>
- This is the fully qualified classname of the child translator.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- This extension point is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.
- </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>
- 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
- </documentation>
- </annotation>
-
-</schema>
diff --git a/plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/ResourceSynchronizedIsLoadingAdapter.java b/plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/ResourceSynchronizedIsLoadingAdapter.java
deleted file mode 100644
index f5361051e..000000000
--- a/plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/ResourceSynchronizedIsLoadingAdapter.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Created on Oct 26, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.wst.common.internal.emf;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.jobs.ILock;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.wst.common.internal.emf.utilities.ResourceIsLoadingAdapter;
-
-
-
-
-
-/**
- * The ResourceSynchronizedIsLoadingAdapter is used to synchronize the loading
- * of EMF resources. This is the Eclipse version of ResourceIsLoadingAdapter,
- * and uses the Eclipse ILock technology to acquire a semaphore until the
- * Resource is loaded. the waitForResourceToLoad() method will pause until
- * either (a) the Resource has loaded, the Adapter is notified, and the
- * semaphore is released or (b) the DELAY timeout is exceeded, which prevents
- * full deadlock.
- *
- * @author mdelder
- */
-public class ResourceSynchronizedIsLoadingAdapter extends ResourceIsLoadingAdapter {
-
- private final ILock loadingLock;
-
- /**
- * The delay is default to 5 minutes. This is the upward threshhold. The lock
- * will wait up to DELAY milliseconds to acquire the lock, and bail if not. It
- * does not mean that it will wait DELAY milliseconds always. In general, the
- * wait should be almost instanteous -- just as long as document loading remains
- * speedy.
- */
- private static final long DELAY = 300000;
-
- public ResourceSynchronizedIsLoadingAdapter() {
- loadingLock = Platform.getJobManager().newLock();
- if(loadingLock != null)
- loadingLock.acquire();
- }
-
-
- /* (non-Javadoc)
- * @see com.ibm.wtp.internal.emf.utilities.ResourceIsLoadingAdapter#waitForResourceToLoad()
- */
- public void waitForResourceToLoad() {
-
- if(loadingLock == null)
- return;
-
- boolean lockAcquired = false;
- try {
- if( loadingLock != null )
- if( !(lockAcquired = loadingLock.acquire(DELAY)) )
- logWarning();
- } catch (Throwable t) {
- } finally {
- if(lockAcquired)
- loadingLock.release();
- }
-
- }
-
-
- /**
- *
- */
- private void logWarning() {
- Notifier target = getTarget();
- if(target == null || !(target instanceof Resource)) {
- Resource resource = (Resource) target;
- System.err.println("[WARNING] Could not acquire Semaphore Lock for Resource: \""+resource.getURI() + "\" in " + getClass());
- }
-
- }
-
-
- /* (non-Javadoc)
- * @see com.ibm.wtp.internal.emf.utilities.ResourceIsLoadingAdapter#notifyChanged(org.eclipse.emf.common.notify.Notification)
- */
- public void notifyChanged(Notification notification) {
-
- if (notification.getNotifier() != null) {
- //listen for the remove of the loading adapter
- if (isSetLoadedResourceNotification(notification)) {
- if(loadingLock != null)
- loadingLock.release();
- removeIsLoadingSupport();
- }
- }
- }
-
-
- /* (non-Javadoc)
- * @see com.ibm.wtp.internal.emf.utilities.ResourceIsLoadingAdapter#forceRelease()
- */
- public void forceRelease() {
- try {
- if(loadingLock != null && loadingLock.getDepth() > 0)
- loadingLock.release();
- } catch(Throwable t) {}
- }
-
-}
diff --git a/plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/ResourceSynchronizedIsLoadingAdapterFactory.java b/plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/ResourceSynchronizedIsLoadingAdapterFactory.java
deleted file mode 100644
index b3d449538..000000000
--- a/plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/ResourceSynchronizedIsLoadingAdapterFactory.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Created on Oct 26, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.wst.common.internal.emf;
-
-import org.eclipse.wst.common.internal.emf.utilities.ResourceIsLoadingAdapter;
-import org.eclipse.wst.common.internal.emf.utilities.ResourceIsLoadingAdapterFactory;
-
-
-/**
- * @author mdelder
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public class ResourceSynchronizedIsLoadingAdapterFactory extends ResourceIsLoadingAdapterFactory {
-
-
- /* (non-Javadoc)
- * @see com.ibm.wtp.internal.emf.utilities.ResourceIsLoadingAdapterFactory#createResourceIsLoadingAdapter()
- */
- public ResourceIsLoadingAdapter createResourceIsLoadingAdapter() {
- return new ResourceSynchronizedIsLoadingAdapter();
- }
-}
diff --git a/plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/plugin/EcoreUtilitiesPlugin.java b/plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/plugin/EcoreUtilitiesPlugin.java
deleted file mode 100644
index d21bec3b7..000000000
--- a/plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/plugin/EcoreUtilitiesPlugin.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Jun 9, 2003
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.wst.common.internal.emf.plugin;
-
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.wst.common.internal.emf.ResourceSynchronizedIsLoadingAdapterFactory;
-import org.eclipse.wst.common.internal.emf.resource.RendererFactory;
-import org.eclipse.wst.common.internal.emf.utilities.ResourceIsLoadingAdapterFactory;
-import org.osgi.framework.BundleContext;
-
-/**
- * @author DABERG
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class EcoreUtilitiesPlugin extends Plugin {
- public static final String ID = "org.eclipse.wst.common.emf"; //$NON-NLS-1$
- public static final String TRANSLATOR_EXTENSTION_POINT = "translatorExtension"; //$NON-NLS-1$
-
- /**
- * @param descriptor
- */
- public EcoreUtilitiesPlugin() {
- super();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.Plugin#startup()
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- RendererFactory.setDefaultHandler(PluginRendererFactoryDefaultHandler.INSTANCE);
- PackageURIMapReader reader = new PackageURIMapReader();
- reader.processExtensions();
- //use a synchronized loading adapter factory
- ResourceIsLoadingAdapterFactory.INSTANCE = new ResourceSynchronizedIsLoadingAdapterFactory();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/plugin/PackageURIMapReader.java b/plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/plugin/PackageURIMapReader.java
deleted file mode 100644
index 68b9fe457..000000000
--- a/plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/plugin/PackageURIMapReader.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.plugin;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.wst.common.internal.emf.resource.CompatibilityPackageMappingRegistry;
-
-/**
- * This reader will read the packageURIMap extension point and populate the
- * CompatibilityPackageMappingRegistry.
- *
- * The packageURIMap will have the following configuration element.
- *
- * <map prefix="somePackagePrefix" uri="somePackageURI"/>
- *
- */
-public class PackageURIMapReader {
- private static final String URI_ATT_NAME = "uri"; //$NON-NLS-1$
- private static final String PREFIX_ATT_NAME = "prefix"; //$NON-NLS-1$
- private static final String EXTENSION_POINT_NAME = "packageURIMap"; //$NON-NLS-1$
-
- /**
- *
- */
- public PackageURIMapReader() {
- super();
- }
-
- private IExtensionPoint getExtensionPoint() {
- return Platform.getExtensionRegistry().getExtensionPoint(EcoreUtilitiesPlugin.ID, EXTENSION_POINT_NAME);
- }
-
- /**
- * Call this method to read and process all of the packageURIMap extensions. *
- */
- public void processExtensions() {
- CompatibilityPackageMappingRegistry reg = CompatibilityPackageMappingRegistry.INSTANCE;
- IExtension[] extensions = getExtensionPoint().getExtensions();
- for (int i = 0; i < extensions.length; i++)
- processExtension(extensions[i], reg);
- }
-
- /**
- * @param extension
- */
- private void processExtension(IExtension extension, CompatibilityPackageMappingRegistry reg) {
- IConfigurationElement[] configs = extension.getConfigurationElements();
- for (int i = 0; i < configs.length; i++)
- processConfiguration(configs[i], reg);
- }
-
- /**
- * @param element
- */
- private void processConfiguration(IConfigurationElement element, CompatibilityPackageMappingRegistry reg) {
- String prefix = element.getAttribute(PREFIX_ATT_NAME);
- String uri = element.getAttribute(URI_ATT_NAME);
- reg.registerPrefixToPackageURI(prefix, uri);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/plugin/PluginRendererFactoryDefaultHandler.java b/plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/plugin/PluginRendererFactoryDefaultHandler.java
deleted file mode 100644
index c24392adb..000000000
--- a/plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/plugin/PluginRendererFactoryDefaultHandler.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Dec 1, 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.wst.common.internal.emf.plugin;
-
-import org.eclipse.jem.util.UIContextDetermination;
-import org.eclipse.wst.common.internal.emf.resource.EMF2DOMRendererFactoryDefaultHandler;
-import org.eclipse.wst.common.internal.emf.resource.RendererFactory;
-
-/**
- * @author schacher
- *
- * 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 PluginRendererFactoryDefaultHandler extends EMF2DOMRendererFactoryDefaultHandler {
-
- static final PluginRendererFactoryDefaultHandler INSTANCE = new PluginRendererFactoryDefaultHandler();
- static final String EXT_POINT_NAME = "rendererFactory"; //$NON-NLS-1$
-
- /**
- *
- */
- protected PluginRendererFactoryDefaultHandler() {
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.EMF2DOMRendererFactoryDefaultHandler#getDefaultRendererFactory()
- */
- public RendererFactory getDefaultRendererFactory() {
- RendererFactory aFactory = (RendererFactory) UIContextDetermination.createInstance(EXT_POINT_NAME);
- return aFactory == null ? super.getDefaultRendererFactory() : aFactory;
- }
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/AbstractRendererImpl.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/AbstractRendererImpl.java
deleted file mode 100644
index 9112aef59..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/AbstractRendererImpl.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.resource;
-
-
-public abstract class AbstractRendererImpl implements Renderer {
-
-
- protected TranslatorResource resource;
- private int versionId;
- private boolean validating = true;
-
- /**
- * Constructor for AbstractRendererImpl.
- */
- public AbstractRendererImpl() {
- super();
- }
-
- /**
- * @see com.ibm.etools.emf2xml.Renderer#setResource(TranslatorResource)
- */
- public void setResource(TranslatorResource aResource) {
- resource = aResource;
- }
-
- /**
- * @see com.ibm.etools.emf2xml.Renderer#getResource()
- */
- public TranslatorResource getResource() {
- return resource;
- }
-
- public int getVersionId() {
- return this.versionId;
- }
-
- public void setVersionId(int versionId) {
- this.versionId = versionId;
- }
-
- /**
- * @return
- */
- public boolean isValidating() {
- return validating;
- }
-
- /**
- * @param b
- */
- public void setValidating(boolean b) {
- validating = b;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.Renderer#accessForRead()
- */
- public void accessForRead() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.Renderer#accessForWrite()
- */
- public void accessForWrite() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.Renderer#isModified()
- */
- public boolean isModified() {
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.Renderer#isShared()
- */
- public boolean isShared() {
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.Renderer#isSharedForWrite()
- */
- public boolean isSharedForWrite() {
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.Renderer#preDelete()
- */
- public void preDelete() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.Renderer#preUnload()
- */
- public void preUnload() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.Renderer#releaseFromRead()
- */
- public void releaseFromRead() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.Renderer#releaseFromWrite()
- */
- public void releaseFromWrite() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.Renderer#setBatchMode(boolean)
- */
- public void setBatchMode(boolean isBatch) {
- }
-
- public boolean useStreamsForIO() {
- return true;
- }
-
- public boolean isBatchMode() {
- return false;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/AttributeTranslatorFilter.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/AttributeTranslatorFilter.java
deleted file mode 100644
index b0d08696f..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/AttributeTranslatorFilter.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-/*
- * Created on Sep 21, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-
-public final class AttributeTranslatorFilter extends TranslatorFilter {
-
- public AttributeTranslatorFilter() {
- super(null, -1);
- }
-
- public AttributeTranslatorFilter(Translator trans, int version) {
- super(trans, version);
- }
-
- public final int scanNextTranslator(Translator[] children, int start) {
- int found = start + 1;
- for (; found < children.length; ++found) {
- if (children[found].isDOMAttribute())
- break;
- }
- found = (found < children.length) ? found : -1;
- return found;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CacheEventNode.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CacheEventNode.java
deleted file mode 100644
index e57583388..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CacheEventNode.java
+++ /dev/null
@@ -1,585 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.resource;
-
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EObject;
-import org.xml.sax.Attributes;
-
-
-/**
- * CacheEventNodes (CENOs) store information collected from SAX Events. This information can then be
- * used once all necessary SAX Events have been generated to create and/or set values on EMF model
- * objects.
- *
- * CacheEventNodes (CENOs) have a simple lifecycle: initialize, collect data, commit, discard. When
- * initialized, CENOs will attempt to find the appropriate translator for a given XML element name,
- * and also create/set any necessary EMF model values. Data is collected as SAX character() events
- * are generated. On the SAX endElement event, the CENO is committed(), which is where it will
- * complete its processing to create EMF model features. In those cases where it cannot complete its
- * processing, it will defer its processing to the updateEMF() method of its parent. Defered
- * processing is necessary to handle EMF features that require read ahead cues from the XML. CENOs
- * will add themselves to their parents as children in a tree data structure. When an CENO
- * determines it is the golden piece of information required to instantiate its parent feature, it
- * will trigger its parent CENO to process the rest of the cached CENO tree. As mentioned, the
- * building of a CENO tree will only occur for nodes with read ahead cues.
- *
- * discard() is invoked by init() to ensure that no junk state is left from a previous use of the
- * CENO. commit() will call discard as needed. Because of the use of discard, CENOs can be pooled
- * and reused. If a CENO determines that it is contained in a pool, it will manage its own release
- * from that pool. Self- management is necessary because of the way in which CENOs might cache
- * certain children while waiting to create the parent EMF feature.
- *
- * @author mdelder
- */
-public class CacheEventNode {
-
- public static final String ROOT_NODE = "EMF_ROOT_NODE"; //$NON-NLS-1$
-
- private String nodeName = null;
- private Translator translator = null;
- private Notifier emfOwner = null;
- private StringBuffer buffer = null;
- private List children = null;
- private int versionID;
-
- /*
- * The internal data structure used to store the attributes is a String[]. The choice was made
- * to use an array to avoid the creation of another object (probably a Hashtable) and to exploit
- * array-access times to get the name and value of the attributes (opposed to full fledged
- * method invocations).
- *
- */
- private String[] attributes = null;
- private CacheEventNode parent = null;
- private CacheEventPool containingPool = null;
- private Boolean ignorable = null;
-
- public CacheEventNode(CacheEventPool containingPool) {
- this.containingPool = containingPool;
- }
-
- /**
- * Lifecycle method. init(TranslatorResource) will configure this Adapter as a ROOT node.
- *
- * This method will invoke discard() before completing its tasks.
- */
- public void init(TranslatorResource resource) {
- this.discard();
- this.setEmfOwner(resource);
- this.setTranslator(resource.getRootTranslator());
- this.setVersionID(resource.getVersionID());
- this.nodeName = CacheEventNode.ROOT_NODE;
- }
-
- /**
- * Lifecycle method. init(CacheEventNode, String, Attributes) will configure this Adapter to be
- * a non-ROOT node of the Adapter data structure
- *
- * This method will invoke discard() before completing its tasks.
- */
- public void init(CacheEventNode parentArg, String nodeNameArg, Attributes attributesArg) {
- this.discard();
- this.nodeName = nodeNameArg;
- init(parentArg, attributesArg);
- }
-
- private void init(CacheEventNode parentRecord, Attributes attributesArg) {
- setParent(parentRecord);
-
- setAttributes(attributesArg);
- if (parent != null) {
- /* I am not the root */
-
- /*
- * If the parent is part of the DOM Path, then we ignore it and interact with the grand
- * parent
- */
- if (parent.translator != null && parent.isInDOMPath()) {
- setParent(parent.getParent());
- }
-
- setVersionID(parent.getVersionID());
- if (parent.getEmfOwner() != null && parent.getTranslator() != null) {
-
- /* My parent had enough information to create themself */
-
- if (parent.getParent() != null) {
- setTranslator(parent.getTranslator().findChild(nodeName, parent.getEmfOwner(), getVersionID()));
-
- } else {
- setTranslator(parent.getTranslator());
- }
-
- if (this.translator == null) {
- /* Our translator is null! Ahh! Run! */
- throw new IllegalStateException("Parent Translator (" + parent.getTranslator() + //$NON-NLS-1$
- ") did not find a Child Translator for \"" + //$NON-NLS-1$
- nodeName + "\"."); //$NON-NLS-1$
- }
-
- if (this.translator.getReadAheadHelper(nodeName) == null && !this.translator.isManagedByParent()) {
- /*
- * I do not require a read ahead cue, and I am not managed by my parent so I can
- * create an instance of my EMF object
- */
-
- Notifier myEmfOwner = this.translator.createEMFObject(getNodeName(), null);
- setEmfOwner(myEmfOwner);
- this.translator.setMOFValue(parent.getEmfOwner(), myEmfOwner);
- }
- /*
- * Else I require a read ahead value or I am being managed by my parent, so I have
- * no need to create an EMF object
- */
- }
- /*
- * Else I am not mapped to the EMF stack (XML Elements found in the DOMPath are ignored)
- */
- }
- /* processAttributes is guarded and will not execute unless ready */
- processAttributes();
-
- }
-
- /**
- * commit() is invoked only if the CacheEventNode (CENO) has all the information they need and
- * should be able to determine what to do to the EMF feature.
- *
- * The commit() method will invoke discard() when it has completed its tasks, if needed. Thus,
- * after invoking this method, the CENO may have no meaningful state. If discard() is invoked,
- * all previously held reference will be released in order to be made eligible for Garbage
- * Collection.
- *
- */
- public void commit() {
-
- if (parent == null || this.isIgnorable()) {
- discard();
- releaseFromContainingPool();
- return;
- }
-
- ReadAheadHelper helper = null;
- Translator activeTranslator = getTranslator();
- Translator parentTranslator = getParent().getTranslator();
-
- if (parent != null && parent.getEmfOwner() == null) {
-
- /*
- * Not enough information yet, add the CacheEventNode to the DOM Cache tree
- */
-
- parent.appendToBuffer(this);
- if ((helper = getParent().getReadAheadHelper()) != null) {
- /*
- * If the parentRecord's emfOwner is null, then it must not be initialized therefore
- * it or one of its ancestors must require read ahead clues
- *
- * The following if statement checks if the parent is the node waiting for a
- * readAhead cue
- */
- EObject parentOwner = null;
- if (helper.nodeValueIsReadAheadName(getNodeName())) {
- /* The readAheadName is the value of the qName child node */
-
- /* We have enough information to create the EmfOwner in the parent! */
- parentOwner = parentTranslator.createEMFObject(getParent().getNodeName(), getBuffer());
-
- /*
- * Now we need to parse the cached DOM tree and update the emfOwner of the
- * parent
- */
- getParent().updateEMF(parentOwner);
-
- } else if (helper.nodeNameIsReadAheadName(getNodeName())) {
- /* The readAheadName is the actual name of the child node (qName) */
-
- /* We have enough information to create the EmfOwner in the parent! */
- parentOwner = parentTranslator.createEMFObject(getParent().getNodeName(), getNodeName());
-
- /*
- * Now we need to parse the cached DOM tree and update the emfOwner of the
- * parent
- */
- getParent().updateEMF(parentOwner);
- }
-
- } /* Else an ancestor of the parent is waiting */
-
- } else {
- if (activeTranslator != null) {
- if (activeTranslator.isManagedByParent()) {
-
- Object value = activeTranslator.convertStringToValue(getNodeName(), null, getBuffer(), getParent().getEmfOwner());
- activeTranslator.setMOFValue(getParent().getEmfOwner(), value);
- processAttributes();
- } else {
-
- activeTranslator.setTextValueIfNecessary(getBuffer(), getEmfOwner(), getVersionID());
- }
-
- }
- discard();
- releaseFromContainingPool();
- }
- }
-
- /**
- * Instruct the CacheEventNode to discard all references to make everything eligible for garbage
- * collection. This should ONLY be called after commit has succeeded. In the case of EMF
- * features that require a readAheadName, process not be completed in commit(), but rather will
- * be defered to the updateEMF() method. This method was made private specifically because it
- * could erase all information contained in the CacheEventNode before it has been processed.
- *
- */
- private void discard() {
- translator = null;
- emfOwner = null;
- buffer = null;
- if (children != null)
- children.clear();
- children = null;
- attributes = null;
- parent = null;
- }
-
- private void releaseFromContainingPool() {
- if (containingPool != null)
- containingPool.releaseNode(this);
- }
-
- public boolean isIgnorable() {
- if (ignorable == null) {
- boolean result = false;
- if (this.translator != null) {
- if (this.translator.isEmptyContentSignificant()) {
- result = false;
- } else {
- String domPath = this.translator.getDOMPath();
- result = (domPath != null) ? domPath.indexOf(this.nodeName) >= 0 : false;
- }
- }
- ignorable = result ? Boolean.TRUE : Boolean.FALSE;
- }
- return ignorable.booleanValue();
- }
-
- /**
- * Determines if a given child has a translator.
- *
- * @param childNodeName
- * the name of the current XML child node
- * @return true only if the childNodeName can be ignored (e.g. it is part of the DOM Path)
- */
- public boolean isChildIgnorable(String childNodeName) {
- boolean result = false;
-
- Translator childTranslator = null;
- if (this.getTranslator() != null) {
- childTranslator = this.getTranslator().findChild(childNodeName, this.getEmfOwner(), this.getVersionID());
-
- if (childTranslator != null) {
- if (childTranslator.isEmptyContentSignificant()) {
- result = false;
- } else {
- String temp = null;
- result = ((temp = childTranslator.getDOMPath()) != null) ? temp.indexOf(childNodeName) >= 0 : false;
- }
- }
- }
-
- return result;
- }
-
- public boolean isInDOMPath() {
- boolean result = false;
-
- if (this.getTranslator() != null) {
-
- result = this.getNodeName().equals(this.getTranslator().getDOMPath());
- }
-
- return result;
- }
-
- public String toString() {
- StringBuffer output = new StringBuffer("CacheEventNode[");//$NON-NLS-1$
- output.append("nodeName=");//$NON-NLS-1$
- output.append(nodeName);
- output.append("; translator=");//$NON-NLS-1$
- output.append(translator);
- output.append("; emfOwner=");//$NON-NLS-1$
- try {
- output.append(emfOwner);
- } catch (RuntimeException re) {
- output.append("Could not render as string!");//$NON-NLS-1$
- }
- output.append("; buffer=");//$NON-NLS-1$
- output.append(this.buffer);
- output.append("; hasChildren=");//$NON-NLS-1$
- output.append((children != null && children.size() > 0));
- if (children != null) {
- for (int i = 0; i < this.children.size(); i++) {
- output.append("\n\tchildren(");//$NON-NLS-1$
- output.append(i);
- output.append("): ");//$NON-NLS-1$
- output.append(this.children.get(i));
- }
- }
- output.append("]");//$NON-NLS-1$
- return output.toString();
- }
-
- /**
- * Updates the EMF model by creating EMF Features as necessary from the DOM Tree Cache
- *
- * @param owner
- */
- public void updateEMF(EObject owner) {
- this.setEmfOwner(owner);
- if (this.parent != null) {
- this.translator.setMOFValue((EObject) this.parent.getEmfOwner(), owner);
- this.processAttributes();
- }
-
- this.updateEMF();
- }
-
- /**
- * The translator and the owner of the parent CENO passed to this method should be nonnull
- */
- public void updateEMF() {
- if (this.children == null)
- return;
-
- CacheEventNode child = null;
- Translator childTranslator = null;
- Object value = null;
- if (this.getEmfOwner() != null) {
- Notifier parentOwner = this.getEmfOwner();
- Translator parentTranslator = this.getTranslator();
- for (int i = 0; i < this.children.size(); i++) {
-
- child = (CacheEventNode) this.children.get(i); /* Create the EMF feature */
- if (this.isChildIgnorable(child.getNodeName())) {
- this.addChildren(child.getChildren());
- } else {
- childTranslator = parentTranslator.findChild(child.getNodeName(), parentOwner, child.getVersionID());
- child.setTranslator(childTranslator);
-
- value = childTranslator.convertStringToValue(child.getNodeName(), null, child.getBuffer(), parentOwner);
- childTranslator.setMOFValue(parentOwner, value);
-
- if (childTranslator.isObjectMap()) {
- child.setEmfOwner((Notifier) value);
- childTranslator.setTextValueIfNecessary(child.getBuffer(), child.getEmfOwner(), getVersionID());
- }
-
- child.processAttributes();
- child.updateEMF(); /* update the EMF of the child */
-
- }
- child.discard();
- child.releaseFromContainingPool();
- }
- this.children = null;
- }
- }
-
- public void addChild(CacheEventNode child) {
- if (this.children == null) {
- this.children = new ArrayList();
- }
- if (parent != null && this.isIgnorable()) {
- parent.addChild(child);
- } else {
- this.children.add(child);
- }
- }
-
- protected void addChildren(List childrenArg) {
- if (this.children == null) {
- this.children = new ArrayList();
- }
- this.children.addAll(childrenArg);
- }
-
- public boolean removeChild(CacheEventNode child) {
- if (this.children == null) {
- return false;
- }
- return this.children.remove(child);
- }
-
- public List getChildren() {
- return this.children;
- }
-
- public ReadAheadHelper getReadAheadHelper() {
- if (this.translator != null && this.translator.hasReadAheadNames()) {
- return translator.getReadAheadHelper(nodeName);
- }
- return null;
- }
-
-
- /* See the documentation for the attributes field for info on how it is structured */
- public void setAttributes(Attributes attr) {
-
- /*
- * The attributes returned from the parser may be stored by reference, so we must copy them
- * over to a local data store
- */
- if (attr != null && attr.getLength() > 0) {
-
- if (this.attributes == null) {
- this.attributes = new String[attr.getLength() * 2];
- }
- for (int i = 0; i < attr.getLength(); i++) {
- this.attributes[i] = attr.getQName(i);
- this.attributes[i + attr.getLength()] = attr.getValue(i);
- }
-
- }
- }
-
- /**
- * processAttributes may be invoked multiple times. It is configured to only carry out the
- * processing one time. After it successfully completes the construction of Translators and
- * values it will discard the value of the attributes field by setting it to null.
- *
- */
- public void processAttributes() {
- /* See the documentation for the attributes field for info on how it is structured */
- if (this.attributes != null && this.attributes.length > 0) {
-
- if (this.emfOwner != null && this.translator != null) {
- Translator attrTranslator = null;
- final int limit = this.attributes.length / 2;
- Object value = null;
- for (int i = 0; i < limit; i++) {
-
- /* Find the attribute translator by using the attribute name (attributes[i]) */
- attrTranslator = this.translator.findChild(this.attributes[i], this.emfOwner, this.versionID);
-
- if (attrTranslator != null) {
-
- /*
- * Convert the value of corresponding attribute value (attributes[i+limit])
- * to a meaningful value
- */
- value = attrTranslator.convertStringToValue(this.attributes[i + limit], (EObject) this.emfOwner);
- attrTranslator.setMOFValue((EObject) this.emfOwner, value);
- }
- }
-
- /* Forget the attributes so we do not process them again */
- this.attributes = null;
- }
- }
- }
-
- /**
- * Appends data to the buffer stored by this CENO. Text will be extracted from the data array
- * begining at positiong <i>start </i> and ending at position <i>start+length </i>.
- *
- * @param data
- * @param start
- * @param length
- */
- public void appendToBuffer(char[] data, int start, int length) {
-
- if (parent != null && this.isIgnorable()) {
- parent.appendToBuffer(data, start, length);
- return;
- }
-
- if (buffer == null) {
- this.buffer = new StringBuffer();
- }
-
- /*
- * acts as a more efficient form of "append". Using this method avoids the need to copy the
- * data into its own data structure (e.g. String) before being added to the buffer
- */
- this.buffer.insert(buffer.length(), data, start, length);
-
- }
-
- /**
- * Add the given CENO as a child of this CENO.
- *
- * @param record
- */
- public void appendToBuffer(CacheEventNode record) {
-
- this.addChild(record);
- }
-
- public String getBuffer() {
- if (this.buffer == null) {
- return null;
- }
- return this.buffer.toString();
- }
-
- public Notifier getEmfOwner() {
- return emfOwner;
- }
-
- public CacheEventNode getParent() {
- return parent;
- }
-
- private void setParent(CacheEventNode record) {
- this.parent = record;
- }
-
- public Translator getTranslator() {
- return this.translator;
- }
-
- public void setEmfOwner(Notifier notifier) {
-
- this.emfOwner = notifier;
- }
-
- public void setTranslator(Translator translator) {
- this.translator = translator;
- }
-
- public String getNodeName() {
- return nodeName;
- }
-
- public int getVersionID() {
-
- if (this.parent == null) {
- try {
- return ((TranslatorResource) this.getEmfOwner()).getVersionID();
-
- } catch (RuntimeException re) {
- }
- }
- return this.versionID;
- }
-
- public void setVersionID(int i) {
- versionID = i;
- }
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CacheEventPool.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CacheEventPool.java
deleted file mode 100644
index 55799e248..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CacheEventPool.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.resource;
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-import org.xml.sax.Attributes;
-
-/**
- * Provides an instance pool of reusable CacheEventNodes. The pool will default to 10 live
- * instances. When its available instances reach five times its initial capacity, it will shrink
- * itself down to the initial capacity.
- *
- * @author mdelder
- */
-public class CacheEventPool {
-
- public static final int DEFAULT_CAPACITY = 10;
- public static final int DEFAULT_CAPACITY_INCREMENT = 25;
-
- private int poolCapacity = DEFAULT_CAPACITY;
- private CacheEventStack availablePool = null;
- private Collection inusePool = null;
-
- public CacheEventPool() {
- this(DEFAULT_CAPACITY);
- }
-
- /**
- * Create a CacheEventPOol with the given initial capacity
- *
- * @param initialCapacity
- * The number of available instances to create.
- */
- public CacheEventPool(int initialCapacity) {
- poolCapacity = (initialCapacity > 0) ? initialCapacity : DEFAULT_CAPACITY;
- availablePool = new CacheEventStack();
- inusePool = new ArrayList(poolCapacity);
- }
-
- /**
- * Create a CacheEventNode (CENO) initialized to use the given resource as its EMF Owner.
- *
- * THIS METHOD SHOULD ONLY BE USED TO CREATE ROOT NODES.
- *
- * @param resource
- * the resource that will be populated
- * @return a CacheEventNode to serve as the root.
- */
- public CacheEventNode createCacheEventNode(TranslatorResource resource) {
- CacheEventNode adapter = fetchFreeNode();
- adapter.init(resource);
- return adapter;
- }
-
- /**
- * Create child CacheEventNodes (CENOs) that will branch from the given parent.
- *
- * @param parent
- * the containing CENO
- * @param nodeName
- * The value of the XML element node name
- * @param attributes
- * The attributes that were part of the given XML element
- * @return A CENO that has been properly initialized.
- */
- public CacheEventNode createCacheEventNode(CacheEventNode parent, String nodeName, Attributes attributes) {
- CacheEventNode adapter = fetchFreeNode();
- adapter.init(parent, nodeName, attributes);
- return adapter;
- }
-
- /**
- * Release the CacheEventNode CENO back to the pool of availabe instances. This method should
- * not be invoked directly. CENOs which are acquired from a given pool will automatically
- * release themselves when necessary.
- *
- * @param adapter
- */
- public void releaseNode(CacheEventNode adapter) {
- freeNode(adapter);
- }
-
- /**
- * freezePool() should be invoked to free any unused resources. After freezePool has been
- * invoked, warmPool() will need to be invoked before the pool can be used again.
- *
- */
- public void freezePool() {
- availablePool.clear();
- availablePool = null;
- }
-
- /**
- * warmPool() must be invoked to notify the pool it is about to be used. This should occur only
- * once per document rendering. Until the pool is in use, it contains no available
- * CacheEventNodes (CENOs) in order to limit the size of the in-memory footprint of the
- * EMF2SAXWriter.
- *
- */
- public void warmPool() {
- ensureMinimumCapacity();
- }
-
- private CacheEventNode fetchFreeNode() {
- CacheEventNode result = null;
-
- if (availablePool == null || availablePool.isEmpty())
- warmPool();
-
- result = availablePool.pop();
- inusePool.add(result);
-
- return result;
- }
-
- private void freeNode(CacheEventNode adapter) {
- if (inusePool.remove(adapter))
- availablePool.push(adapter);
- //else
- // throw new IllegalStateException("Adapter not contained in pool!");
- if (availablePool.size() > (5 * poolCapacity)) {
- availablePool.clear();
- ensureMinimumCapacity();
- }
- }
-
- private void ensureMinimumCapacity() {
- if (availablePool == null) {
- availablePool = new CacheEventStack();
- }
- if (availablePool.size() < poolCapacity) {
- final int minimumCapacity = poolCapacity - availablePool.size();
- for (int i = 0; i < minimumCapacity; i++)
- availablePool.push(new CacheEventNode(this));
- }
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CacheEventStack.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CacheEventStack.java
deleted file mode 100644
index 03f419858..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CacheEventStack.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Sep 24, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-import java.util.ArrayList;
-import java.util.EmptyStackException;
-
-/**
- * An unsynchronized implementation of a Stack (LIFO) data structure. No casting is required when
- * using this data structure.
- *
- * @author mdelder
- */
-public class CacheEventStack extends ArrayList {
-
- /**
- *
- * @return the top of the stack without removing it
- */
- public CacheEventNode peek() {
- if (size() == 0)
- throw new EmptyStackException();
-
- return (CacheEventNode) get(size() - 1);
- }
-
- /**
- *
- * @return the top of the stack and removing it
- */
- public CacheEventNode pop() {
- if (size() == 0)
- throw new EmptyStackException();
-
- return (CacheEventNode) remove(size() - 1);
- }
-
- /**
- *
- * @param adapter
- * A CENO to push onto the top of the stack
- */
- public void push(CacheEventNode adapter) {
- add(adapter);
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityPackageMappingRegistry.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityPackageMappingRegistry.java
deleted file mode 100644
index 25367c8a1..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityPackageMappingRegistry.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.resource;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * This class is used to register mappings for a package prefix to its current namespace URI. Also,
- * this registry is used to map the package
- */
-public class CompatibilityPackageMappingRegistry {
- public static CompatibilityPackageMappingRegistry INSTANCE = new CompatibilityPackageMappingRegistry();
- private Map prefixToPackageURIs = new HashMap();
- private Map packageURIsToPrefixes = new HashMap();
-
- /**
- *
- */
- private CompatibilityPackageMappingRegistry() {
- super();
- }
-
- /**
- * @return
- */
- public Map getPackageURIsToPrefixes() {
- return packageURIsToPrefixes;
- }
-
- /**
- * @return
- */
- public Map getPrefixToPackageURIs() {
- return prefixToPackageURIs;
- }
-
- public void registerPrefixToPackageURI(String prefix, String uri) {
- if (prefix != null && uri != null) {
- prefixToPackageURIs.put(prefix, uri);
- packageURIsToPrefixes.put(uri, prefix);
- }
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityResourceFactory.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityResourceFactory.java
deleted file mode 100644
index f824de384..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityResourceFactory.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Apr 23, 2003
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-import java.util.Map;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
-
-/**
- * @author DABERG
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class CompatibilityResourceFactory extends XMIResourceFactoryImpl {
- /**
- *
- */
- public CompatibilityResourceFactory() {
- super();
- }
-
- protected Map prefixToPackageURIs;
-
- protected Map packageURIsToPrefixes;
-
- public Map getPrefixToPackageURI() {
- return CompatibilityPackageMappingRegistry.INSTANCE.getPrefixToPackageURIs();
- }
-
- public Map getPackageURIsToPrefixes() {
- return CompatibilityPackageMappingRegistry.INSTANCE.getPackageURIsToPrefixes();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl#createResource(org.eclipse.emf.common.util.URI)
- */
- public Resource createResource(URI uri) {
- return new CompatibilityXMIResourceImpl(uri);
- }
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilitySAXXMIHandler.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilitySAXXMIHandler.java
deleted file mode 100644
index ee6ff3e9e..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilitySAXXMIHandler.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Apr 30, 2003
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-import java.util.Map;
-
-import org.eclipse.emf.ecore.xmi.XMLHelper;
-import org.eclipse.emf.ecore.xmi.XMLResource;
-import org.eclipse.emf.ecore.xmi.impl.SAXXMIHandler;
-
-/**
- * @author DABERG
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class CompatibilitySAXXMIHandler extends SAXXMIHandler {
- protected final static String NULL_ATTRIB = XMLResource.XSI_NS + ":null"; //$NON-NLS-1$
-
- /**
- * @param xmiResource
- * @param helper
- * @param options
- */
- public CompatibilitySAXXMIHandler(XMLResource xmiResource, XMLHelper helper, Map options) {
- super(xmiResource, helper, options);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.ecore.xmi.impl.XMLHandler#isNull()
- */
- protected boolean isNull() {
- boolean isnull = super.isNull();
- if (!isnull)
- isnull = attribs.getValue(NULL_ATTRIB) != null;
- return isnull;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityURIConverter.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityURIConverter.java
deleted file mode 100644
index ba135f505..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityURIConverter.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.resource;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.URIConverter;
-
-public interface CompatibilityURIConverter extends URIConverter {
- URI deNormalize(URI uri);
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityXMILoadImpl.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityXMILoadImpl.java
deleted file mode 100644
index 5f17a46ed..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityXMILoadImpl.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Apr 30, 2003
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-import org.eclipse.emf.ecore.xmi.XMLHelper;
-import org.eclipse.emf.ecore.xmi.impl.SAXWrapper;
-import org.eclipse.emf.ecore.xmi.impl.XMILoadImpl;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * @author DABERG
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class CompatibilityXMILoadImpl extends XMILoadImpl {
-
- /**
- * @param helper
- */
- public CompatibilityXMILoadImpl(XMLHelper helper) {
- super(helper);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl#makeDefaultHandler()
- */
- protected DefaultHandler makeDefaultHandler() {
- return new SAXWrapper(new CompatibilitySAXXMIHandler(resource, helper, options));
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityXMIResource.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityXMIResource.java
deleted file mode 100644
index a954f5fd2..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityXMIResource.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.resource;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.xmi.XMIResource;
-
-public interface CompatibilityXMIResource extends XMIResource {
- int FORMAT_EMF1 = 0;
- /**
- * format for MOF5 compatibility; note that this can NOT be used with resources usings the
- * "platform:/plugin" protocol"
- */
- int FORMAT_MOF5 = 1;
-
- void addOriginalPackageURI(String packageUri, String originalUri);
-
- int getFormat();
-
- /**
- * Set the serialization format. By default it is FORMAT_EMF1.
- *
- * @see CompatibilityXMIResource#FORMAT_EMF1
- * @see CompatibilityXMIResource#FORMAT_MOF5
- */
- void setFormat(int format);
-
- boolean usesDefaultFormat();
-
- /**
- * @param rootObject
- */
- void removePreservingIds(EObject rootObject);
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityXMIResourceImpl.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityXMIResourceImpl.java
deleted file mode 100644
index 2419be716..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityXMIResourceImpl.java
+++ /dev/null
@@ -1,338 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.resource;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.HashMap;
-import java.util.Map;
-
-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.InternalEObject;
-import org.eclipse.emf.ecore.xmi.XMLHelper;
-import org.eclipse.emf.ecore.xmi.XMLLoad;
-import org.eclipse.emf.ecore.xmi.XMLSave;
-import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl;
-import org.eclipse.wst.common.internal.emf.utilities.IDUtil;
-import org.eclipse.wst.common.internal.emf.utilities.ResourceIsLoadingAdapter;
-import org.eclipse.wst.common.internal.emf.utilities.ResourceIsLoadingAdapterFactory;
-
-
-public class CompatibilityXMIResourceImpl extends XMIResourceImpl implements CompatibilityXMIResource {
- protected static final String DEFAULT_ENCODING = "UTF-8"; //$NON-NLS-1$
- protected int format = FORMAT_EMF1;
- protected Map originalPackageURIs = new HashMap();
- private boolean preserveIDs = false;
-
- private static final String PLATFORM_PROTOCOL = "platform"; //$NON-NLS-1$
- private static final String PLATFORM_PLUGIN = "plugin"; //$NON-NLS-1$
-
- /**
- * Constructor for MappableXMIResourceImpl.
- */
- public CompatibilityXMIResourceImpl() {
- super();
- initDefaultSaveOptions();
- }
-
- public CompatibilityXMIResourceImpl(URI uri) {
- super(uri);
- initDefaultSaveOptions();
- }
-
- /**
- * @see org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl#createXMLHelper()
- */
- protected final XMLHelper createXMLHelper() {
- MappedXMIHelper helper = doCreateXMLHelper();
- helper.setPackageURIsToPrefixes(getPackageURIsToPrefixes());
- return helper;
- }
-
- protected MappedXMIHelper doCreateXMLHelper() {
- return new MappedXMIHelper(this, getPrefixToPackageURIs());
- }
-
- /**
- * Subclasses should not need to override this method.
- *
- * @see CompatibilityPackageMappingRegistry#getPrefixToPackageURIs()
- */
- protected Map getPrefixToPackageURIs() {
- return CompatibilityPackageMappingRegistry.INSTANCE.getPrefixToPackageURIs();
- }
-
- /**
- * Subclasses should not need to override this method.
- *
- * @see CompatibilityPackageMappingRegistry#getPrefixToPackageURIs()
- */
- protected Map getPackageURIsToPrefixes() {
- return CompatibilityPackageMappingRegistry.INSTANCE.getPackageURIsToPrefixes();
- }
-
- public void addOriginalPackageURI(String packageUri, String originalUri) {
- originalPackageURIs.put(packageUri, originalUri);
- }
-
- public int getFormat() {
- return format;
- }
-
- public void setFormat(int format) {
- if (!isPlatformPluginResourceURI())
- this.format = format;
- }
-
- private boolean isPlatformPluginResourceURI() {
- URI aURI = getURI();
-
- return aURI != null && PLATFORM_PROTOCOL.equals(uri.scheme()) && PLATFORM_PLUGIN.equals(uri.segment(0));
- }
-
- /**
- * @see org.eclipse.emf.ecore.resource.Resource#getURIFragment(EObject)
- */
- public String getURIFragment(EObject eObject) {
- if (usesDefaultFormat())
- return super.getURIFragment(eObject);
- return IDUtil.getOrAssignID(eObject, this);
- }
-
- public boolean usesDefaultFormat() {
- return format == CompatibilityXMIResource.FORMAT_EMF1;
- }
-
- /**
- * @see org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl#createXMLSave()
- */
- protected XMLSave createXMLSave() {
- if (usesDefaultFormat())
- return super.createXMLSave();
- return new CompatibilityXMISaveImpl(createXMLHelper());
- }
-
- /**
- * @see org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl#doSave(OutputStream, Map)
- */
- public void doSave(OutputStream outputStream, Map options) throws IOException {
- super.doSave(outputStream, options);
- }
-
- /**
- * Method initDefaultOptions.
- */
- protected void initDefaultSaveOptions() {
- if (defaultSaveOptions == null) {
- getDefaultSaveOptions();
- }
- }
-
- /**
- * @see org.eclipse.emf.ecore.resource.impl.ResourceImpl#getEObjectByID(String)
- */
- protected EObject getEObjectByID(String id) {
- if (idToEObjectMap != null) {
- EObject eObject = (EObject) idToEObjectMap.get(id);
- if (eObject != null) {
- return eObject;
- }
- }
- return null;
- }
-
- /**
- * Called when the object is unloaded. This implementation
- * {@link InternalEObject#eSetProxyURI sets}the object to be a proxy and clears the
- * {@link #eAdapters adapters}.
- */
- protected void unloaded(InternalEObject internalEObject) {
- //overridden from the super class; call super.getURIFragment instead of the implementation
- //at this level, to avoid ID generation during unload
- //internalEObject.eSetProxyURI(uri.appendFragment(getURIFragment(internalEObject)));
- internalEObject.eSetProxyURI(uri.appendFragment(super.getURIFragment(internalEObject)));
- internalEObject.eAdapters().clear();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl#doLoad(java.io.InputStream,
- * java.util.Map)
- */
- public final void doLoad(InputStream inputStream, Map options) throws IOException {
- basicDoLoad(inputStream, options);
- }
-
- /**
- * @deprecated Use {@link #doLoad(InputStream, Map)} instead.
- */
- protected void basicDoLoad(InputStream inputStream, Map options) throws IOException {
- super.doLoad(inputStream, options);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl#init()
- */
- protected void init() {
- super.init();
- setEncoding(DEFAULT_ENCODING);
- }
-
- protected XMLLoad createXMLLoad() {
- return new CompatibilityXMILoadImpl(createXMLHelper());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.internal.emf.resource.CompatibilityXMIResource#removePreservingIds(org.eclipse.emf.ecore.EObject)
- */
- public void removePreservingIds(EObject rootObject) {
- setPreserveIDs(true);
- getContents().remove(rootObject);
- }
-
- /**
- * @return Returns the preserveIDs.
- */
- public boolean isPreserveIDs() {
- return preserveIDs;
- }
-
- /**
- * @param preserveIDs
- * The preserveIDs to set.
- */
- public void setPreserveIDs(boolean preserveIDs) {
- this.preserveIDs = preserveIDs;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl#detachedHelper(org.eclipse.emf.ecore.EObject)
- */
- protected void detachedHelper(EObject eObject) {
- if (modificationTrackingAdapter != null) {
- eObject.eAdapters().remove(modificationTrackingAdapter);
- }
-
- if (useUUIDs()) {
- DETACHED_EOBJECT_TO_ID_MAP.put(eObject, getID(eObject));
- }
-
- if (!isPreserveIDs() && idToEObjectMap != null && eObjectToIDMap != null) {
- idToEObjectMap.remove(eObjectToIDMap.remove(eObject));
- }
- }
-
- public void load(Map options) throws IOException {
-
- ResourceIsLoadingAdapter adapter = null;
- if (isLoaded) {
- adapter = ResourceIsLoadingAdapter.findAdapter(this);
- if (adapter != null)
- adapter.waitForResourceToLoad();
- return;
- }
- synchronized (this) {
- adapter = ResourceIsLoadingAdapter.findAdapter(this);
- if (adapter == null && !isLoaded)
- addSynchronizationLoadingAdapter();
- }
- if(adapter != null)
- adapter.waitForResourceToLoad();
- else {
- try {
- super.load(options);
- } catch(IOException ioe) {
- removeLoadingSynchronizationAdapter();
- throw ioe;
- } catch(RuntimeException re) {
- removeLoadingSynchronizationAdapter();
- throw re;
- } catch(Error e) {
- removeLoadingSynchronizationAdapter();
- throw e;
- }
- }
- }
-
- /**
- *
- */
- private void addSynchronizationLoadingAdapter() {
- if (ResourceIsLoadingAdapter.findAdapter(this) == null)
- eAdapters().add(ResourceIsLoadingAdapterFactory.INSTANCE.createResourceIsLoadingAdapter());
- }
-
- /**
- *
- */
- private void removeLoadingSynchronizationAdapter() {
- ResourceIsLoadingAdapter adapter = ResourceIsLoadingAdapter.findAdapter(this);
- if (adapter != null) {
- adapter.forceRelease();
- eAdapters().remove(adapter);
- }
- }
-
- /**
- * Case 1: LOAD RESOURCE FROM DISK this.isLoaded == false AND isLoaded ==
- * true (which means we entered the load() method, but have not completed
- * the load), and we're loading from a resource on disk, then we add the
- * adapter Case 2: RESOURCE CREATION (NOT A LOAD) Case 4: RESOURCE CREATION,
- * UNLOADED, NEW CONTENTS (NOT A LOAD) Resource is created but not from a
- * resource on disk, so contents is null AND not empty, so no adapter: THIS
- * IS NOT A LOAD Case 3: RESOURCE HAS BEEN UNLOADED, BEING RELOADED FROM
- * DISK Contents is NOT null, but it is Empty and the resource is being
- * loaded from disk. We must add the adapter.
- *
- */
- public boolean isResourceBeingLoaded(boolean isLoaded) {
- return (!this.isLoaded && isLoaded) && (contents == null || contents.isEmpty());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.ecore.resource.Resource#getContents()
- */
- public EList getContents() {
- waitForResourceToLoadIfNecessary();
- return super.getContents();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.ecore.resource.impl.ResourceImpl#isLoaded()
- */
- public boolean isLoaded() {
- waitForResourceToLoadIfNecessary();
- return super.isLoaded();
- }
-
- /**
- *
- */
- protected final void waitForResourceToLoadIfNecessary() {
- ResourceIsLoadingAdapter loadingAdapter = ResourceIsLoadingAdapter.findAdapter(this);
- if (loadingAdapter != null) loadingAdapter.waitForResourceToLoad();
- }
-
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityXMISaveImpl.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityXMISaveImpl.java
deleted file mode 100644
index c1a7bf291..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/CompatibilityXMISaveImpl.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.resource;
-
-import java.util.Map;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.ecore.xmi.XMIResource;
-import org.eclipse.emf.ecore.xmi.XMLHelper;
-import org.eclipse.emf.ecore.xmi.XMLResource;
-import org.eclipse.emf.ecore.xmi.impl.XMISaveImpl;
-
-public class CompatibilityXMISaveImpl extends XMISaveImpl {
-
- /**
- * Constructor for CompatibilityXMISaveImpl.
- *
- * @param helper
- */
- public CompatibilityXMISaveImpl(XMLHelper helper) {
- super(helper);
- }
-
- /**
- * Constructor for CompatibilityXMISaveImpl.
- *
- * @param options
- * @param helper
- * @param encoding
- */
- public CompatibilityXMISaveImpl(Map options, XMLHelper helper, String encoding) {
- super(options, helper, encoding);
- }
-
- /**
- * @see org.eclipse.emf.ecore.xmi.impl.XMISaveImpl#init(XMLResource, Map)
- */
- protected void init(XMLResource resource, Map options) {
- super.init(resource, options);
- xmiType = true;
- }
-
- /**
- * @see org.eclipse.emf.ecore.xmi.impl.XMISaveImpl#addNamespaceDeclarations()
- */
- public void addNamespaceDeclarations() {
- doc.addAttribute(XMI_VER_NS, XMIResource.VERSION_VALUE);
- doc.addAttribute(XMI_XMLNS, XMIResource.XMI_URI);
- EPackage[] packages = helper.packages();
- StringBuffer xsiSchemaLocation = null;
- if (declareSchemaLocation) {
- for (int i = 0; i < packages.length; i++) {
- EPackage ePackage = packages[i];
-
- EObject root = EcoreUtil.getRootContainer(ePackage);
- if (root instanceof EPackage) {
- EPackage rootEPackage = (EPackage) root;
- Resource resource = rootEPackage.eResource();
- if (resource != null) {
- URI uri = resource.getURI();
- String rootNsURI = rootEPackage.getNsURI();
- if (uri == null ? rootNsURI != null : !uri.toString().equals(rootNsURI)) {
- declareXSI = true;
- if (xsiSchemaLocation == null) {
- xsiSchemaLocation = new StringBuffer();
- } else {
- xsiSchemaLocation.append(' ');
- }
- xsiSchemaLocation.append(rootNsURI);
- xsiSchemaLocation.append(' ');
- xsiSchemaLocation.append(helper.getHREF(rootEPackage));
- }
- }
- }
- }
- }
-
- if (declareXSI) {
- doc.addAttribute(XSI_XMLNS, XMLResource.XSI_URI);
- }
-
- for (int i = 0; i < packages.length; i++) {
- EPackage ePackage = packages[i];
- //Modified from superclass - dispatch back to helper for compatibility
- //String nsURI = ePackage.getNsURI();
- //String nsPrefix = ePackage.getNsPrefix();
- String[] nsInfo = ((MappedXMIHelper) helper).getNSInfo(ePackage);
- doc.addAttributeNS(XMLResource.XML_NS, nsInfo[0], nsInfo[1]);
- }
-
- if (xsiSchemaLocation != null) {
- doc.addAttribute(XSI_SCHEMA_LOCATION, xsiSchemaLocation.toString());
- }
- }
-
- protected void saveHref(EObject remote, EStructuralFeature f) {
- String name = helper.getQName(f);
- String href = helper.getHREF(remote);
- if (href != null) {
- doc.startElement(name);
- EClass eClass = remote.eClass();
-
- EClass expectedType = (EClass) f.getEType();
- //Changed next line to always write type if expectedType
- //is different from eClass
- if (eClass != expectedType) {
- saveTypeAttribute(eClass);
- }
-
- doc.addAttribute(XMLResource.HREF, href);
- doc.endEmptyElement();
- }
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ConstantAttributeTranslator.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ConstantAttributeTranslator.java
deleted file mode 100644
index 356f102d4..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ConstantAttributeTranslator.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Apr 15, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * @author schacher
- */
-public class ConstantAttributeTranslator extends Translator {
-
- protected String attributeValue;
-
- /**
- * @param domNameAndPath
- * @param eClass
- */
- public ConstantAttributeTranslator(String domNameAndPath, String attributeValue) {
- super(domNameAndPath, null, DOM_ATTRIBUTE);
- this.attributeValue = attributeValue;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.Translator#getMOFValue(org.eclipse.emf.ecore.EObject)
- */
- public Object getMOFValue(EObject mofObject) {
- return attributeValue;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.Translator#isSetMOFValue(org.eclipse.emf.ecore.EObject)
- */
- public boolean isSetMOFValue(EObject emfObject) {
- return true;
- }
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/DefaultTranslatorFactory.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/DefaultTranslatorFactory.java
deleted file mode 100644
index 7518472fc..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/DefaultTranslatorFactory.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Aug 20, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.wst.common.internal.emf.utilities.Namespace;
-import org.eclipse.wst.common.internal.emf.utilities.NamespaceAdapter;
-
-
-/**
- * @author schacher
- */
-public class DefaultTranslatorFactory implements VariableTranslatorFactory {
-
- public static final String XMLNS = "xmlns:"; //$NON-NLS-1$
- public static final DefaultTranslatorFactory INSTANCE = new DefaultTranslatorFactory();
-
- public DefaultTranslatorFactory() {
- super();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.VariableTranslatorFactory#accepts(java.lang.String)
- */
- public boolean accepts(String domName) {
- return domName != null && domName.startsWith(XMLNS);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.VariableTranslatorFactory#accepts(org.eclipse.emf.common.notify.Notification)
- */
- public boolean accepts(Notification notif) {
- return notif.getFeature() == NamespaceAdapter.NOTIFICATION_FEATURE;
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.VariableTranslatorFactory#create(java.lang.String)
- */
- public Translator create(String domName) {
- return new NamespaceTranslator(domName);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.VariableTranslatorFactory#create(org.eclipse.emf.ecore.EObject)
- */
- public List create(Notifier target) {
- if (!(target instanceof EObject))
- return null;
- List namespaces = NamespaceAdapter.getNamespaces((EObject) target);
- if (namespaces == null || namespaces.isEmpty())
- return null;
- List result = new ArrayList(namespaces.size());
- for (int i = 0; i < namespaces.size(); i++) {
- result.add(create((Namespace) namespaces.get(i)));
- }
- return result;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.VariableTranslatorFactory#create(org.eclipse.emf.common.notify.Notification)
- */
- public Translator create(Notification notif) {
- Namespace ns = (Namespace) notif.getNewValue();
- return create(ns);
- }
-
- private Translator create(Namespace ns) {
- return new NamespaceTranslator(XMLNS + ns.getPrefix());
- }
-
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/DependencyTranslator.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/DependencyTranslator.java
deleted file mode 100644
index c7d1c6257..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/DependencyTranslator.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Mar 25, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-/**
- * @author schacher
- */
-public class DependencyTranslator extends Translator {
-
- /**
- * @param domNameAndPath
- * @param aFeature
- */
- public DependencyTranslator(String domNameAndPath, EStructuralFeature aFeature, EStructuralFeature aDependentFeature) {
- super(domNameAndPath, aFeature);
- dependencyFeature = aDependentFeature;
- }
-
- public EObject getChild(EObject parent) {
- EObject child = basicGetDependencyObject(parent);
- if (child == null)
- return createChild(parent);
- return child;
- }
-
-
- protected EObject createChild(EObject parent) {
- EObject child = createEMFObject(dependencyFeature);
- parent.eSet(dependencyFeature, child);
- return child;
- }
-
- public List getMOFChildren(EObject mofObject) {
- //return super.getMOFChildren(getChild(mofObject));
- return super.getMOFChildren(mofObject);
- }
-
- public Object getMOFValue(EObject mofObject) {
- return super.getMOFValue(getChild(mofObject));
- }
-
- public void setMOFValue(EObject emfObject, Object value) {
- //super.setMOFValue(getChild(emfObject), value);
- super.setMOFValue(getChild(emfObject), value, -1);
- }
-
- public void setMOFValue(Notifier owner, Object value, int newIndex) {
- super.setMOFValue(getChild((EObject) owner), value, newIndex);
- }
-
- public void removeMOFValue(Notifier owner, Object value) {
- super.removeMOFValue(getChild((EObject) owner), value);
- }
-
- public boolean isSetMOFValue(EObject emfObject) {
- return super.isSetMOFValue(getChild(emfObject));
- }
-
- public void unSetMOFValue(EObject emfObject) {
- super.unSetMOFValue(getChild(emfObject));
- }
-
-
- public boolean isDependencyChild() {
- return true;
- }
-
- public boolean featureExists(EObject emfObject) {
- return super.featureExists(getChild(emfObject));
- }
-
- public void clearList(EObject mofObject) {
- super.clearList(getChild(mofObject));
- }
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMAdapter.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMAdapter.java
deleted file mode 100644
index 9782ea143..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMAdapter.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.resource;
-
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.ecore.EObject;
-import org.w3c.dom.Node;
-
-public interface EMF2DOMAdapter extends Adapter {
-
-
- Class ADAPTER_CLASS = EMF2DOMAdapter.class;
-
- /**
- * Return the DOM node that the target of this adapter maps to. If the target MOF object maps to
- * more than one DOM node, this node is the top-most node.
- */
- Node getNode();
-
- void setNode(Node aNode);
-
- /**
- * Set to false and notification of changes from both the DOM node and the MOF object will be
- * ignored.
- */
- boolean isNotificationEnabled();
-
- /**
- * Set to false and notification of changes from both the DOM node and the MOF object will be
- * ignored.
- */
- void setNotificationEnabled(boolean isEnabled);
-
- /**
- * Updates the DOM tree for this adapter from the current values of the MOF Object. This method
- * updates ALL the DOM nodes from all the MOF attributes.
- */
- void updateDOM();
-
- /**
- * Updates the MOF Object from the DOM tree. All the children of the DOM tree are updated into
- * the MOF object.
- */
- void updateMOF();
-
- public void updateDOMFeature(Translator map, Node node, EObject mofObject);
-
- public void updateMOFFeature(Translator map, Node node, EObject mofObject);
-
- EObject getEObject();
-
- /**
- * Return true if MOF object is a proxy.
- */
- boolean isMOFProxy();
-
- /**
- * Remove the DOM adapters from the node AND all its child nodes, recursively.
- */
- void removeAdapters(Node node);
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMAdapterImpl.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMAdapterImpl.java
deleted file mode 100644
index 5107fe756..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMAdapterImpl.java
+++ /dev/null
@@ -1,1751 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.resource;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.common.notify.impl.AdapterImpl;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.wst.common.internal.emf.utilities.Assert;
-import org.eclipse.wst.common.internal.emf.utilities.DOMUtilities;
-import org.eclipse.wst.common.internal.emf.utilities.EtoolsCopySession;
-import org.eclipse.wst.common.internal.emf.utilities.ExtendedEcoreUtil;
-import org.eclipse.wst.common.internal.emf.utilities.FeatureValueConversionException;
-import org.eclipse.wst.common.internal.emf.utilities.Revisit;
-import org.eclipse.wst.common.internal.emf.utilities.StringUtil;
-import org.eclipse.wst.common.internal.emf.utilities.TranslatorService;
-import org.eclipse.wst.common.internal.emf.utilities.WFTUtilsResourceHandler;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Text;
-
-
-public class EMF2DOMAdapterImpl extends AdapterImpl implements EMF2DOMAdapter {
-
- final protected static boolean fDebug = false;
-
- protected boolean fNotificationEnabled = true;
-
- protected Node fNode;
-
- protected Translator fTranslator;
-
- protected EMF2DOMRenderer fRenderer;
-
- protected Translator[] childTranslators;
-
- protected boolean isRoot = false;
-
- private class DependencyAdapter extends org.eclipse.emf.common.notify.impl.AdapterImpl {
-
- static final String KEY = "EMF2DOMDependencyAdapter"; //$NON-NLS-1$
-
- public void notifyChanged(Notification msg) {
- EMF2DOMAdapterImpl.this.notifyChanged(msg);
- }
-
- /**
- * @see org.eclipse.emf.common.notify.impl.AdapterImpl#isAdapterForType(Object)
- */
- public boolean isAdapterForType(Object type) {
- return KEY.equals(type);
- }
- }
-
- /**
- * Constructor for root adapters.
- */
- public EMF2DOMAdapterImpl(TranslatorResource resource, Document document, EMF2DOMRenderer renderer, Translator translator) {
- this((Notifier) resource, (Node) document, renderer, translator);
- isRoot = true;
- }
-
- /**
- * Construct an Adapter given an EObject and a node
- */
- public EMF2DOMAdapterImpl(Notifier object, Node node, EMF2DOMRenderer renderer, Translator translator) {
- super();
- setTarget(object);
- fNode = node;
- fRenderer = renderer;
- fTranslator = translator;
- initChildTranslators();
- addEMFAdapter();
- addDOMAdapter();
- addDependencyAdapterIfNecessary();
- }
-
- /**
- * Construct an adapter from a DOM Node. The EObject will be created
- */
- public EMF2DOMAdapterImpl(Node node, EMF2DOMRenderer renderer, Translator translator) {
- fNode = node;
- fRenderer = renderer;
- fTranslator = translator;
- setTargetFromNode();
- initChildTranslators();
- addEMFAdapter();
- addDOMAdapter();
- addDependencyAdapterIfNecessary();
-
- }
-
- protected void addDependencyAdapterIfNecessary() {
- if (!fTranslator.isDependencyParent())
- return;
- EObject child = fTranslator.basicGetDependencyObject(getEObject());
- if (child != null)
- addDependencyAdapter(child);
- }
-
- protected void initChildTranslators() {
- List children = new ArrayList();
- // Get extended child translators
- Translator[] extendedChildren = TranslatorService.getInstance().getTranslators();
- for (int i = 0; i < extendedChildren.length; i++) {
- if (extendedChildren[i] != null)
- children.add(extendedChildren[i]);
- }
- children.addAll(Arrays.asList(fTranslator.getChildren(getTarget(), fRenderer.getVersionID())));
-
- VariableTranslatorFactory factory = fTranslator.getVariableTranslatorFactory();
- if (factory != null) {
- String domName = null;
- NamedNodeMap map = fNode.getAttributes();
-
- if (map != null) {
- int length = map.getLength();
- for (int i = 0; i < length; i++) {
- Node attrNode = map.item(i);
- domName = attrNode.getNodeName();
- //Handle variable translators
- Translator t = fTranslator.findChild(domName, getTarget(), fRenderer.getVersionID());
- if (t != null && !children.contains(t))
- children.add(t);
- }
- }
- List childrenFromEMF = factory.create(getTarget());
- if (childrenFromEMF != null)
- children.addAll(childrenFromEMF);
- }
-
- childTranslators = (Translator[]) children.toArray(new Translator[children.size()]);
- }
-
- /**
- * Set to false and notification of changes from both the DOM node and the MOF object will be
- * ignored.
- */
- public boolean isNotificationEnabled() {
- return fNotificationEnabled;
- }
-
- /**
- * Set to false and notification of changes from both the DOM node and the MOF object will be
- * ignored.
- */
- public void setNotificationEnabled(boolean isEnabled) {
- fNotificationEnabled = isEnabled;
- }
-
- public boolean isAdapterForType(Object type) {
- return EMF2DOMAdapter.ADAPTER_CLASS == type;
- }
-
- protected void addEMFAdapter() {
- target.eAdapters().add(this);
- }
-
- public String toString() {
- StringBuffer sb = new StringBuffer();
- sb.append(shortClassName(this));
- sb.append('(');
- sb.append(getNode().getNodeName());
- sb.append(',');
- sb.append(shortClassName(getTarget()));
- sb.append(')');
- return sb.toString();
- }
-
- protected String shortClassName(Object o) {
- String cn = o.getClass().getName();
- int i = cn.lastIndexOf('.');
- return cn.substring(i + 1, cn.length());
- }
-
- /*
- * Prints out a MOF notification for debugging
- */
- protected void debugMOFNotify(Notification msg) {
- if (fDebug) {
- String notifType = ""; //$NON-NLS-1$
- switch (msg.getEventType()) {
- case Notification.ADD :
- notifType = "ADD"; //$NON-NLS-1$
- break;
- case Notification.REMOVE :
- notifType = "REMOVE"; //$NON-NLS-1$
- break;
- case Notification.ADD_MANY :
- notifType = "ADD_MANY"; //$NON-NLS-1$
- break;
- case Notification.REMOVE_MANY :
- notifType = "REMOVE_MANY"; //$NON-NLS-1$
- break;
- case Notification.SET : {
- if (msg.getPosition() == Notification.NO_INDEX)
- notifType = "REPLACE"; //$NON-NLS-1$
- else
- notifType = "SET"; //$NON-NLS-1$
- break;
- }
- case Notification.UNSET :
- notifType = "UNSET"; //$NON-NLS-1$
- break;
- }
-
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("MOF Change: " + notifType); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tnotifier : " + msg.getNotifier()); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tchangedFeature: " + msg.getFeature()); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\toldValue : " + msg.getOldValue()); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tnewValue : " + msg.getNewValue()); //$NON-NLS-1$
- }
- }
-
- /*
- * Override this method to create the feature maps for the adapter.
- */
- protected Translator[] getChildTranslators() {
- return childTranslators;
- }
-
- protected Translator findTranslator(Notification not) {
- if (not.getFeature() == null)
- return null;
- Translator[] maps = getChildTranslators();
- for (int i = 0; i < maps.length; i++) {
- if (maps[i].isMapFor(not.getFeature(), not.getOldValue(), not.getNewValue()))
- return maps[i];
- }
- return null;
- }
-
- /**
- * Update all the children of the target MOF object in the relationship described by
- *
- * @map.
- *
- * @param map
- * com.ibm.etools.mof2dom.AttributeTranslator Describes the mapping from the MOF
- * attribute name to the DOM node name
- */
- protected void primUpdateDOMMultiFeature(Translator map, Node node, List mofChildren, List domChildren, Notifier owner) {
-
- //Used for inserting primitives
- List inorderDOMChildren = null;
- if (!map.isObjectMap() || map.isManagedByParent()) {
- inorderDOMChildren = new ArrayList();
- inorderDOMChildren.addAll(domChildren);
- }
- Node parent = findDOMPath(node, map, false);
-
- // Go though the MOF children checking to see if the corresponding
- // MOF Adapter children exists. If not, create the adapter.
- // Also handles reordering children that have moved.
- int i = 0;
- for (; i < mofChildren.size(); i++) {
- Object child = mofChildren.get(i);
- EObject mofChild = null;
-
- EMF2DOMAdapter adapter = null;
-
- // Check to see if the child is a MOF Object.
- if (!map.isManagedByParent() && child instanceof EObject) {
- mofChild = (EObject) mofChildren.get(i);
- adapter = getExistingAdapter(mofChild);
- }
-
- if (adapter != null && i < domChildren.size() && domChildren.get(i) == adapter.getNode())
- continue;
- if (adapter != null) {
- if (domChildren.isEmpty())
- continue;
- // A node has been reordered in the list
- Node reorderNode = adapter.getNode();
- Node insertBeforeNode = (Node) domChildren.get(i);
- domChildren.remove(reorderNode);
- domChildren.add(i, reorderNode);
- if (reorderNode != insertBeforeNode) {
- reorderDOMChild(parent, reorderNode, insertBeforeNode, map);
- }
- } else {
- // A new node has been added, create it
- parent = createDOMPath(node, map);
- if (mofChild != null) {
- adapter = createAdapter(mofChild, map);
- Node newNode = adapter.getNode();
- Node insertBeforeNode = findInsertBeforeNode(parent, map, mofChildren, i, domChildren);
- DOMUtilities.insertBeforeNodeAndWhitespace(parent, newNode, insertBeforeNode);
- domChildren.add(i, newNode);
- boolean notificationFlag = adapter.isNotificationEnabled();
- adapter.setNotificationEnabled(false);
- try {
- indent(newNode, map);
- } finally {
- adapter.setNotificationEnabled(notificationFlag);
- }
- adapter.updateDOM();
- } else {
- // The mof feature is a collection of primitives.
- // create a new dom node and listen to it.
- Element newNode = createNewNode(null, map);
- Node insertBeforeNode = findInsertBeforeNode(parent, map, mofChildren, i, inorderDOMChildren);
- DOMUtilities.insertBeforeNodeAndWhitespace(parent, newNode, insertBeforeNode);
- indent(newNode, map);
- addDOMAdapter(newNode); // Hook up listeners
- domChildren.add(i, newNode);
- inorderDOMChildren.add(newNode);
- Text newText = parent.getOwnerDocument().createTextNode(map.convertValueToString(child, (EObject) owner));
- DOMUtilities.insertBeforeNode(newNode, newText, null);
- }
- }
- }
-
- // Remove any remaining adapters.
- for (; i < domChildren.size(); i++) {
- removeDOMChild(parent, (Element) domChildren.get(i));
- }
-
- // If there are no MOF children, remove any unnecessary DOM node paths
- if (mofChildren.size() == 0 && map.hasDOMPath()) {
- if (map.shouldRenderEmptyDOMPath((EObject) owner))
- createDOMPath(node, map);
- else
- removeDOMPath(node, map);
- }
-
- }
-
- /**
- * Update all the children of the target MOF object in the relationship described by
- *
- * @map.
- *
- * @param map
- * com.ibm.etools.mof2dom.AttributeTranslator Describes the mapping from the MOF
- * attribute name to the DOM node name
- */
- protected void primUpdateMOFMultiFeature(Translator map, Node node, List mofChildren, List domChilren) {
-
- Hashtable nodeToAdapter = new Hashtable();
-
- for (int i = 0; i < mofChildren.size(); i++) {
- EMF2DOMAdapter adapter = getExistingAdapter((EObject) mofChildren.get(i));
- if (adapter != null)
- nodeToAdapter.put(adapter.getNode(), adapter);
- }
-
- // Go though the DOM children checking to see if the corresponding
- // MOF Adapter children exists. If not, create the adapter.
- // Also handles reordering children that have moved.
- int i = 0;
- int mofIndex = 0;
- List adaptersToUpdate = new ArrayList();
- for (; i < domChilren.size(); i++) {
- Element childNode = (Element) domChilren.get(i);
- EMF2DOMAdapter adapter = i < mofChildren.size() ? getExistingAdapter((EObject) mofChildren.get(i)) : null;
- if (adapter != null && !adapter.isMOFProxy() && adapter.getNode() == childNode) {
- // Because the adapter is processing STRUCTURE_CHANGED from the
- // DOM, we
- // must update all the way down the tree since anything under
- // the notifying
- // DOM node could have changed.
- adapter.updateMOF();
- mofIndex++;
- continue;
- }
-
- adapter = (EMF2DOMAdapter) nodeToAdapter.get(childNode);
- if (adapter != null) {
- reorderIfNecessary((EList) mofChildren, adapter.getEObject(), mofIndex);
- mofIndex++;
- } else {
- adapter = createAdapter(childNode, map);
- if (adapter != null) {
- try {
- //We don't want to push anything back to the child dom
- adapter.setNotificationEnabled(false);
- map.setMOFValue(getTarget(), adapter.getTarget(), mofIndex);
- } finally {
- adapter.setNotificationEnabled(true);
- }
-
- adaptersToUpdate.add(adapter);
- mofIndex++;
- }
- }
- }
-
- // Remove any remaining adapters.
- for (; i < mofChildren.size(); i++) {
- removeMOFValue((EObject) mofChildren.get(i), map);
- }
-
- // The adapters cannot be updated as they created. We must wait until
- // all of the adapters are created and removed before updating,
- // otherwise
- // we can get in a state where there are adapters fighting with
- // eachother
- // (one for the old node and one for the new node).
- for (int j = 0; j < adaptersToUpdate.size(); j++) {
- ((EMF2DOMAdapter) adaptersToUpdate.get(j)).updateMOF();
- }
- }
-
- /**
- * Removes a feature's value.
- *
- * @param childAdapter
- * com.ibm.etools.mof2dom.EMF2DOMAdapter The child to remove
- * @param mofAttributeName
- * String The name of the mofAttribute to remove the child from.
- */
- protected void removeMOFValue(EObject value, Translator translator) {
-
- if (value == null)
- return;
-
- EMF2DOMAdapter adapter = (EMF2DOMAdapter) EcoreUtil.getExistingAdapter(value, EMF2DOMAdapter.ADAPTER_CLASS);
- if (adapter != null) {
- // Remove the adapter from BOTH the MOF Object and the DOM Nodes
- value.eAdapters().remove(adapter);
- removeAdapters(adapter.getNode());
- }
-
- EStructuralFeature feature = translator.getFeature();
- boolean doUnload = feature == null || (translator.isObjectMap() && ((EReference) feature).isContainment());
-
- // translator.removeMOFValue() was here originally
-
- // Unload the objects.
- if (doUnload)
- ExtendedEcoreUtil.unload(value);
-
- // Remove the MOF value
- translator.removeMOFValue(getTarget(), value);
- }
-
- protected void reorderIfNecessary(EList emfChildren, EObject eObj, int emfIndex) {
- int currIndex = emfChildren.indexOf(eObj);
- if (currIndex > -1 && currIndex != emfIndex)
- emfChildren.move(emfIndex, eObj);
- }
-
- /**
- * default is to do nothing; subclasses can override
- */
- protected void indent(Node newNode, Translator map) {
-
- }
-
- protected Node findInsertBeforeNode(Node parentNode, Translator map, List mofList, int mofInx, List domList) {
- Node insertBeforeNode = null;
-
- // If there are no current dom children for this map, find the initial
- // insert pos.
- if (domList.size() == 0)
- return findInitialInsertBeforeNode(parentNode, map);
-
- // If some dom nodes then find the correct one to insert before.
- int i = mofInx + 1;
- while (i < mofList.size() && insertBeforeNode == null) {
- // Start at the mofInx passed in and look forward for the first
- // adapted
- // MOF object. Use that node as the insert before node.
- Object o = mofList.get(i);
- if (!map.isObjectMap() || map.isManagedByParent())
- break;
- EObject tMOFObject = (EObject) o;
- EMF2DOMAdapter tAdapter = (EMF2DOMAdapter) EcoreUtil.getExistingAdapter(tMOFObject, EMF2DOMAdapter.ADAPTER_CLASS);
- if (tAdapter != null) {
- insertBeforeNode = tAdapter.getNode();
- }
- i++;
- }
-
- // Handle inserting at the end of the list
- if (insertBeforeNode == null)
- insertBeforeNode = DOMUtilities.getNextNodeSibling((Node) domList.get(domList.size() - 1));
- if (insertBeforeNode == null)
- insertBeforeNode = ((Node) domList.get(domList.size() - 1)).getNextSibling();
-
- return insertBeforeNode;
- }
-
- protected Node findInitialInsertBeforeNode(Node parentNode, Translator mapNode) {
- Translator[] maps = getChildTranslators();
-
- // First, skip past all the maps in the ordered collection
- // of maps. We want to begin the search with this node.
- int i = 0;
- for (; i < maps.length; i++) {
- if (maps[i] == mapNode)
- break;
- }
-
- // Now search go through each map node until a child node matching
- // its DOM name is found.
- Node insertBeforeNode = null;
- for (int j = i; j < maps.length && insertBeforeNode == null; j++) {
- NodeList childNodes = parentNode.getChildNodes();
- Translator nodeToFindMap = maps[j];
- for (int k = 0; k < childNodes.getLength(); k++) {
- Node node = childNodes.item(k);
- if (nodeToFindMap.isMapFor(node.getNodeName())) {
- insertBeforeNode = node;
- break;
- }
- }
- }
- return insertBeforeNode;
- }
-
- /*
- * Traverses the path that <map> specifies. Returns the last node of the path that was able to
- * be traversed or null if the path could not be traversed. The <addAdapters> boolean is used to
- * determine if the receiver is added as an adapter to every node found on the path.
- */
- protected Node findDOMPath(Node parent, Translator map, boolean addAdapters) {
-
- String path = map.getDOMPath();
- Node curNode = parent;
- Iterator iter = DOMUtilities.createPathIterator(path);
-
- while (curNode != null && iter.hasNext()) {
- String nodeName = (String) iter.next();
- curNode = DOMUtilities.getNodeChild(curNode, nodeName);
- if (addAdapters && curNode != null) {
- addDOMAdapter(curNode);
- }
- }
- return curNode;
- }
-
- /**
- * Return the list of DOM node children that currently exist with the specified tagname.
- */
- protected List getDOMChildren(Node node, Translator map) {
- Node parent = findDOMPath(node, map, true);
- if (parent != null)
- return DOMUtilities.getNodeChildren(parent, map.getDOMNames());
- return new ArrayList();
- }
-
- protected EMF2DOMAdapter getExistingAdapter(EObject refObject) {
- EMF2DOMAdapter adapter = (EMF2DOMAdapter) EcoreUtil.getExistingAdapter(refObject, EMF2DOMAdapter.ADAPTER_CLASS);
- if (adapter != null && adapter.isMOFProxy()) {
- refObject.eAdapters().remove(adapter);
- removeDOMAdapter(adapter.getNode(), adapter);
- adapter = null;
- }
- return adapter;
- }
-
- protected void primAddDOMAdapter(Node aNode, EMF2DOMAdapter anAdapter) {
- fRenderer.registerDOMAdapter(aNode, anAdapter);
- }
-
- protected EMF2DOMAdapter primGetExistingAdapter(Node aNode) {
- return fRenderer.getExistingDOMAdapter(aNode);
- }
-
- protected void removeDOMAdapter(Node aNode, EMF2DOMAdapter anAdapter) {
- fRenderer.removeDOMAdapter(aNode, anAdapter);
- }
-
- protected void addDOMAdapter(Node childNode) {
-
- // Only add the adapter if this is an child node that will not be
- // adapted. For instance a subtree that maps to a MOF attribute
- // setting.
- if (childNode.getNodeType() == Node.ELEMENT_NODE) {
- EMF2DOMAdapter attrAdapter = primGetExistingAdapter(childNode);
-
- if (attrAdapter == null || attrAdapter.getNode() != getNode()) {
- // If the node is adapted, but not by this adapter then remove
- // it. This happens to non-object children when the parent tag
- // name is changed.
- removeDOMAdapter(childNode, attrAdapter);
-
- if (fDebug) {
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tCHILD: Adding DOM adapter: " + this); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\t\tto: " + childNode); //$NON-NLS-1$
- }
- primAddDOMAdapter(childNode, this);
- }
- }
- }
-
- /**
- * Reorder a child before a given node
- */
- protected void reorderDOMChild(Node parentNode, Node childNode, Node insertBeforeNode, Translator map) {
- try {
- removeDOMChild(parentNode, childNode, false);
- parentNode.insertBefore(childNode, insertBeforeNode);
- } catch (Throwable e) {
- e.printStackTrace();
- }
- }
-
- protected String getNewlineString(Node node) {
- return DOMUtilities.NEWLINE_STRING;
- }
-
- protected String primGetIndentString(Node node) {
- return DOMUtilities.getIndentString(node);
- }
-
- /**
- * Remove a child node
- */
- protected void removeDOMChild(Node parentNode, Node childNode) {
- removeDOMChild(parentNode, childNode, true);
- }
-
- /**
- * Remove a child node
- */
- protected void removeDOMChild(Node parentNode, Node childNode, boolean removeAdapter) {
- try {
- if (childNode == null)
- return;
- // Look for any whitespace preceeding the node being
- // removed and remove it as well.
- Text prevText = DOMUtilities.getPreviousTextSibling(childNode);
- if (prevText != null && DOMUtilities.isWhitespace(prevText)) {
- parentNode.removeChild(prevText);
- }
- // Remove the node.
- if (removeAdapter)
- removeAdapters(childNode);
- parentNode.removeChild(childNode);
- } catch (Throwable e) {
- e.printStackTrace();
- }
- }
-
- /**
- * Remove the DOM adapters from the node AND all its child nodes, recursively.
- */
- public void removeAdapters(Node node) {
- EMF2DOMAdapter adapter = primGetExistingAdapter(node);
- if (adapter != null) {
- // Remove the adapter from both the DOM node and the MOF Object.
- removeDOMAdapter(node, adapter);
- if (adapter.getNode() == node) {
- Notifier localTarget = adapter.getTarget();
- if (localTarget != null)
- localTarget.eAdapters().remove(adapter);
- }
- }
-
- NodeList nl = node.getChildNodes();
- for (int i = 0; i < nl.getLength(); i++) {
- Node n = nl.item(i);
- removeAdapters(n);
- }
- }
-
- /**
- * Creates the path specified by <map>under <node>. Only the portion of the path that does not
- * exist (if any) is created
- *
- * @param node
- * org.w3c.dom.Node
- * @param map
- * com.ibm.etools.mof2dom.Translator
- */
- protected Node createDOMPath(Node node, Translator map) {
- Iterator i = DOMUtilities.createPathIterator(map.getDOMPath());
- Node curNode = node;
- while (i.hasNext()) {
- String nodeName = (String) i.next();
- curNode = findOrCreateNode(node, map, nodeName);
- }
- return curNode;
- }
-
- protected Element findOrCreateNode(Node parent, Translator map, String segment) {
- Node node = DOMUtilities.getNodeChild(parent, segment);
- if (node == null) {
- // The node did not already exist, create it.
- Document doc = parent.getOwnerDocument();
- node = doc.createElement(segment);
- if (map.isEmptyTag())
- setEmptyTag((Element) node);
-
- Node insertBeforeNode = findInitialInsertBeforeNode(parent, map);
- DOMUtilities.insertBeforeNodeAndWhitespace(parent, node, insertBeforeNode);
- indent(node, map);
- addDOMAdapter(node); // Hook up listeners
- }
- return (Element) node;
- }
-
- /**
- * Remove the node passed in if it has only whitespace nodes as children
- *
- * @param node
- * org.w3c.dom.Node The node to check
- */
- protected void removeIfEmpty(Node node) {
- NodeList nl = node.getChildNodes();
-
- // Run through all the nodes children. If a non-whitespace node
- // pis found, bail.
- for (int i = 0; i < nl.getLength(); i++) {
- Node childNode = nl.item(i);
- if (!DOMUtilities.isWhitespace(childNode))
- return;
- }
-
- // We only get here if there are no non-whitespace chars, so
- // simply remove the node.
- removeDOMChild(node.getParentNode(), node);
- }
-
- /**
- * Remove the DOM path specified by <map>from <node>
- */
- protected void removeDOMPath(Node node, Translator map) {
- Node childNode = findDOMPath(node, map, false);
- while (childNode != null && childNode != node) {
- removeIfEmpty(childNode);
- childNode = childNode.getParentNode();
- }
- }
-
- /**
- * Create an adapter for a child DOM node
- *
- * @param node
- * org.w3c.dom.Node The node to create the adapter for.
- */
- protected EMF2DOMAdapter createAdapter(EObject mofObject, Translator childMap) {
- // Assert.isNotNull(childMap.getChildAdapterClass());
- Assert.isNotNull(mofObject);
-
- EMF2DOMAdapter adapter = (EMF2DOMAdapter) EcoreUtil.getAdapter(mofObject.eAdapters(), EMF2DOMAdapter.ADAPTER_CLASS);
-
- if (adapter != null && adapter.isMOFProxy()) {
- mofObject.eAdapters().remove(adapter);
- removeAdapters(adapter.getNode());
- adapter = null;
- }
- if (adapter == null)
- adapter = primCreateAdapter(mofObject, childMap);
- return adapter;
- }
-
- /**
- * Create an adapter for a child DOM node
- *
- * @param node
- * org.w3c.dom.Node The node to create the adapter for.
- */
- protected EMF2DOMAdapter primCreateAdapter(EObject mofObject, Translator childMap) {
-
- Element newNode = createNewNode(mofObject, childMap);
- return new EMF2DOMAdapterImpl(mofObject, newNode, fRenderer, childMap);
- }
-
- /**
- * Create an adapter for a child DOM node
- *
- * @param node
- * org.w3c.dom.Node The node to create the adapter for.
- */
- protected EMF2DOMAdapter primCreateAdapter(Node node, Translator childMap) {
- return new EMF2DOMAdapterImpl(node, fRenderer, childMap);
- }
-
- /**
- * Create an adapter for a child DOM node
- *
- * @param node
- * org.w3c.dom.Node The node to create the adapter for.
- */
- protected EMF2DOMAdapter createAdapter(Node node, Translator childMap) {
-
- //Assert.isNotNull(childMap.getChildAdapterClass());
- Assert.isNotNull(node);
-
- EMF2DOMAdapter adapter = primGetExistingAdapter(node);
-
- if (adapter != null) {
- if (adapter.isMOFProxy() || adapter.getTarget() == null) {
- removeDOMAdapter(node, adapter);
- if (adapter.getTarget() != null) {
- adapter.getTarget().eAdapters().remove(adapter);
- }
- adapter = null;
- }
- } else {
- adapter = primCreateAdapter(node, childMap);
- }
- return adapter;
- }
-
- protected Element createNewNode(EObject mofObject, Translator childMap) {
- Node node = getNode();
- Document doc = (node instanceof Document) ? (Document) node : node.getOwnerDocument();
-
- Element element = doc.createElement(childMap.getDOMName(mofObject));
- if (childMap.isEmptyTag())
- setEmptyTag(element);
-
- return element;
- }
-
- protected void setEmptyTag(Element element) {
- Revisit.toDo();
- //Need to figure out how to do this with pure DOM apis, if it is
- // possible
- }
-
- /*
- * Return true if MOF object is a proxy.
- */
- public boolean isMOFProxy() {
- if (isRoot || target == null)
- return false;
- return ((InternalEObject) target).eIsProxy();
- }
-
- public EObject getEObject() {
- if (isRoot)
- return null;
- return (EObject) target;
- }
-
- /**
- * Return the DOM node that the target of this adapter maps to. If the target MOF object maps to
- * more than one DOM node, this node is the top-most node.
- */
- public Node getNode() {
- return fNode;
- }
-
- public void setNode(Node aNode) {
- fNode = aNode;
- }
-
- public void updateDOM() {
- if (!isNotificationEnabled())
- return;
- primUpdateDOM();
- }
-
- public void updateMOF() {
- if (!isNotificationEnabled())
- return;
- primUpdateMOF();
- }
-
- protected void primUpdateDOM() {
- if (isRoot)
- updateDOMRootFeature();
- else {
- Translator[] maps = getChildTranslators();
- for (int i = 0; i < maps.length; i++) {
- updateDOMFeature(maps[i], getNode(), getEObject());
- }
- }
- }
-
- public void primUpdateMOF() {
- if (isRoot)
- updateMOFRootFeature();
- else {
- Translator[] maps = getChildTranslators();
- for (int i = 0; i < maps.length; i++) {
- updateMOFFeature(maps[i], getNode(), getEObject());
- }
- }
- }
-
- protected void updateDOMRootFeature() {
- boolean notificationFlag = isNotificationEnabled();
- try {
- setNotificationEnabled(false);
- primUpdateDOMMultiFeature(fTranslator, fNode, getResourceContents(), getDOMChildren(fNode, fTranslator), null);
- updateDOMDocumentType();
- } finally {
- setNotificationEnabled(notificationFlag);
- }
- }
-
- protected void updateMOFRootFeature() {
- boolean notificationFlag = isNotificationEnabled();
- try {
- setNotificationEnabled(false);
- updateMOFDocumentType();
- primUpdateMOFMultiFeature(fTranslator, fNode, getResourceContents(), getDOMChildren(fNode, fTranslator));
- } finally {
- setNotificationEnabled(notificationFlag);
- }
- }
-
- protected DocumentType getDocumentType() {
- return ((Document) fNode).getDoctype();
- }
-
- protected TranslatorResource getResource() {
- return (TranslatorResource) getTarget();
- }
-
- protected EList getResourceContents() {
- if (!isRoot)
- throw new IllegalStateException();
- return ((Resource) getTarget()).getContents();
- }
-
- protected void updateDOMDocumentType() {
-
- DocumentType docType = getDocumentType();
- String publicId = null, systemId = null, oldPublicId, oldSystemId;
- oldPublicId = docType == null ? null : docType.getPublicId();
- oldSystemId = docType == null ? null : docType.getSystemId();
- TranslatorResource resource = getResource();
- if (resource != null) {
- publicId = resource.getPublicId();
- systemId = resource.getSystemId();
- }
- if (!(StringUtil.stringsEqual(publicId, oldPublicId) && StringUtil.stringsEqual(systemId, oldSystemId)))
- fRenderer.replaceDocumentType(resource.getDoctype(), publicId, systemId);
- }
-
- protected void updateDOMDocumentType(Notification msg) {
- if (msg.getFeature() == TranslatorResource.DOC_TYPE_FEATURE)
- updateDOMDocumentType();
- }
-
- protected void updateMOFDocumentType() {
-
- TranslatorResource resource = getResource();
- if (resource == null)
- return;
-
- String publicId = null, systemId = null;
- DocumentType docType = getDocumentType();
-
- if (docType != null) {
- publicId = docType.getPublicId();
- systemId = docType.getSystemId();
- }
- if (!(StringUtil.stringsEqual(publicId, resource.getPublicId()) && StringUtil.stringsEqual(systemId, resource.getSystemId())))
- resource.setDoctypeValues(publicId, systemId);
- }
-
- public void notifyChanged(Notification msg) {
-
- if (isRoot) {
- notifyChangedForRoot(msg);
- return;
- }
- if (isDependencyFeature(msg))
- handleDependencyFeature(msg);
-
- if (!isNotificationEnabled())
- return;
-
- debugMOFNotify(msg);
-
- switch (msg.getEventType()) {
- case Notification.ADD :
- case Notification.REMOVE :
- case Notification.ADD_MANY :
- case Notification.REMOVE_MANY :
- case Notification.SET :
- case Notification.UNSET :
- case Notification.MOVE :
- Translator translator = findTranslator(msg);
- if (translator == null)
- translator = addVariableTranslatorIfNecessary(msg);
- if (translator != null)
- updateDOMFeature(translator, getNode(), getEObject());
- break;
- }
- }
-
- protected void notifyChangedForRoot(Notification msg) {
- if (!isNotificationEnabled())
- return;
-
- debugMOFNotify(msg);
-
- switch (msg.getEventType()) {
- case Notification.ADD :
- case Notification.REMOVE :
- case Notification.ADD_MANY :
- case Notification.REMOVE_MANY :
- primUpdateDOM();
- break;
- case Notification.SET :
- updateDOMDocumentType(msg);
- break;
- case EtoolsCopySession.RESOURCE_COPIED :
- updateDOM();
- break;
- }
- }
-
- protected void addDependencyAdapter(EObject child) {
- Adapter existing = EcoreUtil.getExistingAdapter(child, DependencyAdapter.KEY);
- if (existing != null)
- return;
- DependencyAdapter forwarder = new DependencyAdapter();
- child.eAdapters().add(forwarder);
- forwarder.setTarget(child);
- }
-
- protected void addDOMAdapter() {
-
- primAddDOMAdapter(fNode, this);
- if (fDebug) {
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("Adding DOM adapter: " + this); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tto: " + fNode); //$NON-NLS-1$
- }
-
- // Go through the maps. All of the DOM nodes that are not listened
- // to by another DOM Node adapter, must be listened to by this adapter.
- NodeList childNodes = fNode.getChildNodes();
- for (int j = 0; j < childNodes.getLength(); j++) {
- Node childNode = childNodes.item(j);
- int nodeType = childNode.getNodeType();
- if (!DOMUtilities.isTextNode(childNode) && nodeType != Node.COMMENT_NODE) {
- Translator map = findTranslator(childNode.getNodeName(), false);
- if (map != null && map.isManagedByParent())
- addDOMAdapter(childNode);
- }
- }
- }
-
- protected Translator addVariableTranslatorIfNecessary(Notification msg) {
- VariableTranslatorFactory fact = fTranslator.getVariableTranslatorFactory();
- Translator trans = null;
- if (fact != null && fact.accepts(msg)) {
- trans = fact.create(msg);
- if (trans != null)
- childTranslators = (Translator[]) Translator.concat(childTranslators, trans);
- }
- return trans;
- }
-
- protected Text createTextNode(Document doc, Translator map, String text) {
- String nonnulltext = (text != null) ? text : ""; //$NON-NLS-1$
- return map.isCDATAContent() ? doc.createCDATASection(nonnulltext) : doc.createTextNode(nonnulltext);
- }
-
- protected String extractReadAheadName() {
- if (!fTranslator.hasReadAheadNames())
- return null;
- String readAheadName = null;
-
- ReadAheadHelper helper = fTranslator.getReadAheadHelper(fNode.getNodeName());
- if (helper == null)
- return null;
-
- Node child = null;
- String[] names = helper.getValues();
- if (helper.getChildDOMName() == null) {
- for (int i = 0; i < names.length; i++) {
- child = DOMUtilities.getNodeChild(fNode, names[i]);
- if (child != null) {
- readAheadName = names[i];
- break;
- }
- }
- } else {
- child = DOMUtilities.getNodeChild(fNode, helper.getChildDOMName());
- if (child != null)
- readAheadName = DOMUtilities.getChildText(child);
- }
- if (readAheadName == null)
- readAheadName = names[0];
- return readAheadName;
- }
-
- /**
- * Extracts the text from <node>and converts it to an object suitable for setting into <feature>
- */
- protected Object extractValue(Node node, Translator map, EObject emfObject) {
-
- // Extract the value from the text child
- Node textNode = DOMUtilities.getChildTextNode(node);
- String trimmedValue = null;
- if (textNode != null)
- trimmedValue = textNode.getNodeValue();
- try {
- return map.convertStringToValue(trimmedValue, emfObject);
- } catch (FeatureValueConversionException ex) {
- handleFeatureValueConversionException(ex);
- return null;
- }
- }
-
- /**
- * @param ex
- */
- protected void handleFeatureValueConversionException(FeatureValueConversionException ex) {
- throw ex;
-
- }
-
- /*
- * Finds the child node that <map> specifies. If there is more than one child that satisfies
- * <map> then the first one is returned.
- *
- * This method traverses past the domPath if one is specified in the <map>.
- */
- protected Node findDOMNode(Node parent, Translator map) {
- return findDOMNode(parent, map, false);
- }
-
- /*
- * Finds the child node that <map> specifies. If there is more than one child that satisfies
- * <map> then the first one is returned. The <addAdapters> boolean is used to determine if the
- * receiver is added as an adapter to every node found on the path.
- *
- * This method traverses past the domPath if one is specified in the <map>.
- */
- protected Node findDOMNode(Node parent, Translator map, boolean addAdapters) {
-
- // First, trace down the path
- Node curNode = findDOMPath(parent, map, addAdapters);
- if (map.isDOMTextValue() || map.isDOMAttribute() || curNode == null)
- return curNode;
-
- // Now look for the first DOM name we can find
- String[] domNames = map.getDOMNames();
- Node node = null;
- for (int i = 0; i < domNames.length; i++) {
- String nodeName = domNames[i];
- List nodes = DOMUtilities.getNodeChildren(curNode, nodeName);
- if (nodes != null && !nodes.isEmpty()) {
- if (nodes.size() > 1)
- handleInvalidMultiNodes(nodeName);
- node = (Node) nodes.get(0);
- if (node != null) {
- if (addAdapters && (map != null || map.isManagedByParent()))
- addDOMAdapter(curNode);
- break;
- }
- }
- }
- return node;
- }
-
- protected void handleInvalidMultiNodes(String nodeName) {
- throw new IllegalStateException(WFTUtilsResourceHandler.getString(WFTUtilsResourceHandler.EMF2DOMAdapterImpl_ERROR_0, new Object[]{nodeName}));
- }
-
- /**
- * Creates the path specified by <map>under <node>. Only the portion of the path that does not
- * exist (if any) is created
- *
- * @param node
- * org.w3c.dom.Node
- * @param map
- * com.ibm.etools.mof2dom.Translator
- */
- protected Text findOrCreateTextNode(Node parent, Translator map, String text) {
- Text textNode = DOMUtilities.getChildTextNode(parent);
- if (textNode != null) {
- textNode.setData(text);
- } else {
- if (!isEmptyTag((Element) parent)) {
- Text newNode = createTextNode(parent.getOwnerDocument(), map, text);
- DOMUtilities.insertBeforeNode(parent, newNode, null);
- return newNode;
- }
- }
- return textNode;
- }
-
- protected Translator findTranslator(String tagName, boolean attributeMap) {
- Translator[] maps = getChildTranslators();
- for (int i = 0; i < maps.length; i++) {
- Translator map = maps[i];
- if (map.isMapFor(tagName) && attributeMap == map.isDOMAttribute())
- return maps[i];
- }
-
- return null;
- }
-
- protected EMF2DOMAdapter getExistingAdapter(Node aNode) {
- EMF2DOMAdapter adapter = primGetExistingAdapter(aNode);
- if (adapter != null && adapter.isMOFProxy()) {
- removeDOMAdapter(aNode, adapter);
- adapter.getTarget().eAdapters().remove(adapter);
- adapter = null;
- }
- return adapter;
- }
-
- protected void handleDependencyFeature(Notification msg) {
- if (msg.getOldValue() != null)
- removeDependencyAdapter((EObject) msg.getOldValue());
- if (msg.getNewValue() != null)
- addDependencyAdapter((EObject) msg.getNewValue());
- }
-
- protected boolean isDependencyFeature(Notification msg) {
- switch (msg.getEventType()) {
- case Notification.SET :
- return fTranslator.isDependencyParent() && fTranslator.getDependencyFeature() == msg.getFeature();
- default :
- return false;
- }
- }
-
- protected boolean isEmptyTag(Element parent) {
- Revisit.toDo();
- //Determine how to implement this with pure DOM apis, if possible.
- return false;
- }
-
- protected void postUpdateDOMFeature(Translator map, Node node, EObject mofObject) {
- }
-
- protected void preUpdateDOMFeature(Translator map, Node node, EObject mofObject) {
- }
-
- /**
- * Update an attribute of the target DOM object from with the values currently stored in the MOF
- * object. The
- *
- * @map specifies the name of the MOF attribute to update and the name of the DOM node.
- *
- * @param map
- * com.ibm.etools.mof2dom.AttributeTranslator
- */
- protected void primUpdateDOMFeature(Translator map, Node node, EObject mofObject) {
- Object attrValue = null;
- boolean isSet = false;
- if (map.isIDMap()) {
- try {
- attrValue = map.getMOFValue(mofObject);
- } catch (IDTranslator.NoResourceException ex) {
- //If the object has been removed from the resource,
- //No need to update
- return;
- }
- isSet = attrValue != null;
- } else {
- attrValue = map.getMOFValue(mofObject);
- isSet = map.isSetMOFValue(mofObject);
- }
-
- if (map.isDOMAttribute()) {
- // An attribute of the MOF object maps to an attribute of the
- // DOM node. Get the value of the MOF attribute and set it
- // into DOM node.
- Element e = (Element) createDOMPath(node, map);
- if (attrValue != null && isSet)
- e.setAttribute(map.getDOMName(mofObject), map.convertValueToString(attrValue, mofObject));
- else
- e.removeAttribute(map.getDOMName(mofObject));
- } else {
- updateDOMSubtree(map, node, mofObject, attrValue);
- }
- }
-
- /**
- * Update an attribute of the target DOM object from with the values currently stored in the MOF
- * object. The
- *
- * @map specifies the name of the MOF attribute to update and the name of the DOM node.
- */
- protected void primUpdateDOMLinkFeature(Translator map, Node node, EObject mofObject) {
- LinkUpdaterTarget.INSTANCE.updateDOM(map, node, mofObject);
-
- }
-
- /**
- * Update all the children of the target MOF object in the relationship described by
- *
- * @map.
- */
- protected void primUpdateDOMMultiFeature(Translator map, Node node, EObject mofObject) {
-
- List mofChildren = map.getMOFChildren(mofObject);
- List domChildren = getDOMChildren(node, map);
-
- primUpdateDOMMultiFeature(map, node, mofChildren, domChildren, mofObject);
- }
-
- /**
- * Update an attribute of the target MOF object from the DOM node subtree. The
- *
- * @map specifies the name of the MOF attribute to update and the name of the DOM node.
- */
- protected boolean primUpdateMOFFeature(Translator map, Node node, EObject mofObject) {
- if (!map.featureExists(mofObject))
- return false;
- Object domValue = null;
- boolean updateMOFAttAdapter = false;
- boolean isUnset = false;
- EMF2DOMAdapter attrAdapter = null;
-
- Node child = findDOMNode(node, map, true);
-
- if (map.isDOMAttribute() && child != null) {
- // An attribute of the MOF object maps to an attribute of the
- // DOM node. Get the value of the DOM attribute and set it
- // into the MOF object.
-
- Attr domAttr = (Attr) child.getAttributes().getNamedItem(map.getDOMName(mofObject));
- if (domAttr != null) {
- domValue = domAttr.getValue();
- domValue = map.convertStringToValue((String) domValue, mofObject);
- } else
- isUnset = true;
- } else {
- // An attribute of the MOF object is actually a sub-element
- // of the DOM node. Search for the first sub-element with
- // the correct name to use as an attribute.
- if (child != null) {
- // Check to see if this is a single valued attribute that has
- // a MOF object as its value
- if (!map.isManagedByParent()) {
- attrAdapter = createAdapter(child, map);
- updateMOFAttAdapter = true;
- domValue = attrAdapter.getTarget();
- } else {
- // Check to make sure the child is adapted. If not, adapt
- // it.
- addDOMAdapter(child);
-
- // Extract the value from the text child
- domValue = extractValue(child, map, mofObject);
- }
- } else
- isUnset = true;
- }
-
- // Set the attribute extracted from the DOM to the MOF object.
- boolean hasChanged = true;
- try {
- if (map.isIDMap())
- map.setMOFValue(mofObject, domValue);
- else {
- Object oldValue = null;
- oldValue = map.getMOFValue(mofObject);
- boolean isSet = map.isSetMOFValue(mofObject);
- //In the case of enums with default values, we need to trip
- // the attribute from
- //default to a set value
- if (oldValue == domValue) {
- if (oldValue == null || isSet)
- hasChanged = false;
- } else if (domValue == null && !isSet)
- //If the domValue is null and the feature is not set, then
- // we don't need
- //to do anything
- hasChanged = false;
- else if (oldValue != null && oldValue.equals(domValue) && isSet)
- hasChanged = false;
- if (oldValue == null && domValue == null && map.isSetMOFValue(mofObject) == isUnset)
- hasChanged = true;
- if (hasChanged) {
- if (!(map.isDataType()) && !map.isShared())
- removeMOFValue((EObject) oldValue, map);
- if (domValue == null)
- map.unSetMOFValue(mofObject);
- else
- map.setMOFValue(mofObject, domValue);
-
- if ((domValue == null && !(map.isEnumFeature())) || isUnset)
- map.unSetMOFValue(mofObject); //unset
- // null
- // for
- // non
- // enum
- // features
-
- if (updateMOFAttAdapter)
- attrAdapter.updateMOF();
- }
- }
- } catch (FeatureValueConversionException ex) {
- handleFeatureValueConversionException(ex);
- map.unSetMOFValue(mofObject);
- }
- return hasChanged;
- }
-
- /**
- * Update an attribute of the target MOF object from the DOM node subtree. This method is only
- * called if the DOM node changes and the map is an object link map. The
- *
- * @map specifies the name of the MOF attribute to update and the name of the DOM node.
- *
- * @param map
- * com.ibm.etools.mof2dom.AttributeTranslator
- * @return Return true if the MOF feature was updated, false if no update was done.
- */
- protected void primUpdateMOFLinkFeature(Translator map, Node node, EObject mofObject) {
- LinkUpdaterTarget.INSTANCE.updateMOF(map, node, mofObject);
- }
-
- /**
- * Update all the children of the target MOF object in the relationship described by
- *
- * @map.
- *
- * @param map
- * com.ibm.etools.mof2dom.AttributeTranslator Describes the mapping from the MOF
- * attribute name to the DOM node name
- */
- protected void primUpdateMOFMultiFeature(Translator map, Node node, EObject mofObject) {
- // If the feature is a collection of strings or ints, call a special
- // method
- // that handles this.
- if (map.isManagedByParent()) {
- updateMOFMultiPrimitiveFeature(map, node, mofObject);
- return;
- }
-
- List nodeChildren = getDOMChildren(node, map);
- List mofChildren = map.getMOFChildren(mofObject);
-
- primUpdateMOFMultiFeature(map, node, mofChildren, nodeChildren);
- }
-
- protected void removeDependencyAdapter(EObject obj) {
- Adapter existing = EcoreUtil.getExistingAdapter(obj, DependencyAdapter.KEY);
- if (existing != null)
- obj.eAdapters().remove(existing);
- }
-
- /**
- * Removes all the DOM children from <parent>that are represented by <map>.
- */
- protected void removeDOMChildren(Node parent, Translator map) {
- String[] domNames = map.getDOMNames();
- HashSet domNamesSet = new HashSet(domNames.length);
- for (int i = 0; i < domNames.length; i++)
- domNamesSet.add(domNames[i]);
-
- // Walk through all the children and find any that match the map.
- NodeList nl = parent.getChildNodes();
- List toRemove = new ArrayList();
- for (int i = 0; i < nl.getLength(); i++) {
- Node childNode = nl.item(i);
- if (domNamesSet.contains(childNode.getNodeName()))
- toRemove.add(childNode);
- }
-
- // Remove any children that were found.
- for (int i = 0; i < toRemove.size(); i++) {
- Node childNode = (Node) toRemove.get(i);
- removeDOMChild(parent, childNode, true);
- }
- }
-
- protected void setTargetFromNode() {
- setTarget(fTranslator.createEMFObject(fNode.getNodeName(), extractReadAheadName()));
- }
-
- /**
- * Update an attribute of the target DOM object from with the values currently stored in the MOF
- * object. The
- *
- * @map specifies the name of the MOF attribute to update and the name of the DOM node.
- *
- * @param map
- * com.ibm.etools.mof2dom.AttributeTranslator
- */
- final public void updateDOMFeature(Translator map, Node node, EObject mofObject) {
- if (!isNotificationEnabled())
- return;
- try {
- preUpdateDOMFeature(map, node, mofObject);
- if (map.isMultiValued()) {
- updateDOMMultiFeature(map, node, mofObject);
- return;
- }
-
- if (fDebug) {
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("Updating DOM Node: " + node); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tfrom: " + mofObject); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tmap : " + map); //$NON-NLS-1$
- }
- boolean notificationFlag = isNotificationEnabled();
- try {
- setNotificationEnabled(false);
- primUpdateDOMFeature(map, node, mofObject);
- } finally {
- setNotificationEnabled(notificationFlag);
- }
-
- if (map.isTargetLinkMap()) {
- updateDOMLinkFeature(map, node, mofObject);
- }
- } finally {
- postUpdateDOMFeature(map, node, mofObject);
- }
- }
-
- /**
- * Update an attribute of the target DOM object from the values currently stored in the MOF
- * object. The
- *
- * @map specifies the name of the MOF attribute to update and the name of the DOM node.
- *
- * @param map
- * com.ibm.etools.mof2dom.AttributeTranslator
- */
- final protected void updateDOMLinkFeature(Translator map, Node node, EObject mofObject) {
- if (fDebug) {
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("Updating DOM Node (link): " + node); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tfrom: " + mofObject); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tmap : " + map); //$NON-NLS-1$
- }
- primUpdateDOMLinkFeature(map, node, mofObject);
- }
-
- /**
- * Update all the children of the target MOF object in the relationship described by
- *
- * @map.
- *
- * @param map
- * com.ibm.etools.mof2dom.AttributeTranslator Describes the mapping from the MOF
- * attribute name to the DOM node name
- */
- final protected void updateDOMMultiFeature(Translator map, Node node, EObject mofObject) {
- if (fDebug) {
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("Updating DOM Node (multi): " + node); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tfrom: " + mofObject); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tmap : " + map); //$NON-NLS-1$
- }
- boolean notificationFlag = isNotificationEnabled();
- try {
- setNotificationEnabled(false);
- primUpdateDOMMultiFeature(map, node, mofObject);
- } finally {
- setNotificationEnabled(notificationFlag);
- }
- }
-
- /**
- * Update a DOM subtree to reflect the mofObject and map passed in. The subtree is of <node>is
- * updated.
- */
- protected void updateDOMSubtree(Translator map, Node node, EObject mofObject, Object attrValue) {
-
- if (map.featureExists(mofObject)) {
- if ((map.isEnumFeature() || map.isBooleanFeature()) && (map.isUnsettable() && !map.isSetMOFValue(mofObject)))
- attrValue = null;
- } else
- attrValue = map.extractStringValue(mofObject);
-
- // Create and/or update the DOM subtree
- if (attrValue != null) {
- Node parent = createDOMPath(node, map);
- if (map.isManagedByParent()) {
- // Handle the case where the mof value is not another
- // mof object (primitive)
- if (map.getDOMName(mofObject) != null && map.getDOMName(mofObject).startsWith("#")) //$NON-NLS-1$
- return;
-
- Element child = map.isDOMTextValue() ? (Element) parent : findOrCreateNode(parent, map, map.getDOMName(mofObject));
-
- findOrCreateTextNode(child, map, map.convertValueToString(attrValue, mofObject));
- } else {
- // Handle the case were the mof value is a mof object.
- EObject mofValue = (EObject) attrValue;
- EMF2DOMAdapter valueAdapter = (EMF2DOMAdapter) EcoreUtil.getExistingAdapter(mofValue, EMF2DOMAdapter.ADAPTER_CLASS);
- if (valueAdapter != null)
- valueAdapter.updateDOM();
- else {
- removeDOMChildren(parent, map);
- EMF2DOMAdapter adapter = createAdapter(mofValue, map);
- List mofChildren = map.getMOFChildren(mofObject);
- List domChildren = getDOMChildren(parent, map);
-
- Node insertBeforeNode = findInsertBeforeNode(parent, map, mofChildren, 0, domChildren);
- DOMUtilities.insertBeforeNodeAndWhitespace(parent, adapter.getNode(), insertBeforeNode);
- boolean notificationFlag = adapter.isNotificationEnabled();
- adapter.setNotificationEnabled(false);
- try {
- indent(adapter.getNode(), map);
- } finally {
- adapter.setNotificationEnabled(notificationFlag);
- }
- adapter.updateDOM();
- }
- }
- } else {
- // The attribute value was set to null or unset. Remove any
- // existing DOM nodes.
- Node child = findDOMNode(node, map);
- if (child != null)
- removeDOMChild(child.getParentNode(), child);
- }
- }
-
- /**
- * Update a feature that is set by linking to another existing object. This method is called
- * when the MOF object is updated in order to update DOM nodes.
- */
- final protected void updateMOFLinkFeature(Translator map, Node node, EObject mofObject) {
- if (fDebug) {
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("Updating MOFObject (link): " + mofObject); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tfrom: " + node); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tmap : " + map); //$NON-NLS-1$
- }
- boolean notificationFlag = isNotificationEnabled();
- try {
- setNotificationEnabled(false);
- primUpdateMOFLinkFeature(map, node, mofObject);
- } finally {
- setNotificationEnabled(notificationFlag);
- }
- }
-
- /**
- * Update all the children of the target MOF object in the relationship described by
- *
- * @map.
- *
- * @param map
- * com.ibm.etools.mof2dom.AttributeTranslator Describes the mapping from the MOF
- * attribute name to the DOM node name
- */
- final protected void updateMOFMultiFeature(Translator map, Node node, EObject mofObject) {
- if (fDebug) {
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("Updating MOFObject (multi): " + mofObject); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tfrom: " + node); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tmap : " + map); //$NON-NLS-1$
- }
- boolean notificationFlag = isNotificationEnabled();
- try {
- setNotificationEnabled(false);
- primUpdateMOFMultiFeature(map, node, mofObject);
- } finally {
- setNotificationEnabled(notificationFlag);
- }
- }
-
- /**
- * Update all the children of the target MOF object in the relationship described by
- *
- * @map. The relationship MUST BE a collection of string for this method to work.
- */
- protected void updateMOFMultiPrimitiveFeature(Translator map, Node node, EObject mofObject) {
- List nodeChildren = getDOMChildren(node, map);
-
- map.clearList(mofObject);
-
- // Go through the list of nodes and update the MOF collection
- for (int i = 0; i < nodeChildren.size(); i++) {
- Node child = (Node) nodeChildren.get(i);
- Object attributeValue = extractValue(child, map, mofObject);
- if (attributeValue != null)
- map.setMOFValue(mofObject, attributeValue, i);
-
- // Adapt the node so update will occur.
- addDOMAdapter(child);
- }
- if (map.hasDOMPath() && nodeChildren.isEmpty() && findDOMPath(node, map, false) != null)
- map.setMOFValueFromEmptyDOMPath(mofObject);
- }
-
- /**
- * Update an attribute of the target MOF object from the DOM node subtree. The
- *
- * @map specifies the name of the MOF attribute to update and the name of the DOM node.
- *
- * @param map
- * com.ibm.etools.mof2dom.AttributeTranslator
- */
- public void updateMOFFeature(Translator map, Node node, EObject mofObject) {
- if (!isNotificationEnabled())
- return;
- if (map.isMultiValued()) {
- updateMOFMultiFeature(map, node, mofObject);
- return;
- } else if (map.isComment()) {
- updateMOFCommentFeature(map, node, mofObject);
- return;
- }
-
- // TODO MDE Add a map.isComment() and updateMOFCommentFeature(map, node, mofObject);
-
- if (fDebug) {
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("Updating MOFObject: " + mofObject); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tfrom: " + node); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tmap : " + map); //$NON-NLS-1$
- }
- boolean notificationFlag = isNotificationEnabled();
- boolean hasChanged = false;
- try {
- setNotificationEnabled(false);
- hasChanged = primUpdateMOFFeature(map, node, mofObject);
- } finally {
- setNotificationEnabled(notificationFlag);
- }
-
- if (map.isTargetLinkMap() && hasChanged)
- updateMOFLinkFeature(map, node, mofObject);
- }
-
- /**
- * @param map
- * @param node
- * @param mofObject
- */
- public void updateMOFCommentFeature(Translator map, Node node, EObject mofObject) {
- Node commentNode = node;
- /* scan up the dom to find the first comment node before this node */
- while ((commentNode = commentNode.getPreviousSibling()) != null && commentNode.getNodeType() != Node.COMMENT_NODE) {
- /* no comment available */
- if (commentNode.getNodeType() == Node.ELEMENT_NODE)
- return;
- }
- if (commentNode != null)
- map.setMOFValue(mofObject, commentNode.getNodeValue());
-
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMRenderer.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMRenderer.java
deleted file mode 100644
index 206860d42..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMRenderer.java
+++ /dev/null
@@ -1,264 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.resource;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.OutputKeys;
-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.emf.common.util.WrappedException;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.wst.common.internal.emf.utilities.DOMLoadOptions;
-import org.eclipse.wst.common.internal.emf.utilities.DOMUtilities;
-import org.eclipse.wst.common.internal.emf.utilities.Revisit;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.SAXException;
-
-
-
-public class EMF2DOMRenderer extends AbstractRendererImpl implements Renderer {
-
- protected Map domAdapterRegistry;
- protected boolean needsToCreateDOM = true;
- protected Document document;
-
- /**
- * Constructor for DOMRendererImpl.
- */
- public EMF2DOMRenderer() {
- super();
- if (managesDOMAdapters())
- initDOMAdapterRegistry();
- }
-
- /**
- * @see com.ibm.etools.emf2xml.Renderer#doLoad(InputStream, Map)
- */
- public void doLoad(InputStream in, Map options) throws IOException {
- if ((in != null) || !useStreamsForIO()) {
- loadDocument(in, options);
- EMF2DOMAdapter adapter = createRootDOMAdapter();
- adapter.updateMOF();
- }
- }
-
- protected void loadDocument(InputStream in, Map options) throws IOException {
- try {
- DOMLoadOptions domOpts = new DOMLoadOptions();
- domOpts.setAllowJavaEncodings(true);
- domOpts.setExpandEntityRefererences(true);
- domOpts.setValidate(isValidating());
- document = DOMUtilities.loadDocument(in, domOpts, getResource().getEntityResolver());
- needsToCreateDOM = false;
- } catch (RuntimeException t_rex) {
- throw t_rex;
- } catch (IOException iox) {
- throw iox;
- } catch (Exception ex) {
- throw new WrappedException(ex);
- }
- }
-
-
- /**
- * @see com.ibm.etools.emf2xml.Renderer#doSave(OutputStream, Map)
- */
- public void doSave(OutputStream outputStream, Map options) throws IOException {
- createDOMTreeIfNecessary();
- serializeDocument(outputStream);
- }
-
- /**
- * Subclasses should override if adapters are not cached within this renderer, e.g., they are
- * stored in notifying Nodes
- */
- protected boolean managesDOMAdapters() {
- return true;
- }
-
- protected void initDOMAdapterRegistry() {
- if (domAdapterRegistry == null)
- domAdapterRegistry = new HashMap();
- }
-
- public void registerDOMAdapter(Node node, EMF2DOMAdapter adapter) {
- domAdapterRegistry.put(node, adapter);
- }
-
- public EMF2DOMAdapter getExistingDOMAdapter(Node node) {
- return (EMF2DOMAdapter) domAdapterRegistry.get(node);
- }
-
- public void removeDOMAdapter(Node aNode, EMF2DOMAdapter anAdapter) {
- domAdapterRegistry.remove(aNode);
- }
-
- /**
- * @see com.ibm.etools.emf2xml.Renderer#prepareToAddContents()
- */
- public void prepareToAddContents() {
- // createDOMTreeIfNecessary();
- }
-
- protected Node createDOMTree() {
- createDocument();
- EMF2DOMAdapter adapter = createRootDOMAdapter();
- adapter.updateDOM();
- needsToCreateDOM = false;
- return document;
- }
-
-
- protected EMF2DOMAdapter createRootDOMAdapter() {
- EMF2DOMAdapter root = new EMF2DOMAdapterImpl(getResource(), document, this, getResource().getRootTranslator());
- registerDOMAdapter(document, root);
- return root;
- }
-
-
- protected void createDOMTreeIfNecessary() {
- if (needsToCreateDOM)
- createDOMTree();
- }
-
- /**
- * Create a new Document given
- *
- * @aResource.
- */
- protected void createDocument() {
- TranslatorResource res = getResource();
- res.setDefaults();
- try {
- document = DOMUtilities.createNewDocument(res.getDoctype(), res.getPublicId(), res.getSystemId());
- } catch (ParserConfigurationException e) {
- throw new WrappedException(e);
- } catch (SAXException e) {
- throw new WrappedException(e);
- } catch (IOException e) {
- throw new WrappedException(e);
- }
- }
-
- public void serializeDocument(OutputStream out) throws IOException {
- /*
- * OutputFormat format = createOutputFormat(); Serializer serializer =
- * SerializerFactory.getSerializerFactory(Method.XML).makeSerializer(out, format);
- * serializer.asDOMSerializer().serialize(document);
- */
- try {
- TransformerFactory factory = TransformerFactory.newInstance();
- /*
- * try { factory.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA); } catch
- * (IllegalArgumentException x) { }
- */
- Transformer transformer = factory.newTransformer();
-
- transformer.setOutputProperty(OutputKeys.ENCODING, getResource().getEncoding());
- transformer.setOutputProperty(OutputKeys.VERSION, getResource().getXMLVersion());
- transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
- transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no"); //$NON-NLS-1$
- if (getResource().getPublicId() != null)
- transformer.setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, getResource().getPublicId());
- if (getResource().getSystemId() != null)
- transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, getResource().getSystemId());
- transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
- transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4"); //$NON-NLS-1$ //$NON-NLS-2$
- DOMSource source = new DOMSource(document.getDocumentElement());
- /* source.setSystemId(getResource().getSystemId()); */
- transformer.transform(source, new StreamResult(out));
- } catch (TransformerConfigurationException e) {
- Logger.getLogger().logError(e);
- } catch (TransformerFactoryConfigurationError e) {
- Logger.getLogger().logError(e);
- } catch (TransformerException e) {
- Logger.getLogger().logError(e);
- } finally {
- }
- }
-
- /*
- * protected OutputFormat createOutputFormat() { OutputFormat format = new OutputFormat();
- * format.setIndenting(true); format.setLineSeparator(DOMUtilities.NEWLINE_STRING);
- * //$NON-NLS-1$ format.setEncoding(getResource().getEncoding());
- * format.setVersion(getResource().getXMLVersion()); return format; }
- */
-
- public void replaceDocumentType(String docTypeName, String publicId, String systemId) {
- Revisit.revisit();
- Document newDoc = null;
- // Need be able to update the doctype directly on the existing document; right now can't
- // because
- // of limitations on parser neutral apis
-
- try {
- newDoc = DOMUtilities.createNewDocument(docTypeName, publicId, systemId);
- } catch (ParserConfigurationException e) {
- throw new WrappedException(e);
- } catch (SAXException e) {
- throw new WrappedException(e);
- } catch (IOException e) {
- throw new WrappedException(e);
- }
-
-
- replaceNode(document.getDocumentElement(), newDoc, newDoc);
- readapt(document, newDoc);
- document = newDoc;
- }
-
- protected void replaceNode(Node oldChild, Node newParent, Document newDoc) {
- Node newChild = newDoc.importNode(oldChild, false);
- newParent.appendChild(newChild);
- readapt(oldChild, newChild);
- NodeList children = oldChild.getChildNodes();
- int length = children.getLength();
- for (int i = 0; i < length; i++) {
- replaceNode(children.item(i), newChild, newDoc);
- }
- }
-
- public void preUnload() {
- EMF2DOMAdapter adapter = (EMF2DOMAdapter) EcoreUtil.getAdapter(resource.eAdapters(), EMF2DOMAdapter.ADAPTER_CLASS);
- if (adapter != null) {
- adapter.removeAdapters(adapter.getNode());
- }
- }
-
- protected void readapt(Node oldChild, Node newChild) {
- EMF2DOMAdapter adapter = getExistingDOMAdapter(oldChild);
- if (adapter != null) {
- registerDOMAdapter(newChild, adapter);
- // Some nodes are managed by the parent and thus the
- // node should not be set on the parent adapter
- if (adapter.getNode() == oldChild)
- adapter.setNode(newChild);
- }
- }
-
- public int getVersionID() {
- return getResource().getVersionID();
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMRendererFactory.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMRendererFactory.java
deleted file mode 100644
index fce560371..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMRendererFactory.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.resource;
-
-
-public class EMF2DOMRendererFactory extends RendererFactory {
-
- public static final EMF2DOMRendererFactory INSTANCE = new EMF2DOMRendererFactory();
-
- public EMF2DOMRendererFactory() {
- super();
- }
-
- /**
- * @see com.ibm.etools.emf2xml.RendererFactory#createRenderer()
- */
- public Renderer createRenderer() {
- EMF2DOMRenderer renderer = new EMF2DOMRenderer();
- renderer.setValidating(isValidating());
- return renderer;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMRendererFactoryDefaultHandler.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMRendererFactoryDefaultHandler.java
deleted file mode 100644
index 1257a061a..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMRendererFactoryDefaultHandler.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Dec 1, 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.wst.common.internal.emf.resource;
-
-
-/**
- * @author schacher
- *
- * 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 EMF2DOMRendererFactoryDefaultHandler implements RendererFactoryDefaultHandler {
-
- public static final EMF2DOMRendererFactoryDefaultHandler INSTANCE = new EMF2DOMRendererFactoryDefaultHandler();
-
- /**
- *
- */
- protected EMF2DOMRendererFactoryDefaultHandler() {
- super();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.RendererFactoryDefaultHandler#getDefaultRendererFactory()
- */
- public RendererFactory getDefaultRendererFactory() {
- return EMF2DOMRendererFactory.INSTANCE;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2SAXDocumentHandler.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2SAXDocumentHandler.java
deleted file mode 100644
index 1ec3dbe9e..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2SAXDocumentHandler.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.resource;
-
-
-import java.io.IOException;
-
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.xml.sax.Attributes;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * The EMF2SAXDocumentHandler is utilized by the SAX parser to announce XML Events, such as
- * beginning and end of XML elements and the contents of those elements.
- *
- * @author mdelder
- */
-public class EMF2SAXDocumentHandler extends DefaultHandler {
-
- private TranslatorResource resource = null;
- private final CacheEventStack eventStack = new CacheEventStack();
- private CacheEventPool availableEventPool = new CacheEventPool();
-
- /**
- * Create an EMF2SAXDocumentHandler to populate the given resource.
- *
- */
- public EMF2SAXDocumentHandler(TranslatorResource resource) {
- this.resource = resource;
- }
-
- /**
- * @see org.xml.sax.helpers.DefaultHandler#resolveEntity(java.lang.String, java.lang.String)
- */
- public InputSource resolveEntity(String publicId, String systemId) throws SAXException {
- InputSource result = null;
- this.resource.setDoctypeValues(publicId, systemId);
-
- try {
- EntityResolver entityResolver = this.resource.getEntityResolver();
-
- if (entityResolver != null)
- result = entityResolver.resolveEntity(publicId, systemId);
- else
- result = super.resolveEntity(publicId, systemId);
- } catch (IOException ioe) {
- throw new SAXException(ioe);
- }
-
- return result;
- }
-
- /**
- * @see org.xml.sax.ContentHandler#startDocument()
- */
- public void startDocument() throws SAXException {
- /*
- * The endDocument() method should have frozen the pool, or it may not be warmed yet. In
- * either case, this method call will do as little work as necessary
- */
- availableEventPool.warmPool();
-
- /* This line should not be necessary, but is left for safty */
- eventStack.clear();
- this.createRoot(this.resource);
-
- }
-
- /**
- * @see org.xml.sax.ContentHandler#startElement(java.lang.String, java.lang.String,
- * java.lang.String, org.xml.sax.Attributes)
- */
- public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
- addToStack(qName, attributes);
- }
-
- /**
- * @see org.xml.sax.ContentHandler#characters(char[], int, int)
- */
- public void characters(char[] data, int start, int length) throws SAXException {
-
- CacheEventNode currentRecord = getCurrentRecord();
- if (currentRecord != null) {
- currentRecord.appendToBuffer(data, start, length);
- }
- }
-
- /**
- * @see org.xml.sax.ContentHandler#endElement(java.lang.String, java.lang.String,
- * java.lang.String)
- */
- public void endElement(String uri, String localName, String qName) throws SAXException {
-
- CacheEventNode currentRecord = null;
-
- /*
- * This should only happen in the case where the DOMPath was ignored so the stack does not
- * quite match with the XML data structure. In this case we do nothing
- */
- if (qName.equals(this.getCurrentRecord().getNodeName())) {
- currentRecord = this.removeCurrentRecord();
- if (currentRecord != null) {
- currentRecord.commit();
- }
- }
- }
-
- /**
- * @see org.xml.sax.ContentHandler#endDocument()
- */
- public void endDocument() throws SAXException {
- CacheEventNode lastRecord = this.removeCurrentRecord();
- lastRecord.commit();
- availableEventPool.freezePool();
- }
-
- /**
- * @see org.xml.sax.ErrorHandler#error(org.xml.sax.SAXParseException)
- */
- public void error(SAXParseException ex) throws SAXException {
- throw ex;
- }
-
- /**
- * @see org.xml.sax.ErrorHandler#fatalError(org.xml.sax.SAXParseException)
- */
- public void fatalError(SAXParseException ex) throws SAXException {
- throw ex;
- }
-
- /**
- * @see org.xml.sax.ErrorHandler#warning(org.xml.sax.SAXParseException)
- */
- public void warning(SAXParseException ex) throws SAXException {
- Logger.getLogger().logWarning(ex);
- }
-
- /**
- * @return
- */
- public TranslatorResource getResource() {
- return resource;
- }
-
- protected void createRoot(TranslatorResource resourceArg) {
- this.eventStack.push(availableEventPool.createCacheEventNode(resourceArg));
- }
-
- protected void addToStack(String nodeName, Attributes attributes) {
- CacheEventNode parent = this.getCurrentRecord();
- if (!parent.isChildIgnorable(nodeName)) {
- this.eventStack.push(availableEventPool.createCacheEventNode(parent, nodeName, attributes));
- }
- }
-
- /**
- * Return the current CENO without removing it from the event stack.
- *
- * @return the current CENO without removing it
- */
- protected CacheEventNode getCurrentRecord() {
- CacheEventNode result = null;
- if (!this.eventStack.isEmpty()) {
- result = this.eventStack.peek();
- }
- return result;
- }
-
- /**
- * Return the current CENO and remove it from the event stack.
- *
- * @return the current CENO and remove it
- */
- protected CacheEventNode removeCurrentRecord() {
- CacheEventNode result = null;
- if (!this.eventStack.isEmpty()) {
- result = this.eventStack.pop();
- }
- return result;
- }
-
- // private final void printStack() {
- // // System.out.println("Printing stack ...");
- // // for (int i = 0; i < this.eventStack.size(); i++) {
- // // debug("stack[" + i + "]: " + eventStack.get(i));
- // // }
- // // System.out.println("... Printed stack");
- // }
- //
- // private final static void debug(Object obj) {
- // // System.out.println(obj);
- // }
- //
- // private final static void warn(Object obj) {
- // //System.err.println(obj);
- // }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2SAXRenderer.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2SAXRenderer.java
deleted file mode 100644
index 7bd2634e3..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2SAXRenderer.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.resource;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Map;
-
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.TransformerFactoryConfigurationError;
-import javax.xml.transform.sax.SAXTransformerFactory;
-import javax.xml.transform.sax.TransformerHandler;
-import javax.xml.transform.stream.StreamResult;
-
-import org.eclipse.emf.common.util.WrappedException;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.XMLReader;
-
-/**
- * @author mdelder
- */
-public class EMF2SAXRenderer extends AbstractRendererImpl {
-
- /**
- *
- */
- public EMF2SAXRenderer() {
- super();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.Renderer#doLoad(java.io.InputStream, java.util.Map)
- */
- public void doLoad(InputStream in, Map options) {
- try {
- SAXParserFactory factory = SAXParserFactory.newInstance();
- factory.setValidating(isValidating());
- factory.setNamespaceAware(true);
- /*
- * Causes errors in IBM JDK try { factory.setAttribute(JAXP_SCHEMA_LANGUAGE,
- * W3C_XML_SCHEMA); } catch (IllegalArgumentException x) { }
- */
- SAXParser parser = factory.newSAXParser();
- XMLReader reader = parser.getXMLReader();
- EMF2SAXDocumentHandler handler = new EMF2SAXDocumentHandler(this.getResource());
- try {
- reader.setFeature("http://xml.org/sax/features/validation", isValidating()); //$NON-NLS-1$
- } catch (SAXNotRecognizedException snre) {
- }
- try {
- reader.setFeature("http://xml.org/sax/features/namespace-prefixes", true); //$NON-NLS-1$
- } catch (SAXNotRecognizedException snre) {
- }
- try {
- reader.setFeature("http://apache.org/xml/features/validation/schema", isValidating()); //$NON-NLS-1$
- } catch (SAXNotRecognizedException e) {
- reader.setFeature("http://xml.org/sax/features/validation", false); //$NON-NLS-1$
- Logger.getLogger().log("Warning: Parser does not support \"http://apache.org/xml/features/validation/schema\". Validation will be disabled."); //$NON-NLS-1$
- }
- try {
- reader.setFeature("http://apache.org/xml/features/allow-java-encodings", true); //$NON-NLS-1$
- } catch (SAXNotRecognizedException e) {
- Logger.getLogger().log("Warning: Parser does not support \"http://apache.org/xml/features/allow-java-encodings\"."); //$NON-NLS-1$
- }
- /*
- * try { reader.setProperty("http://xml.org/sax/properties/lexical-handler", handler); }
- * catch (SAXNotRecognizedException e) { }
- */
- reader.setContentHandler(handler);
- reader.setErrorHandler(handler);
- //reader.setDTDHandler(handler);
- reader.setEntityResolver(handler);
- InputSource testsource = new InputSource(in);
- reader.parse(testsource);
- } catch (RuntimeException t_rex) {
- throw t_rex;
- } catch (Exception ex) {
- throw new WrappedException(ex);
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.Renderer#doSave(java.io.OutputStream, java.util.Map)
- */
- public void doSave(OutputStream outputStream, Map options) throws IOException {
-
- /*
- * try { Serializer serializer =
- * SerializerFactory.getSerializerFactory(Method.XML).makeSerializer(outputStream,
- * createOutputFormat()); serializer.setOutputByteStream(outputStream); ContentHandler
- * handler = serializer.asContentHandler();
- */
-
- TransformerHandler handler = null;
- try {
- try {
- SAXTransformerFactory factory = (SAXTransformerFactory) TransformerFactory.newInstance();
- handler = factory.newTransformerHandler();
-
- handler.setResult(new StreamResult(outputStream));
- Transformer transformer = handler.getTransformer();
- transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
- transformer.setOutputProperty(OutputKeys.ENCODING, getResource().getEncoding());
- transformer.setOutputProperty(OutputKeys.VERSION, getResource().getXMLVersion());
- transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
- transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no"); //$NON-NLS-1$
- transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4"); //$NON-NLS-1$ //$NON-NLS-2$
-
- if (getResource().getPublicId() != null)
- transformer.setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, getResource().getPublicId());
- if (getResource().getSystemId() != null)
- transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, getResource().getSystemId());
-
- } catch (TransformerConfigurationException e) {
- Logger.getLogger().logError(e);
- } catch (TransformerFactoryConfigurationError e) {
- Logger.getLogger().logError(e);
- }
- if (handler == null) {
- Logger.getLogger("SAX Writer is null"); //$NON-NLS-1$
- return;
- }
- EMF2SAXWriter writer = new EMF2SAXWriter();
- writer.serialize(this.resource, handler);
- } catch (SAXException saxe) {
- throw new WrappedException(saxe);
- }
- }
-
- /*
- * protected OutputFormat createOutputFormat() { OutputFormat format = new OutputFormat();
- * format.setIndenting(true); format.setLineSeparator(DOMUtilities.NEWLINE_STRING);
- * //$NON-NLS-1$ format.setEncoding(getResource().getEncoding());
- * format.setVersion(getResource().getXMLVersion()); if (this.resource != null)
- * format.setDoctype(this.resource.getPublicId(), this.resource.getSystemId()); return format; }
- */
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.Renderer#prepareToAddContents()
- */
- public void prepareToAddContents() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.Renderer#getVersionID()
- */
- public int getVersionID() {
- return getResource().getVersionID();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2SAXRendererFactory.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2SAXRendererFactory.java
deleted file mode 100644
index d3fd5d91b..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2SAXRendererFactory.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Aug 19, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-
-/**
- * Used to create instances of the EMF2SAXRenderer
- *
- * @author mdelder
- */
-public class EMF2SAXRendererFactory extends RendererFactory {
-
- public static final EMF2SAXRendererFactory INSTANCE = new EMF2SAXRendererFactory();
-
- protected EMF2SAXRendererFactory() {
- super();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.RendererFactory#createRenderer()
- */
- public Renderer createRenderer() {
- EMF2SAXRenderer renderer = new EMF2SAXRenderer();
- renderer.setValidating(isValidating());
- return renderer;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2SAXWriter.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2SAXWriter.java
deleted file mode 100644
index c5d08070e..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2SAXWriter.java
+++ /dev/null
@@ -1,387 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.resource;
-
-
-import java.util.List;
-import java.util.Stack;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.AttributesImpl;
-
-/**
- * The EMF2SAXWriter handles the serialization of EMF Resources using SAX events. SAX events are
- * triggered to the content handler as the tree is being parsed. These events can then be written
- * into any stream wrapped by the ContentHandler.
- *
- * @author mdelder
- */
-public class EMF2SAXWriter {
-
- public static final String NAMESPACE = "";//"http://java.sun.com/xml/ns/j2ee"; //$NON-NLS-1$
-
- /* Used in those cases where no Attributes are necessary */
- private static final Attributes EMPTY_ATTRIBUTES = new AttributesImpl();
-
- /**
- * Serialize an EMF resource into an XML Stream using the given ContentHandler. Note that this
- * method can also be used to copy a given EMF Resource if the EMF2SAXDocumentHandler is used as
- * the given ContentHandler.
- *
- * @param resource
- * @param handler
- */
- public void serialize(TranslatorResource resource, ContentHandler handler) throws SAXException {
-
- Translator rootTranslator = resource.getRootTranslator();
- EList contents = resource.getContents();
-
- if (contents.size() != 1) {
- throw new IllegalStateException("The contents of a resource may only contain one EMF Model Object."); //$NON-NLS-1$
- }
- handler.startDocument();
- EObject element = (EObject) contents.get(0);
- serialize(handler, element, rootTranslator, new WriterHints(resource));
- handler.endDocument();
-
- }
-
- private void serialize(ContentHandler handler, EObject target, Translator translator, WriterHints hints) throws SAXException {
-
- List mofChildren = null;
- Object rawValue = null;
- EObject newTarget = null;
- Translator currentChildTranslator = null;
- Translator nextTranslator = null;
- char[] characterData = null;
- String convertedValue = null;
- Attributes attributes = null;
- String childDomName = null;
- final int version = hints.getVersion();
-
- /*
- * Processing hints are used to remember where are in the iteration of the translator's
- * children. see the TranslatorFilter for more information on how this array is used.
- */
- int[] processingHints = TranslatorFilter.createProcessingHints();
-
- String targetDomName = translator.getDOMName(target);
-
- attributes = getAttributes(translator, target, hints);
-
- handler.startElement(NAMESPACE, targetDomName, targetDomName, attributes);
-
- currentChildTranslator = TranslatorFilter.getNextObjectTranslator(translator, processingHints[TranslatorFilter.NEXT_START_HINT_INDX], processingHints, target, version);
- while (currentChildTranslator != null) {
- /* For each Child Translator of the Translator parameter passed into the method */
-
- /* Does the Translator have any MOF Children? */
- mofChildren = currentChildTranslator.getMOFChildren(target);
- openDomPathIfNecessary(handler, hints, currentChildTranslator, target, mofChildren);
-
- if (currentChildTranslator.isManagedByParent()) {
- /*
- * Translators which are managed by their parents require less processing -- just
- * convert their value to a string and write it out as the content of an XML element
- */
- childDomName = currentChildTranslator.getDOMName(target);
- if (!currentChildTranslator.isEmptyTag()) {
- /* The Translator is not an Empty tag. Its text content is significant */
-
- if (mofChildren.size() > 0) {
- for (int j = 0; j < mofChildren.size(); j++) {
-
- /* Text only translators will not have open and close XML elements */
- if (!currentChildTranslator.isDOMTextValue())
- handler.startElement(NAMESPACE, childDomName, childDomName, EMPTY_ATTRIBUTES);
-
- rawValue = mofChildren.get(j);
- /* convertValueToString should always return a non-null String */
- convertedValue = currentChildTranslator.convertValueToString(rawValue, target);
- characterData = XMLEncoderDecoder.escape(convertedValue).toCharArray();
- handler.characters(characterData, 0, characterData.length);
-
- if (!currentChildTranslator.isDOMTextValue())
- handler.endElement(NAMESPACE, childDomName, childDomName);
- }
- }
- } else {
- /*
- * The Translator is an Empty Element (its mere presence has significance) (e.g.
- * <cascade-delete/>
- */
-
- if (currentChildTranslator.isBooleanFeature()) {
- /* Boolean features may or may not be rendered */
- rawValue = mofChildren.get(0);
- if (rawValue != null && ((Boolean) rawValue).booleanValue()) {
- handler.startElement(NAMESPACE, childDomName, childDomName, EMPTY_ATTRIBUTES);
- handler.endElement(NAMESPACE, childDomName, childDomName);
- }
-
- } else {
- /* Always render any other Empty elements */
- handler.startElement(NAMESPACE, childDomName, childDomName, EMPTY_ATTRIBUTES);
- handler.endElement(NAMESPACE, childDomName, childDomName);
- }
- }
- } else {
-
- /* The Translator is a more complex feature, handle its processing recursively */
- for (int j = 0; j < mofChildren.size(); j++) {
- newTarget = (EObject) mofChildren.get(j);
- serialize(handler, newTarget, currentChildTranslator, hints);
- }
- }
-
- /* Fetch the next peer translator */
- nextTranslator = TranslatorFilter.getNextObjectTranslator(translator, processingHints[TranslatorFilter.NEXT_START_HINT_INDX], processingHints, target, version);
-
- closeDomPathIfNecessary(handler, hints, currentChildTranslator, nextTranslator, target, mofChildren);
-
- /*
- * We needed to invoke closeDomPathIfNecessary() with the peer, now we move on to
- * process that peer
- */
- currentChildTranslator = nextTranslator;
-
- }
- handler.endElement(NAMESPACE, targetDomName, targetDomName);
- }
-
- /**
- * Determines whether or not a DOM Path should be rendered. This method is particularly useful
- * for determining whether Empty XML elements are relevant and should be written to the XML
- * stream.
- *
- * @param target
- * The EMF Target of the Translation
- * @param currentChildTranslator
- * The current Translator
- * @param mofChildren
- * The mofChildren that were found for the Translator on the Target
- * @return
- */
- private boolean shouldRenderDomPath(EObject target, Translator currentChildTranslator, List mofChildren) {
- return !currentChildTranslator.isEmptyContentSignificant() || (currentChildTranslator.shouldRenderEmptyDOMPath(target) || mofChildren.size() > 0);
- }
-
- /**
- * openDomPathIfNecessary will write the current DOM Path to the serialization stream if it has
- * not been written by a previous peer translator. The processing results in the collapse of
- * Peer Translators with matching DOM Paths into a single XML parent element.
- *
- * @param handler
- * The ContentHandler which is writing the XML result
- * @param hints
- * A Global container for information specific to a single XML document
- * @param currentChildTranslator
- * The active Translator being processed
- * @param target
- * The EMF Target of the Translation
- * @throws SAXException
- */
- private void openDomPathIfNecessary(ContentHandler handler, WriterHints hints, Translator currentChildTranslator, EObject target, List mofChildren) throws SAXException {
-
- /* If the translator does not have a DOM Path, then we do nothing */
- if (currentChildTranslator.hasDOMPath() && shouldRenderDomPath(target, currentChildTranslator, mofChildren)) {
-
- String childDomPath = currentChildTranslator.getDOMPath();
-
- /*
- * IsDomPathActive() will verify whether this DOM Path has already been written to the
- * XML stream
- */
- if (!hints.isDomPathActive(childDomPath)) {
-
- /*
- * Write an open element for the DOM Path and "remember" that we have written it
- */
- handler.startElement(NAMESPACE, childDomPath, childDomPath, EMPTY_ATTRIBUTES);
- hints.pushDomPath(childDomPath);
- }
-
- }
- }
-
- /**
- * closeDomPathIfNecessary will determine whether the next peer Translator shares the active DOM
- * Path of the current Translator. If the next peer Translator has the same DOM Path, no action
- * will be taken (hence condensing the elements into a single XML parent). However, if the DOM
- * Path differs (including the Next Peer Translator has no DOM Path) then the current DOM Path
- * will be closed (a close XML element is generated.
- *
- * @param handler
- * The ContentHandler which is writing the XML result
- * @param hints
- * A Global container for information specific to a single XML document
- * @param currentChildTranslator
- * The last Translator to have completed processing
- * @param nextTranslator
- * The next peer Translator that will become active
- * @param target
- * The EMF Target of the Translation
- * @throws SAXException
- */
- private void closeDomPathIfNecessary(ContentHandler handler, WriterHints hints, Translator currentChildTranslator, Translator nextTranslator, EObject target, List mofChildren) throws SAXException {
-
- if (currentChildTranslator.hasDOMPath() && shouldRenderDomPath(target, currentChildTranslator, mofChildren)) {
- String childDomPath = currentChildTranslator.getDOMPath();
- if (nextTranslator != null) { /*
- * There are more peers after this element, we can peek
- * ahead
- */
- String nextPeerDomPath = nextTranslator.getDOMPath();
- if (nextPeerDomPath == null || !nextPeerDomPath.equals(childDomPath)) {
- handler.endElement(NAMESPACE, childDomPath, childDomPath);
- hints.popDomPath();
- }
-
- } else { /* This was the last child element, we must close the dompath */
- handler.endElement(NAMESPACE, childDomPath, childDomPath);
- hints.popDomPath();
- }
- }
- }
-
- /**
- * Aggregate the Attribute translator children from a given translator. This method will request
- * the AttributesImpl object from the WriterHints object. The WriterHints maintains this
- * reusable collection to limit the requirement for new object creation.
- *
- * @param translator
- * @param target
- * @param hints
- * @return an initialized set of Attributes for the given Translator and EMF Target
- */
- private Attributes getAttributes(Translator translator, EObject target, WriterHints hints) {
-
- AttributesImpl attributes = hints.getAttributeHolder();
- int version = hints.getVersion();
- Object rawValue = null;
- String convertedValue = null;
- String childDomName = null;
- Translator attributeTranslator = null;
- int[] processingHints = TranslatorFilter.createProcessingHints();
-
- while ((attributeTranslator = TranslatorFilter.getNextAttributeTranslator(translator, processingHints[TranslatorFilter.NEXT_START_HINT_INDX], processingHints, target, version)) != null) {
-
- List mofChildren = attributeTranslator.getMOFChildren(target);
- if (mofChildren.size() > 0) {
- for (int j = 0; j < mofChildren.size(); j++) {
-
- childDomName = attributeTranslator.getDOMName(target);
- rawValue = mofChildren.get(j);
- convertedValue = attributeTranslator.convertValueToString(rawValue, target);
- convertedValue = XMLEncoderDecoder.escape(convertedValue);
- attributes.addAttribute(NAMESPACE, childDomName, childDomName, "String", convertedValue); //$NON-NLS-1$
- }
-
- } else {
- childDomName = attributeTranslator.getDOMName(target);
- convertedValue = (String) attributeTranslator.getMOFValue(target);
- if (convertedValue != null)
- attributes.addAttribute(NAMESPACE, childDomName, childDomName, "String", convertedValue); //$NON-NLS-1$
- }
- }
- return attributes;
- }
-
- /**
- * WriterHints is used to "remember" certain pieces of information while the writer is
- * processing. Of particular interest are the version and the state of the DOM Path output.
- * Consecutive elements with consistent (identical) DOM Paths are collapsed under a single XML
- * element.
- *
- * The WriterHints provides global state between recursive invocations of serialize(). It should
- * be not be used to store local data (e.g. data that is only relevant to a single Translator in
- * a given context).
- *
- * The WriterHints also stores an AttributesImpl object that is re-used to store attributes. The
- * getAttributes() method will request the Attributes Holder.
- *
- * @author mdelder
- */
- public final class WriterHints {
- private final TranslatorResource resource;
- private final Stack domStack = new Stack();
- private final AttributesImpl attributesImpl = new AttributesImpl();
-
- public WriterHints(TranslatorResource res) {
- this.resource = res;
- }
-
- /**
- * Push a new domPath onto the stack
- *
- * @param domPath
- * a DOMPath which has been written to the XML stream
- */
- public void pushDomPath(String domPath) {
-
- if (domPath != null && domPath.length() > 0)
- domStack.push(domPath);
- }
-
- /**
- * Pop the current domPath from the Array
- */
- public void popDomPath() {
-
- if (!domStack.isEmpty())
- domStack.pop();
- }
-
- /**
- * Determines if the given DOMPath has already been written to the XML stream
- *
- * @param domPath
- * @return true if the given DOMPath has already been written to the XML stream
- */
- public boolean isDomPathActive(String domPath) {
- boolean result = false;
- if (!domStack.isEmpty()) {
-
- String currentDomPath = (String) domStack.peek();
- if (currentDomPath != null && domPath != null)
- result = currentDomPath.equals(domPath);
- else if (!(currentDomPath == null ^ domPath == null))
- result = true;
- }
-
- return result;
- }
-
- /**
- * @return the version of the EMF Resource
- */
- public int getVersion() {
- return this.resource.getVersionID();
- }
-
- /**
- * Returns an empty AttributesImpl object to store attributes. Within the context of a given
- * WriterHints object (and hence single XML document), the object returned is a singleton.
- * The same AttributesImpl object is cleared and reused for each invocation.
- *
- * @return an empty AttributesImpl object to store attributes
- */
- public AttributesImpl getAttributeHolder() {
- this.attributesImpl.clear();
- return this.attributesImpl;
- }
-
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/FileNameResourceFactoryRegistry.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/FileNameResourceFactoryRegistry.java
deleted file mode 100644
index 74b6bc5c3..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/FileNameResourceFactoryRegistry.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.resource;
-
-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.Resource.Factory;
-import org.eclipse.wst.common.internal.emf.utilities.DefaultOverridableResourceFactoryRegistry;
-
-
-public abstract class FileNameResourceFactoryRegistry extends DefaultOverridableResourceFactoryRegistry {
-
- private Map/*<String shortName, ResourceFactoryDescriptor>*/ descriptors = new HashMap();
- private Map/*<ResourceFactoryDescriptor, Resource.Factory>*/ factories = new HashMap();
-
- public FileNameResourceFactoryRegistry() {
- super();
- }
-
- /**
- * Return a Resource.Factory that is registered with the last segment of the URI's file name.
- *
- * @see org.eclipse.emf.ecore.resource.impl.ResourceFactoryRegistryImpl#getFactory(URI)
- */
- protected Object getFileNameFactory(URI uri) {
-
- if(uri != null) {
- ResourceFactoryDescriptor descriptor = getDescriptor(uri);
-
- if(descriptor != null) {
- return getFactory(descriptor);
- }
- }
- return null;
-
- }
-
- public synchronized Resource.Factory getFactory(URI uri) {
-
- Resource.Factory resourceFactory = null;
- if(uri != null && uri.lastSegment() != null) {
- ResourceFactoryDescriptor descriptor = getDescriptor(uri);
-
- if(descriptor != null) {
- resourceFactory = getFactory(descriptor);
- }
- }
- if(resourceFactory == null)
- resourceFactory = super.getFactory(uri);
- return resourceFactory;
- }
-
- /**
- * Register a file name representing the last segment of a URI with the corresponding
- * Resource.Factory.
- */
- public synchronized void registerLastFileSegment(String aSimpleFileName, Resource.Factory aFactory) {
- URI uri = URI.createURI(aSimpleFileName);
- String lastSegment = uri.lastSegment();
- addDescriptor(new StaticResourceFactoryDescriptor(lastSegment, aFactory));
- }
-
- protected final synchronized ResourceFactoryDescriptor getDescriptor(URI uri) {
- return (ResourceFactoryDescriptor) descriptors.get(uri.lastSegment());
- }
-
- protected final synchronized Resource.Factory getFactory(ResourceFactoryDescriptor descriptor) {
- Resource.Factory factory = (Factory) factories.get(descriptor);
- if(factory == null) {
- factories.put(descriptor, (factory = descriptor.createFactory()));
- }
- return factory;
- }
-
- protected final void addDescriptor(ResourceFactoryDescriptor descriptor) {
- descriptors.put(descriptor.getShortSegment(), descriptor);
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/GenericTranslator.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/GenericTranslator.java
deleted file mode 100644
index eafe09f36..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/GenericTranslator.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Mar 20, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-/**
- * Specialized translator for objects that contain simple mappings with no specialized behavior.
- */
-public class GenericTranslator extends Translator {
-
- protected Translator[] children;
-
- /**
- * @param domNameAndPath
- * @param eClass
- */
- public GenericTranslator(String domNameAndPath, EClass eClass) {
- super(domNameAndPath, eClass);
- }
-
- /**
- * @param domNameAndPath
- * @param aFeature
- */
- public GenericTranslator(String domNameAndPath, EStructuralFeature aFeature) {
- super(domNameAndPath, aFeature);
- }
-
- /**
- * @param domNameAndPath
- * @param aFeature
- * @param path
- */
- public GenericTranslator(String domNameAndPath, EStructuralFeature aFeature, TranslatorPath path) {
- super(domNameAndPath, aFeature, path);
- }
-
- /**
- * @param domNameAndPath
- * @param aFeature
- * @param paths
- */
- public GenericTranslator(String domNameAndPath, EStructuralFeature aFeature, TranslatorPath[] paths) {
- super(domNameAndPath, aFeature, paths);
- }
-
- /**
- * @param domNameAndPath
- * @param aFeature
- * @param eClass
- */
- public GenericTranslator(String domNameAndPath, EStructuralFeature aFeature, EClass eClass) {
- super(domNameAndPath, aFeature, eClass);
- }
-
- /**
- * @param domNameAndPath
- * @param aFeature
- * @param style
- */
- public GenericTranslator(String domNameAndPath, EStructuralFeature aFeature, int style) {
- super(domNameAndPath, aFeature, style);
- }
-
- /**
- * @return Translator[]
- */
- public Translator[] getChildren() {
- return children;
- }
-
- /**
- * Sets the children.
- *
- * @param children
- * The children to set
- */
- public void setChildren(Translator[] children) {
- this.children = children;
- }
-
-
- public static Translator appendChildren(GenericTranslator tran, Translator[] child) {
- Translator[] orgChild = tran.getChildren();
- Translator[] newChildren = (Translator[]) concat(orgChild, child);
- tran.setChildren(newChildren);
- return tran;
- }
-
- public static Translator appendChild(GenericTranslator tran, Translator child) {
- Object[] orgChild = tran.getChildren();
- Translator[] newChildren = (Translator[]) concat(orgChild, child);
- tran.setChildren(newChildren);
- return tran;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/IDTranslator.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/IDTranslator.java
deleted file mode 100644
index 15755f0e2..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/IDTranslator.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Mar 19, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.xmi.XMIResource;
-
-/**
- * @author schacher
- */
-public class IDTranslator extends Translator {
- public class NoResourceException extends RuntimeException {
-
- public NoResourceException() {
- super();
- }
-
- public NoResourceException(String s) {
- super(s);
- }
- }
-
- static final public EStructuralFeature ID_FEATURE = EcorePackage.eINSTANCE.getEClass_EIDAttribute();
- static final public IDTranslator INSTANCE = new IDTranslator();
-
- public IDTranslator() {
- super("id", ID_FEATURE, DOM_ATTRIBUTE); //$NON-NLS-1$
- }
-
- public void setMOFValue(EObject emfObject, Object value) {
- XMIResource res = (XMIResource) emfObject.eResource();
- if (res == null)
- throw new NoResourceException();
- String id = res.getID(emfObject);
- if (id == null && value == null)
- return;
- if ((id != null && !id.equals(value)) || (value != null && !value.equals(id)))
- res.setID(emfObject, (String) value);
- }
-
- public Object getMOFValue(EObject emfObject) {
- if (emfObject == null)
- throw new NoResourceException();
- XMIResource res = (XMIResource) emfObject.eResource();
- if (res == null)
- throw new NoResourceException();
- return res.getID(emfObject);
- }
-
-
- public boolean featureExists(EObject emfObject) {
- return true;
- }
-
- public boolean isIDMap() {
- return true;
- }
-
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/LinkUpdaterTarget.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/LinkUpdaterTarget.java
deleted file mode 100644
index f5cd1f99b..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/LinkUpdaterTarget.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.resource;
-
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.w3c.dom.Node;
-
-
-public class LinkUpdaterTarget extends Object {
-
- public static final LinkUpdaterTarget INSTANCE = new LinkUpdaterTarget();
-
- /**
- * Constructor for LinkUpdaterMultiTarget.
- *
- * @param adapter
- */
- private LinkUpdaterTarget() {
- super();
- }
-
-
- public void updateDOM(Translator map, Node node, EObject mofObject) {
- refreshSourceObjects(map, node, mofObject, true);
- }
-
- public void updateMOF(Translator map, Node node, EObject mofObject) {
- refreshSourceObjects(map, node, mofObject, false);
- }
-
- protected void refreshSourceObjects(Translator map, Node node, EObject mofObject, boolean domUpdate) {
- TranslatorPath[] paths = map.getTranslatorPaths();
- for (int i = 0; i < paths.length; i++) {
- TranslatorPath path = paths[i];
- List allSourceObjects = path.findObjects(mofObject);
- for (Iterator iter = allSourceObjects.iterator(); iter.hasNext();) {
- EObject curObject = (EObject) iter.next();
- EMF2DOMAdapter curAdapter = (EMF2DOMAdapter) EcoreUtil.getAdapter(curObject.eAdapters(), EMF2DOMAdapter.class);
- if (curAdapter != null) {
- if (domUpdate)
- curAdapter.updateDOM();
- else
- curAdapter.updateMOF();
- }
- }
- }
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/MappedXMIHelper.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/MappedXMIHelper.java
deleted file mode 100644
index ac27864eb..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/MappedXMIHelper.java
+++ /dev/null
@@ -1,295 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.resource;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.URIConverter;
-import org.eclipse.emf.ecore.resource.impl.URIConverterImpl;
-import org.eclipse.emf.ecore.xmi.XMLHelper;
-import org.eclipse.emf.ecore.xmi.XMLResource;
-import org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl;
-import org.eclipse.wst.common.internal.emf.utilities.IDUtil;
-
-public class MappedXMIHelper extends XMLHelperImpl {
-
- private static final String WORKSPACE_PROTOCOL = "workspace:/"; //$NON-NLS-1$
- private static final String PLATFORM_RESOURCE_PROTOCOL = "platform:/resource/"; //$NON-NLS-1$
- private static final EStructuralFeature NULL_FEATURE = new UnsupportedFeature();
- protected boolean usingMaps = true;
- protected Map cachedRelativeURIs;
- protected Map packageURIsToPrefixes;
-
- /**
- * Constructor for MappedXMLHelper.
- *
- * @param resource
- */
- public MappedXMIHelper(XMLResource resource, Map prefixesToURIs) {
- super(resource);
- this.prefixesToURIs.putAll(prefixesToURIs);
- pushContext(); //Needed to initialize the context to zero
- Set keys = prefixesToURIs.keySet();
- for (Iterator iter = keys.iterator(); iter.hasNext();) {
- String prefix = (String) iter.next();
- String uri = (String) prefixesToURIs.get(prefix);
- namespaceSupport.declarePrefix(prefix, uri);
- }
-
- }
-
- public URI resolve(URI relative, URI base) {
- URI resolved = null;
- boolean isMapped = false;
- ResourceSet set = getResource().getResourceSet();
- if (set != null) {
- URI localresourceURI = null;
- if (relative.hasFragment())
- localresourceURI = relative.trimFragment();
- else
- localresourceURI = relative;
- isMapped = !(((URIConverterImpl.URIMap) set.getURIConverter().getURIMap()).getURI(localresourceURI).equals(localresourceURI));
- }
- if (!isMapped) {
- if (isUsingContainerRelativePaths() && set != null)
- resolved = set.getURIConverter().normalize(relative);
- } else {
- resolved = relative;
- }
- return resolved == null ? super.resolve(relative, base) : resolved;
- }
-
- /**
- * Method isUsingContainerRelativePaths.
- *
- * @return boolean
- */
- private boolean isUsingContainerRelativePaths() {
- return ((CompatibilityXMIResource) resource).getFormat() == CompatibilityXMIResource.FORMAT_MOF5 || usingMaps;
- }
-
- public void addPrefix(String prefix, String uri) {
- /*
- * problem - the incoming key value pair is ejbbnd->ejbbnd.xmi; however, the map already has
- * a key value pair of ejbbnd->http:///ejbbnd.ecore
- */
- if (uri.endsWith(".ecore")) { //$NON-NLS-1$
- usingMaps = false;
- }
- String existing = (String) prefixesToURIs.get(prefix);
- if (existing == null) {
- prefixesToURIs.put(prefix, uri);
- namespaceSupport.declarePrefix(prefix, uri);
- } else if (!existing.equals(uri)) {
- getCompatibilityResource().addOriginalPackageURI(existing, uri);
- getCompatibilityResource().setFormat(CompatibilityXMIResource.FORMAT_MOF5);
- }
- }
-
- protected CompatibilityXMIResource getCompatibilityResource() {
- return (CompatibilityXMIResource) getResource();
- }
-
- /**
- * @see org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl#getHREF(EObject)
- */
- public String getHREF(EObject obj) {
- if (!getCompatibilityResource().usesDefaultFormat()) {
- URIConverter conv = getURIConverter();
- if (conv != null && conv instanceof CompatibilityURIConverter) {
- String href = getCompatibliltyHREF(obj, (CompatibilityURIConverter) conv);
- return useWorkspaceProtocolIfNecessary(href);
- }
- }
- return super.getHREF(obj);
- }
-
-
- /**
- * @param href
- * @return
- */
- protected String useWorkspaceProtocolIfNecessary(String href) {
- if (href != null && href.startsWith(PLATFORM_RESOURCE_PROTOCOL))
- return WORKSPACE_PROTOCOL + href.substring(19);
- return href;
- }
-
- private String getCompatibliltyHREF(EObject obj, CompatibilityURIConverter conv) {
- //Implementation copied from super.getHREF(EObject)
- InternalEObject o = (InternalEObject) obj;
-
- URI objectURI = o.eProxyURI();
- if (objectURI == null) {
- Resource otherResource = obj.eResource();
- if (otherResource == null) {
- objectURI = handleDanglingHREF(obj);
- if (objectURI == null) {
- return null;
- }
- } else
- objectURI = otherResource.getURI().appendFragment(otherResource.getURIFragment(obj));
- }
-
- //Modified to dispatch back to URI Converter
- if (!objectURI.isRelative()) {
- objectURI = makeRelative(objectURI, conv);
- }
- return objectURI.toString();
- }
-
- protected URI makeRelative(URI objectURI, CompatibilityURIConverter conv) {
- String fragment = objectURI.fragment();
- objectURI = objectURI.trimFragment();
- URI relative = (URI) getCachedRelativeURIs().get(objectURI);
- if (relative == null) {
- relative = conv.deNormalize(objectURI);
- if (relative.isRelative())
- cachedRelativeURIs.put(objectURI, relative);
- }
- return relative.appendFragment(fragment);
- }
-
- protected URIConverter getURIConverter() {
- ResourceSet set = getResource().getResourceSet();
- if (set != null)
- return set.getURIConverter();
- return null;
- }
-
- protected Map getCachedRelativeURIs() {
- if (cachedRelativeURIs == null)
- cachedRelativeURIs = new HashMap();
- return cachedRelativeURIs;
- }
-
- /**
- * @see org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl#getID(EObject)
- */
- public String getID(EObject obj) {
- if (getCompatibilityResource().usesDefaultFormat())
- return super.getID(obj);
- return IDUtil.getOrAssignID(obj, resource);
- }
-
- public String[] getNSInfo(EPackage pkg) {
- String prefix = getMappedPrefix(pkg);
- if (prefix == null)
- return new String[]{pkg.getNsPrefix(), pkg.getNsURI()};
- return new String[]{prefix, prefix + ".xmi"}; //$NON-NLS-1$
- }
-
- protected String getMappedPrefix(EPackage pkg) {
- String nsURI = pkg.getNsURI();
- if (usingMaps || !getCompatibilityResource().usesDefaultFormat())
- return (String) packageURIsToPrefixes.get(nsURI);
- return null;
- }
-
- protected String getMappedPrefixOrDefault(EPackage pkg) {
- String prefix = getMappedPrefix(pkg);
- return prefix == null ? pkg.getNsPrefix() : prefix;
- }
-
-
- /**
- * Returns the packageURIsToPrefixes.
- *
- * @return Map
- */
- public Map getPackageURIsToPrefixes() {
- return packageURIsToPrefixes;
- }
-
- /**
- * Sets the packageURIsToPrefixes.
- *
- * @param packageURIsToPrefixes
- * The packageURIsToPrefixes to set
- */
- public void setPackageURIsToPrefixes(Map packageURIsToPrefixes) {
- this.packageURIsToPrefixes = packageURIsToPrefixes;
- }
-
- public String getQName(EClass c) {
- String name = getName(c);
-
- if (xmlMap != null) {
- XMLResource.XMLInfo clsInfo = xmlMap.getInfo(c);
-
- if (clsInfo != null) {
- String targetNamespace = clsInfo.getTargetNamespace();
- return getQName(targetNamespace, name);
- }
- }
-
- EPackage p = c.getEPackage();
- packages.put(p, null);
-
- if (p.getNsPrefix().equals("")) //$NON-NLS-1$
- return name;
-
- //Modified from superclass
- //return p.getNsPrefix() + ":" + name;
- return getMappedPrefixOrDefault(p) + ":" + name; //$NON-NLS-1$
- }
-
- /**
- * @see org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl#setValue(EObject, EStructuralFeature,
- * Object, int)
- */
- public void setValue(EObject object, EStructuralFeature feature, Object value, int position) {
- if (feature == NULL_FEATURE)
- return;
- if (!feature.isTransient()) {
- if (value == null && feature.getEType().getInstanceClass() != null && feature.getEType().getInstanceClass().isPrimitive())
- //For compatibility with MOF5 where types like Integer might have been set
- //and serialized as "xsi:nil"
- return;
-
- super.setValue(object, feature, value, position);
- }
- }
-
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.ecore.xmi.XMLHelper#getFeature(org.eclipse.emf.ecore.EClass,
- * java.lang.String, java.lang.String, boolean)
- */
- public EStructuralFeature getFeature(EClass eClass, String namespaceURI, String name, boolean isElement) {
- if (UnsupportedFeature.isUnsupported(eClass, name))
- return NULL_FEATURE;
- return super.getFeature(eClass, namespaceURI, name, isElement);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.ecore.xmi.XMLHelper#getFeatureKind(org.eclipse.emf.ecore.EStructuralFeature)
- */
- public int getFeatureKind(EStructuralFeature feature) {
- if (feature == NULL_FEATURE)
- return XMLHelper.DATATYPE_SINGLE;
- return super.getFeatureKind(feature);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/MultiObjectTranslator.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/MultiObjectTranslator.java
deleted file mode 100644
index abfcc8334..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/MultiObjectTranslator.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Mar 31, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-/**
- * @author schacher
- */
-public abstract class MultiObjectTranslator extends Translator {
- private static final Translator[] EMPTY_TRANSLATORS = new Translator[]{};
-
- /**
- * @param domNameAndPath
- * @param aFeature
- * @param style
- */
- public MultiObjectTranslator(String domNameAndPath, EStructuralFeature aFeature) {
- super(domNameAndPath, aFeature);
- }
-
- public abstract Translator getDelegateFor(EObject o);
-
- public abstract Translator getDelegateFor(String domName, String readAheadName);
-
-
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.Translator#createEMFObject(java.lang.String,
- * java.lang.String)
- */
- public EObject createEMFObject(String nodeName, String readAheadName) {
- return getDelegateFor(nodeName, readAheadName).createEMFObject(nodeName, readAheadName);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.Translator#getChildren(java.lang.Object)
- */
- public Translator[] getChildren(Object o, int version) {
- if (o == null)
- return EMPTY_TRANSLATORS;
- return getDelegateFor((EObject) o).getChildren(o, version);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.Translator#getDOMName(java.lang.Object)
- */
- public String getDOMName(Object value) {
- return getDelegateFor((EObject) value).getDOMName(value);
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.Translator#isManagedByParent()
- */
- public boolean isManagedByParent() {
- return false;
- }
-
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/NamespaceTranslator.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/NamespaceTranslator.java
deleted file mode 100644
index b266883e3..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/NamespaceTranslator.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Aug 14, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.wst.common.internal.emf.utilities.Namespace;
-import org.eclipse.wst.common.internal.emf.utilities.NamespaceAdapter;
-
-
-/**
- * @author schacher
- */
-public class NamespaceTranslator extends Translator {
-
- protected String prefix;
-
- /**
- * @param domNameAndPath
- * @param aFeature
- */
- public NamespaceTranslator(String domName) {
- super(domName, NamespaceAdapter.NOTIFICATION_FEATURE, DOM_ATTRIBUTE);
- initPrefix();
- }
-
- private void initPrefix() {
- String dName = getDOMName(null);
- prefix = dName.substring(DefaultTranslatorFactory.XMLNS.length());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.Translator#setMOFValue(org.eclipse.emf.ecore.EObject,
- * java.lang.Object)
- */
- public void setMOFValue(EObject emfObject, Object value) {
- NamespaceAdapter.addNamespace(prefix, (String) value, emfObject);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.Translator#isSetMOFValue(org.eclipse.emf.ecore.EObject)
- */
- public boolean isSetMOFValue(EObject emfObject) {
- return getMOFValue(emfObject) != null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.Translator#getMOFValue(org.eclipse.emf.ecore.EObject)
- */
- public Object getMOFValue(EObject mofObject) {
- return NamespaceAdapter.getNamespaceURIAtThisLevel(prefix, mofObject);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.Translator#unSetMOFValue(org.eclipse.emf.ecore.EObject)
- */
- public void unSetMOFValue(EObject emfObject) {
- NamespaceAdapter.removeNamespace(prefix, emfObject);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.Translator#featureExists(org.eclipse.emf.ecore.EObject)
- */
- public boolean featureExists(EObject emfObject) {
- return true;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.Translator#isDataType()
- */
- public boolean isDataType() {
- return true;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.Translator#isMapFor(java.lang.Object, java.lang.Object,
- * java.lang.Object)
- */
- public boolean isMapFor(Object aFeature, Object oldValue, Object newValue) {
- if (aFeature == feature) {
- Namespace namespace = (Namespace) (oldValue == null ? newValue : oldValue);
- if (namespace != null)
- return prefix.equals(namespace.getPrefix());
- }
- return false;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ObjectTranslatorFilter.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ObjectTranslatorFilter.java
deleted file mode 100644
index 918b9ce85..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ObjectTranslatorFilter.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-/*
- * Created on Sep 21, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-
-public final class ObjectTranslatorFilter extends TranslatorFilter {
-
- public ObjectTranslatorFilter() {
- super(null, -1);
- }
-
- public ObjectTranslatorFilter(Translator trans, int version) {
- super(trans, version);
- }
-
- public final int scanNextTranslator(Translator[] children, int start) {
- int found = start + 1;
- for (; found < children.length; ++found) {
- if (!children[found].isDOMAttribute())
- break;
- }
- found = (found < children.length) ? found : -1;
- return found;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ReadAheadHelper.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ReadAheadHelper.java
deleted file mode 100644
index a7d1a23f8..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ReadAheadHelper.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Apr 2, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-/**
- * @author schacher
- */
-public class ReadAheadHelper {
-
- protected String parentDOMName;
- protected String[] values;
- protected String childDOMName;
-
- public ReadAheadHelper(String parentDOMName, String[] values, String childDOMName) {
- super();
- this.parentDOMName = parentDOMName;
- this.values = values;
- this.childDOMName = childDOMName;
- }
-
- /**
- * @return
- */
- public String getChildDOMName() {
- return childDOMName;
- }
-
- /**
- * @return
- */
- public String getParentDOMName() {
- return parentDOMName;
- }
-
- /**
- * @return
- */
- public String[] getValues() {
- return values;
- }
-
- /**
- * @param string
- */
- public void setChildDOMName(String string) {
- childDOMName = string;
- }
-
- /**
- * @param string
- */
- public void setParentDOMName(String string) {
- parentDOMName = string;
- }
-
- /**
- * @param strings
- */
- public void setValues(String[] strings) {
- values = strings;
- }
-
-
- public boolean nodeValueIsReadAheadName(String nodeName) {
-
- return (childDOMName != null) ? childDOMName.equals(nodeName) : false;
- }
-
- public boolean nodeNameIsReadAheadName(String nodeName) {
- boolean result = false;
- for (int i = 0; i < values.length; i++) {
- if (nodeName.equals(values[i])) {
- result = true;
- break;
- }
- }
- return result;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ReferencedResource.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ReferencedResource.java
deleted file mode 100644
index 4aafc233a..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ReferencedResource.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.resource;
-
-
-
-import org.eclipse.emf.ecore.resource.Resource;
-
-public interface ReferencedResource extends Resource, CompatibilityXMIResource {
- //TODO - rename packaged
-
- public static final String DELETED_ERROR_MSG = "This resource has been deleted and can no longer be used."; //$NON-NLS-1$
-
- public static final int RESOURCE_WAS_SAVED = 601;
-
- /**
- * A flag used to indicate a ReferencedResource is about
- * to save.
- */
- public static final int RESOURCE_ABOUT_TO_SAVE = 602;
-
- /**
- * A flag used to indicate a ReferencedResource has failed
- * to save.
- */
- public static final int RESOURCE_SAVE_FAILED = 603;
-
- /**
- * Access this resource for read only. This call increments the use read count of this resource.
- * Clients should call this method before they use the resource. They should call
- * releaseFromRead() after they are done modifying this resource.
- */
- void accessForRead();
-
- /**
- * Access this resource for write only. This call increments the use write count of this
- * resource. Clients should call this method before they modify the resource. They should call
- * releaseFromWrite() after they are done modifying this resource.
- */
- void accessForWrite();
-
- /**
- * Return true if this resource has just been loaded and not yet accessed for read or write.
- */
- boolean isNew();
-
- /**
- * Return true if this resource does not have any write references.
- */
- boolean isReadOnly();
-
- /**
- * Return true if this resource is shared for read or write by more than one accessor.
- */
- boolean isShared();
-
- /**
- * Return true if this resource is shared for write by more than one accessor.
- */
- boolean isSharedForWrite();
-
- /**
- * Release read the access to this resource. This call decrements the use count of this resource
- * and will remove the resource from its resource set if the use count goes to 0. Clients should
- * call this method when they are done accessing the resource and only after they have called
- * accessForRead() to obtain access.
- */
- void releaseFromRead();
-
- /**
- * Release write the access to this resource. This call decrements the write count of this
- * resource and will remove the resource from its resource set if the use count goes to 0.
- * Clients should call this method when they are done accessing the resource and only after they
- * have called accessForWrite() to obtain access.
- */
- void releaseFromWrite();
-
- /**
- * Saves this resource only if the write count is equal to 1.
- */
- void saveIfNecessary() throws Exception;
-
- /**
- * Return true if this resource is dirty and is not shared for write.
- */
- boolean needsToSave();
-
-
-
- /**
- * Set whether we should allow a refresh to take place even when this resource is dirty.
- *
- * @param b
- */
- void setForceRefresh(boolean b);
-
- /**
- * Return whether we should allow a refresh to take place even when this resource is dirty.
- */
- boolean shouldForceRefresh();
-
- boolean wasReverted();
-
- /**
- * Returns the number of open read accesses on this resource
- *
- * @return
- */
- int getReadCount();
-
- /**
- * Returns the number of open write accesses on this resource
- *
- * @return
- */
- int getWriteCount();
-
- /**
- * If the resource is no longer being accessed, then remove it from the resource set.
- */
- void unloadIfNecessary();
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ReferencedXMIFactoryImpl.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ReferencedXMIFactoryImpl.java
deleted file mode 100644
index d891c2cda..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ReferencedXMIFactoryImpl.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.resource;
-
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
-
-public class ReferencedXMIFactoryImpl extends ResourceFactoryImpl {
-
- protected static List globalAdapterFactories;
- protected List localAdapterFactories;
-
- /**
- * ReferencedXMIFactoryImpl constructor comment.
- */
- public ReferencedXMIFactoryImpl() {
- super();
- }
-
- /**
- * This is the method that subclasses can override to actually instantiate a new Resource
- *
- * @param uri
- * @return
- */
- protected Resource doCreateResource(URI uri) {
- return new ReferencedXMIResourceImpl(uri);
- }
-
- /**
- * @see org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl#createResource(URI)
- */
- public final Resource createResource(URI uri) {
- Resource res = doCreateResource(uri);
- adaptNew(res);
- return res;
- }
-
- protected void adaptNew(Resource res) {
- if (globalAdapterFactories != null) {
- for (int i = 0; i < globalAdapterFactories.size(); i++) {
- AdapterFactory factory = (AdapterFactory) globalAdapterFactories.get(i);
- factory.adaptAllNew(res);
- }
- }
- if (localAdapterFactories != null) {
- for (int i = 0; i < localAdapterFactories.size(); i++) {
- AdapterFactory factory = (AdapterFactory) localAdapterFactories.get(i);
- factory.adaptAllNew(res);
- }
- }
- }
-
- /**
- * The local adapter factory is an adapter factory that you use to only adapt the resource
- * specific to the ResourceFactory instance.
- *
- * @param factory
- */
- public void addLocalAdapterFactory(AdapterFactory factory) {
- if (localAdapterFactories == null)
- localAdapterFactories = new ArrayList(3);
- localAdapterFactories.add(factory);
- }
-
- public void removeLocalAdapterFactory(AdapterFactory factory) {
- if (localAdapterFactories != null)
- localAdapterFactories.remove(factory);
- }
-
- /**
- * A global adapter factory will be used to adapt any resource created by any ResourceFactory
- * instance.
- *
- * @param factory
- */
- public static void addGlobalAdapterFactory(AdapterFactory factory) {
- if (globalAdapterFactories == null)
- globalAdapterFactories = new ArrayList(3);
- globalAdapterFactories.add(factory);
- }
-
- public static void removeGlobalAdapterFactory(AdapterFactory factory) {
- if (globalAdapterFactories != null)
- globalAdapterFactories.remove(factory);
- }
-}
-
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ReferencedXMIResourceImpl.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ReferencedXMIResourceImpl.java
deleted file mode 100644
index df07748ac..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ReferencedXMIResourceImpl.java
+++ /dev/null
@@ -1,401 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.resource;
-
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.common.notify.impl.NotificationImpl;
-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.Resource;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.wst.common.internal.emf.utilities.IDUtil;
-
-public class ReferencedXMIResourceImpl extends CompatibilityXMIResourceImpl implements ReferencedResource {
- //TODO Add toString hook
- private static final String TO_STRING = "ReferencedXMIResource, file = "; //$NON-NLS-1$
- private static final String READ_COUNT_TO_STRING = " R= "; //$NON-NLS-1$
- private static final String WRITE_COUNT_TO_STRING = " W= "; //$NON-NLS-1$
-
- private int readReferenceCount = 1;
- private int editReferenceCount = 0;
- protected boolean isNew = true;
- protected boolean forceRefresh;
-
- public static class ESynchronizedAdapterList extends EAdapterList
- {
-
- public ESynchronizedAdapterList(Notifier notifier) {
- super(notifier);
- }
-
- public synchronized boolean add(Object object)
- {
- return super.add(object);
- }
-
- public synchronized void add(int index, Object object)
- {
- super.add(index, object);
- }
-
- public synchronized boolean addAll(Collection collection)
- {
- return super.addAll(collection);
- }
-
- public synchronized boolean remove(Object object)
- {
- return super.remove(object);
- }
-
- public synchronized Object remove(int index)
- {
- return super.remove(index);
- }
-
- public synchronized boolean removeAll(Collection collection)
- {
- return super.removeAll(collection);
- }
-
- public synchronized void clear()
- {
- super.clear();
- }
-
-
- public synchronized Object set(int index, Object object)
- {
- return super.set(index, object);
- }
-
- public synchronized void move(int newPosition, Object object)
- {
- super.move(newPosition, object);
- }
-
- public synchronized Object move(int newPosition, int oldPosition)
- {
- return super.move(newPosition, oldPosition);
- }
- }
-
-
- /**
- * ReferencableXMIResourceImpl constructor comment.
- */
- public ReferencedXMIResourceImpl() {
- super();
- }
-
- public ReferencedXMIResourceImpl(URI uri) {
- super(uri);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.internal.emf.resource.ReferencedResource#getReadCount()
- */
- public int getReadCount() {
- return readReferenceCount;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.internal.emf.resource.ReferencedResource#getWriteCount()
- */
- public int getWriteCount() {
- return editReferenceCount;
- }
-
-
-
- /*
- * @see ReferencedResource#accessForRead
- */
- public void accessForRead() {
- checkDeleted();
- if (!isNew())
- readReferenceCount++;
- isNew = false;
- }
-
- /*
- * @see ReferencedResource#accessForWrite
- */
- public void accessForWrite() {
- checkDeleted();
- editReferenceCount++;
- if (isNew)
- releaseFromRead();
- isNew = false;
- if (!isTrackingModification())
- setTrackingModification(true);
- }
-
- /*
- * Check if this resource has been removed and throw an exception if it does not have a
- * ResourceSet.
- */
- protected void checkDeleted() {
- if (getResourceSet() == null)
- throw new RuntimeException(DELETED_ERROR_MSG);
- }
-
- /**
- *
- */
- public void collectContainedObjects(java.util.List collecting, EObject parentObject) {
-
- java.util.Iterator children = parentObject.eContents().iterator();
- while (children.hasNext()) {
- EObject child = (EObject) children.next();
- collecting.add(child);
- collectContainedObjects(collecting, child);
- }
- }
-
- /**
- *
- */
- public void ensureFullIDHydration() {
- List allRefObjects = new ArrayList();
- Iterator rootObjects = getContents().iterator();
- while (rootObjects.hasNext()) {
- EObject child = (EObject) rootObjects.next();
- allRefObjects.add(child);
- collectContainedObjects(allRefObjects, child);
- }
-
- Iterator iter = allRefObjects.iterator();
- while (iter.hasNext())
- IDUtil.assignID((EObject) iter.next(), this);
- }
-
- /**
- * If the resource is no longer being accessed, then remove it from the resource set.
- */
- public void unloadIfNecessary() {
- if ((getTotalReferenceCount() <= 0) || (editReferenceCount <= 0 && isModified()))
- unload();
- }
-
- /**
- * Return the number of write accesses to this resource.
- *
- * @return int The number of references.
- */
- protected int getTotalReferenceCount() {
- return editReferenceCount + readReferenceCount;
- }
-
- /*
- * @see ReferencedResource#isNew
- */
- public boolean isNew() {
- return isNew;
- }
-
- /*
- * @see ReferencedResource#isReadOnly
- */
- public boolean isReadOnly() {
- return editReferenceCount <= 0;
- }
-
- /*
- * @see ReferencedResource#isShared
- */
- public boolean isShared() {
- return getTotalReferenceCount() > 1;
- }
-
- /*
- * @see ReferencedResource#isSharedForWrite
- */
- public boolean isSharedForWrite() {
- return editReferenceCount > 1;
- }
-
- /**
- * @see ReferencedResource#preDelete
- */
- public void preDelete() {
- }
-
- /*
- * @see ReferencedResource#releaseFromRead
- */
- public void releaseFromRead() {
- readReferenceCount--;
- if (readReferenceCount < 0)
- throw new RuntimeException("Read reference count error: " + this.toString()); //$NON-NLS-1$
- unloadIfNecessary();
- }
-
- /*
- * @see ReferencedResource#releaseFromWrite
- */
- public void releaseFromWrite() {
- editReferenceCount--;
- if (editReferenceCount < 0)
- throw new RuntimeException("Write reference count error: " + this.toString()); //$NON-NLS-1$
- unloadIfNecessary();
- }
-
- /*
- * @see ReferencedResource#saveIfNecessary
- */
- public void saveIfNecessary() throws Exception {
- if (!isSharedForWrite()) // caller is the only referencer
- save(Collections.EMPTY_MAP);
- }
-
- public String toString() {
- return TO_STRING + getURI().toString() + READ_COUNT_TO_STRING + new Integer(readReferenceCount) + WRITE_COUNT_TO_STRING + new Integer(editReferenceCount);
- }
-
- /*
- * @see ReferencedResource#needsToSave()
- */
- public boolean needsToSave() {
- return isModified() && !isSharedForWrite();
- }
-
-
- /**
- * @see ReferencedResource#setForceRefresh(boolean)
- */
- public void setForceRefresh(boolean b) {
- forceRefresh = b;
- }
-
- /**
- * @see ReferencedResource#shouldForceRefresh()
- */
- public boolean shouldForceRefresh() {
- return forceRefresh;
- }
-
- protected void basicDoLoad(InputStream arg0, Map arg1) throws IOException {
- boolean isTrackingMods = isTrackingModification();
- try {
- if (isTrackingMods)
- setTrackingModification(false);
- super.basicDoLoad(arg0, arg1);
- } finally {
- if (isTrackingMods)
- setTrackingModification(true);
- }
- }
-
- /**
- * @see org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl#doUnload()
- */
- protected void doUnload() {
- if (isTrackingModification() && editReferenceCount < 1) //do not turn off modification if
- // we still have a write count
- setTrackingModification(false);
- super.doUnload();
- setForceRefresh(false);
- setModified(false); //dcb - this is required to ensure that resources without files are
- // marked as not modified.
- if (readReferenceCount == 0 && editReferenceCount == 0)
- resetAsNew();
- }
-
-
- /**
- * The resource has been unloaded, and there are no references. Treat the resource like a new
- * Resource
- */
- private void resetAsNew() {
- readReferenceCount = 1;
- isNew = true;
- }
-
- /**
- * @see Resource#save(Object)
- */
- public void save(Map options) throws IOException {
- notifyAboutToSave();
- try {
- super.save(options);
- } catch (Exception e) {
- notifySaveFailed();
- if (e instanceof IOException)
- throw (IOException) e;
- else
- Logger.getLogger().write(e);
- }
- notifySaved();
- }
-
- protected void notifySaved() {
- notifySaveEvent(RESOURCE_WAS_SAVED);
- }
-
- protected void notifyAboutToSave() {
- notifySaveEvent(RESOURCE_ABOUT_TO_SAVE);
- }
-
- protected void notifySaveFailed() {
- notifySaveEvent(RESOURCE_SAVE_FAILED);
- }
-
- private void notifySaveEvent(int eventType) {
- if (eNotificationRequired()) {
- Notification notification =
- new NotificationImpl(eventType, this, this)
- {
- public Object getNotifier()
- {
- return ReferencedXMIResourceImpl.this;
- }
- public int getFeatureID(Class expectedClass)
- {
- return eventType;
- }
- };
- eNotify(notification);
- }
- }
-
- /**
- * @see com.ibm.etools.emf.workbench.ReferencedResource#wasReverted()
- */
- public boolean wasReverted() {
- return false;
- }
-
- public EList eAdapters()
- {
- if (eAdapters == null)
- {
- eAdapters = new ESynchronizedAdapterList(this);
- }
- return eAdapters;
- }
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/Renderer.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/Renderer.java
deleted file mode 100644
index 6768cd178..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/Renderer.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.resource;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Map;
-
-/**
- * Interface that defines the api for rendering an EMF object to XML and vice versa
- */
-public interface Renderer {
-
- public static final String JAXP_SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage"; //$NON-NLS-1$
-
- public static final String W3C_XML_SCHEMA = "http://www.w3.org/2001/XMLSchema"; //$NON-NLS-1$
-
- void setResource(TranslatorResource aResource);
-
- TranslatorResource getResource();
-
- void doLoad(InputStream in, Map options) throws IOException;
-
- void doSave(OutputStream outputStream, Map options) throws IOException;
-
- boolean useStreamsForIO();
-
- void prepareToAddContents();
-
- int getVersionID();
-
- boolean isModified();
-
- void accessForWrite();
-
- void accessForRead();
-
- void releaseFromRead();
-
- void releaseFromWrite();
-
- void preDelete();
-
- void preUnload();
-
- boolean isShared();
-
- boolean isSharedForWrite();
-
- void setBatchMode(boolean isBatch);
-
- boolean isBatchMode();
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/RendererFactory.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/RendererFactory.java
deleted file mode 100644
index 9f294d32a..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/RendererFactory.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.resource;
-
-import java.lang.ref.WeakReference;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-
-
-public abstract class RendererFactory {
-
- public abstract Renderer createRenderer();
-
- private static RendererFactory defaultRendererFactory;
-
- private static RendererFactoryDefaultHandler defaultHandler;
-
- private boolean validating = true;
-
- /**
- * Interested parties can use the
- */
- public final static Notifier NotificationEngine = Notifier.INSTANCE;
-
- /**
- * @return
- */
- public static RendererFactory getDefaultRendererFactory() {
- if (defaultRendererFactory == null)
- defaultRendererFactory = getDefaultHandler().getDefaultRendererFactory();
- return defaultRendererFactory;
- }
-
- /**
- * @param factory
- */
- public static void setDefaultRendererFactory(RendererFactory factory) {
-
- //System.out.println("\n\n***Setting factory: " + factory);
- NotificationEngine.notifyListeners(factory);
- defaultRendererFactory = factory;
- }
-
- public String toString() {
- return "RendererFactory instance: " + getClass().getName(); //$NON-NLS-1$
- }
-
- public static class Notifier {
-
- private static final Notifier INSTANCE = new Notifier();
-
- private final Collection resourceFactoryListeners = new ArrayList();
-
- private Notifier() {
- }
-
- public void notifyListeners(RendererFactory rendererFactory) {
-
- final int length = resourceFactoryListeners.size();
- //System.out.println("Notifying " + length + " listeners");
-
- if (length > 0) {
- /*
- * Since the renderer factories are singletons, this reference check should always
- * work
- */
- if (rendererFactory != RendererFactory.getDefaultRendererFactory()) {
- WeakReference wref = null;
- Listener listener = null;
- synchronized (resourceFactoryListeners) {
- for (Iterator i = resourceFactoryListeners.iterator(); i.hasNext();) {
- wref = (WeakReference) i.next();
- listener = (Listener) wref.get();
- //System.out.println("Notifying Listener: " + listener);
- if (listener != null)
- listener.updateRendererFactory(rendererFactory);
- else
- i.remove();
- }
- }
- }
- }
- }
-
- public void addListener(Listener l) {
- //System.out.println("Adding listener: " + l);
- synchronized (resourceFactoryListeners) {
- resourceFactoryListeners.add(new WeakReference(l));
- }
- }
-
- public void removeListener(Listener listenerToRemove) {
- final int length = resourceFactoryListeners.size();
- if (length > 0) {
- WeakReference wref = null;
- Listener listener = null;
- synchronized (resourceFactoryListeners) {
- for (Iterator i = resourceFactoryListeners.iterator(); i.hasNext();) {
- wref = (WeakReference) i.next();
- listener = (Listener) wref.get();
- if (listener != null) {
- if (listener == listenerToRemove) {
- i.remove();
- break;
- }
- } else {
- i.remove();
- }
- }
- }
- }
- }
-
- }
-
- public interface Listener {
- void updateRendererFactory(RendererFactory newRendererFactory);
- }
-
- /**
- * @return
- */
- public boolean isValidating() {
- return validating;
- }
-
- /**
- * @param b
- */
- public void setValidating(boolean b) {
- validating = b;
- }
-
- /**
- * @return
- */
- public static RendererFactoryDefaultHandler getDefaultHandler() {
- if (defaultHandler == null)
- defaultHandler = EMF2DOMRendererFactoryDefaultHandler.INSTANCE;
- return defaultHandler;
- }
-
- /**
- * @param handler
- */
- public static void setDefaultHandler(RendererFactoryDefaultHandler handler) {
- defaultHandler = handler;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/RendererFactoryDefaultHandler.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/RendererFactoryDefaultHandler.java
deleted file mode 100644
index 575df4fe2..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/RendererFactoryDefaultHandler.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Dec 1, 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.wst.common.internal.emf.resource;
-
-
-/**
- * @author schacher
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public interface RendererFactoryDefaultHandler {
-
- RendererFactory getDefaultRendererFactory();
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ResourceFactoryDescriptor.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ResourceFactoryDescriptor.java
deleted file mode 100644
index 247ae5db1..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/ResourceFactoryDescriptor.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.resource;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-
-public abstract class ResourceFactoryDescriptor {
-
-
- /**
- * Returns true if the current descriptor is applicable to the given fileURI.
- *
- * @param fileURI The URI of the file to be loaded
- * @return True if the current descriptor declares a resource factory applicable to the given URI.
- */
- public abstract boolean isEnabledFor(URI fileURI);
-
-
- /**
- * The short segment is one possible way that a ResourceFactory
- * might apply to a URI. Clients should call {@link isEnabledFor}
- * instead of comparing the short segments when searching for an
- * applicable descriptor from a set.
- *
- * <p><b>Subclasses may NOT return null.</b></p>
- *
- * @return The short segment that this descriptor is applicable to.
- */
- public abstract String getShortSegment();
-
-
- /**
- * The correct instance of Resource.Factory. The instance returned
- * may or may not be unique, so if you require the same instance
- * for each call, you should cache the value returned the first
- * time from this method.
- *
- * @return An instance of Resource.Factory.
- */
- public abstract Resource.Factory createFactory();
-
- public int hashCode() {
- return getShortSegment().hashCode();
- }
-
- public boolean equals(Object o) {
- if(o instanceof ResourceFactoryDescriptor)
- return getShortSegment().equals(((ResourceFactoryDescriptor)o).getShortSegment());
- return false;
- }
-}
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/RootTranslator.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/RootTranslator.java
deleted file mode 100644
index 18f8d84d6..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/RootTranslator.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.resource;
-
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.resource.Resource;
-
-public class RootTranslator extends Translator {
-
- /**
- * Constructor for RootTranslator.
- *
- * @param domNameAndPath
- * @param eClass
- */
- public RootTranslator(String domNameAndPath, EClass eClass) {
- super(domNameAndPath, eClass);
- }
-
- /**
- * @see com.ibm.etools.emf2xml.impl.Translator#setMOFValue(Notifier, Object, int)
- */
- public void setMOFValue(Notifier owner, Object value, int newIndex) {
- ((Resource) owner).getContents().add(newIndex, value);
- }
-
- /**
- * @see com.ibm.etools.emf2xml.impl.Translator#removeMOFValue(Notifier, Object)
- */
- public void removeMOFValue(Notifier owner, Object value) {
- ((Resource) owner).getContents().remove(value);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.Translator#setMOFValue(org.eclipse.emf.ecore.EObject,
- * java.lang.Object)
- */
- public void setMOFValue(Resource res, Object value) {
- if (res != null && value != null)
- res.getContents().add(value);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.Translator#isMultiValued()
- */
- public boolean isMultiValued() {
- return true;
- }
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/SourceLinkTranslator.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/SourceLinkTranslator.java
deleted file mode 100644
index d5d697bb7..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/SourceLinkTranslator.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Apr 1, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-/**
- * @author schacher
- */
-public class SourceLinkTranslator extends Translator {
-
-
- /**
- * @param domNameAndPath
- * @param aFeature
- * @param path
- */
- public SourceLinkTranslator(String domNameAndPath, EStructuralFeature aFeature, TranslatorPath path) {
- super(domNameAndPath, aFeature, path);
- }
-
- /**
- * @param domNameAndPath
- * @param aFeature
- * @param path
- */
- public SourceLinkTranslator(String domNameAndPath, EStructuralFeature aFeature, TranslatorPath path, int style) {
- super(domNameAndPath, aFeature, path);
- fStyle |= style;
- }
-
- /**
- * @param domNameAndPath
- * @param aFeature
- * @param style
- */
- public SourceLinkTranslator(String domNameAndPath, EStructuralFeature aFeature, int style) {
- super(domNameAndPath, aFeature, style);
- }
-
- public Object convertStringToValue(String strValue, EObject owner) {
-
- Object value = null;
- if (strValue != null)
- // Find the object with the name that matches matchName
- value = fTranslatorPaths[0].findObject(owner, strValue.trim());
- if ((fStyle & Translator.STRING_RESULT_OK) != 0)
- return ((value != null) ? value : strValue);
- return value;
- }
-
- public String convertValueToString(Object value, EObject owner) {
- TranslatorPath path = fTranslatorPaths[0];
- Object attrValue = path.getLastMap().getMOFValue((EObject) value);
- return path.getLastMap().convertValueToString(attrValue, owner);
- }
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/StaticResourceFactoryDescriptor.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/StaticResourceFactoryDescriptor.java
deleted file mode 100644
index 491b4c6d6..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/StaticResourceFactoryDescriptor.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package org.eclipse.wst.common.internal.emf.resource;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-
-/**
- * Declares a subclass to create Resource.Factory(ies) from an extension.
- */
-class StaticResourceFactoryDescriptor extends ResourceFactoryDescriptor {
-
- private final String shortSegment;
- private final Resource.Factory factory;
-
- /**
- *
- * @param shortSegment A non-null name of the file associated with the given factory
- * @param factory A non-null Resource.Factory that can load files of the given name
- */
- public StaticResourceFactoryDescriptor(String shortSegment, Resource.Factory factory) {
- Assert.isNotNull(shortSegment);
- Assert.isNotNull(factory);
- this.shortSegment = shortSegment;
- this.factory = factory;
- }
-
- public boolean isEnabledFor(URI fileURI) {
- /* shortSegment must be non-null for the descriptor to be created,
- * a validation check in init() verifies this requirement */
- if(fileURI != null && fileURI.lastSegment() != null)
- return shortSegment.equals(fileURI.lastSegment());
- return false;
- }
-
- public Resource.Factory createFactory() {
- return factory;
- }
-
- public String getShortSegment() {
- return shortSegment;
- }
-}
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/Translator.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/Translator.java
deleted file mode 100644
index 685181c39..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/Translator.java
+++ /dev/null
@@ -1,792 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.resource;
-
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.impl.EStructuralFeatureImpl;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.wst.common.internal.emf.utilities.ExtendedEcoreUtil;
-import org.eclipse.wst.common.internal.emf.utilities.FeatureValueConverter;
-
-
-public class Translator {
-
- public final static int NO_STYLE = 0;
- public final static int DOM_ATTRIBUTE = 1;
- public final static int EMPTY_TAG = 1 << 1;
- public final static int CDATA_CONTENT = 1 << 2;
- /**
- * Style bit that indicates that the end tag should NOT be indented; by default it is.
- */
- public final static int END_TAG_NO_INDENT = 1 << 3;
- /**
- * Style bit that indicates that booleans should NOT be converted as "True" and "False"; default
- * is that they are
- */
- public final static int BOOLEAN_LOWERCASE = 1 << 4;
- /**
- * Style bit that indicates an enum value contains hyphens If this is true, then internally the
- * hyphens are replaced with underscores
- */
- public final static int ENUM_FEATURE_WITH_HYPHENS = 1 << 5;
-
- protected final static int OBJECT_MAP = 1 << 6;
- protected final static int BOOLEAN_FEATURE = 1 << 7;
-
- protected final static int SHARED_REFERENCE = 1 << 8;
-
- /**
- * Indicates that the feature may be significant even if it is empty
- */
- public final static int EMPTY_CONTENT_IS_SIGNIFICANT = 1 << 9;
-
- /**
- * Used to indicate that feature is associated with a comment node
- */
- protected final static int COMMENT_FEATURE = 1 << 10;
-
- /**
- * If the value is null, then an eUnset() will be invoked on the feature
- */
- public final static int UNSET_IF_NULL = 1 << 11;
-
- /**
- * Return the element contents as a String if the feature is unresolveable (Used by the
- * SourceLinkTranslator)
- */
- public final static int STRING_RESULT_OK = 1 << 12;
-
- protected String[] fDOMNames;
- protected String fDOMPath = ""; //$NON-NLS-1$
- protected Map readAheadNames;
- protected int fStyle = NO_STYLE;
- protected EStructuralFeature feature;
- protected TranslatorPath[] fTranslatorPaths;
- protected EClass emfClass;
- protected String fNameSpace = ""; //$NON-NLS-1$
- // added by MDE
- protected String domNameAndPath = null;
-
- /**
- * Indicates if any of the children of this Translator are themselves DependencyTranslators
- */
- protected Boolean isDependencyParent;
- protected EStructuralFeature dependencyFeature;
- protected static EcorePackage ECORE_PACKAGE = EcorePackage.eINSTANCE;
-
- // Use this identifier for the DOMName when the attribute
- // value is to be extracted directly from the text of the node.
- // This is rare, but occurs in the web.xml in the case of a
- // WelcomeFile.
- static final public String TEXT_ATTRIBUTE_VALUE = "$TEXT_ATTRIBUTE_VALUE"; //$NON-NLS-1$
-
- static final public EStructuralFeature CONTAINER_FEATURE = new ContainerFeature();
-
- static final public EStructuralFeature ROOT_FEATURE = new RootFeature();
-
- protected static class ContainerFeature extends EStructuralFeatureImpl {
- protected ContainerFeature() {
- super();
- }
- }
-
- protected static class RootFeature extends EStructuralFeatureImpl {
- protected RootFeature() {
- super();
- }
- }
-
- public Translator findChild(String tagName, Object target, int versionID) {
-
- Translator result = null;
- Translator[] maps = getChildren(target, versionID);
-
- if (maps != null) {
- for (int i = 0; i < maps.length; i++) {
- Translator map = maps[i];
- if (map.isMapFor(tagName)) {
- result = map;
- break;
- }
- }
- }
- if (result == null) {
- VariableTranslatorFactory factory = getVariableTranslatorFactory();
- if (factory != null && factory.accepts(tagName)) {
- result = factory.create(tagName);
- }
- }
- return result;
- }
-
- /**
- * Utility method to string together arrays of children
- */
- public static Object[] concat(Object[] array1, Object[] array2) {
- Object[] result = (Object[]) java.lang.reflect.Array.newInstance(array1.getClass().getComponentType(), array1.length + array2.length);
- System.arraycopy(array1, 0, result, 0, array1.length);
- System.arraycopy(array2, 0, result, array1.length, array2.length);
- return result;
- }
-
- public static Object[] concat(Object[] array1, Object object2) {
- Object[] newArray = new Object[]{object2};
- return concat(array1, newArray);
- }
-
- public static Translator createParentAndTextAttributeTranslator(String domName, EStructuralFeature parentFeature, EStructuralFeature childFeature) {
- GenericTranslator parent = new GenericTranslator(domName, parentFeature, END_TAG_NO_INDENT);
- parent.setChildren(new Translator[]{new Translator(TEXT_ATTRIBUTE_VALUE, childFeature)});
- return parent;
- }
-
- public Translator(String domNameAndPath, EClass eClass) {
- initializeDOMNameAndPath(domNameAndPath);
- setEMFClass(eClass);
- }
-
- public Translator(String domNameAndPath, EStructuralFeature aFeature) {
- initializeDOMNameAndPath(domNameAndPath);
- setFeature(aFeature);
- }
-
- public Translator(String domNameAndPath, EStructuralFeature aFeature, EClass eClass) {
- this(domNameAndPath, aFeature);
- setEMFClass(eClass);
- }
-
- public Translator(String domNameAndPath, EStructuralFeature aFeature, TranslatorPath path) {
- this(domNameAndPath, aFeature, new TranslatorPath[]{path});
- }
-
- public Translator(String domNameAndPath, EStructuralFeature aFeature, TranslatorPath[] paths) {
- initializeDOMNameAndPath(domNameAndPath);
- fTranslatorPaths = paths;
- setFeature(aFeature);
- }
-
- public Translator(String domNameAndPath, EStructuralFeature aFeature, int style) {
- initializeDOMNameAndPath(domNameAndPath);
- fStyle = style;
- setFeature(aFeature);
- }
-
- public static EcorePackage getEcorePackage() {
- return EcorePackage.eINSTANCE;
- }
-
- public String getDOMName(Object value) {
- return fDOMNames[0];
- }
-
- public String[] getDOMNames() {
- return fDOMNames;
- }
-
- public String getDOMPath() {
- return fDOMPath;
- }
-
- public boolean hasDOMPath() {
- return fDOMPath != null && fDOMPath.length() != 0;
- }
-
- public EStructuralFeature getFeature() {
- return feature;
- }
-
- /**
- * Parse the DOM names and path out of <domNameAndPath>and set the appropriate fields.
- */
- protected void initializeDOMNameAndPath(String domNameAndPathArg) {
- if (domNameAndPathArg == null)
- return;
- int inx = domNameAndPathArg.lastIndexOf('/');
- if (inx != -1) {
- fDOMNames = parseDOMNames(domNameAndPathArg.substring(inx + 1));
- fDOMPath = domNameAndPathArg.substring(0, inx);
- } else {
- fDOMNames = parseDOMNames(domNameAndPathArg);
- fDOMPath = ""; //$NON-NLS-1$
- }
- // added by MDE
- this.domNameAndPath = domNameAndPathArg;
-
- }
-
- /**
- * Indicates whether the node should be written as an empty tag; eg, <distributable/>
- */
- public boolean isCDATAContent() {
- return (fStyle & CDATA_CONTENT) != 0;
- }
-
- /**
- * Indicates whether the DOMName represents a sub element name or an attribute name
- *
- * @return boolean True if the DOMName is an attribute name.
- */
- public boolean isDOMAttribute() {
- return (fStyle & DOM_ATTRIBUTE) != 0;
- }
-
- /**
- * Indicates whether the node should be written as an empty tag; eg, <distributable/>
- */
- public boolean isEmptyTag() {
- return (fStyle & EMPTY_TAG) != 0;
- }
-
- public boolean isBooleanUppercase() {
- return (fStyle & BOOLEAN_FEATURE) != 0 && (fStyle & BOOLEAN_LOWERCASE) == 0;
- }
-
- public boolean isBooleanFeature() {
- return (fStyle & BOOLEAN_FEATURE) != 0;
- }
-
- public boolean shouldIndentEndTag() {
- return (fStyle & END_TAG_NO_INDENT) == 0;
- }
-
- public boolean isEmptyContentSignificant() {
- return ((fStyle & EMPTY_TAG) != 0) || ((fStyle & EMPTY_CONTENT_IS_SIGNIFICANT) != 0);
- }
-
- /**
- * Returns true if this map is to another MOF object (not a primitive)
- */
- public boolean isObjectMap() {
- return (fStyle & OBJECT_MAP) != 0;
- }
-
- /**
- * Returns true if this map is for a shared reference
- */
- public boolean isShared() {
- return (fStyle & SHARED_REFERENCE) != 0;
- }
-
- public boolean isEnumWithHyphens() {
- return (fStyle & ENUM_FEATURE_WITH_HYPHENS) != 0;
- }
-
- /**
- * Indicates whether the map represents a case where the text of the DOMNode represents the
- * objects one and only attribute value. An example of this case is a <welcome-file>file.txt
- * </welcome-file>.
- */
- public boolean isDOMTextValue() {
- return fDOMNames[0] == TEXT_ATTRIBUTE_VALUE;
- }
-
- /**
- * Indicates whether the id is the mof attribute that should be set.
- */
- public boolean isIDMap() {
- return false;
- }
-
- /**
- * Indicates whether the id is the mof attribute that should be set.
- */
- public boolean isLinkMap() {
- return fTranslatorPaths != null;
- }
-
- public boolean isTargetLinkMap() {
- return isLinkMap() && !isObjectMap();
- }
-
- /**
- * Return true if this map is the one representing a node with the name <domName>. By default
- * this method simply compares the DOM name of the map against the <domName>parameter
- *
- * @return boolean
- * @param domName
- * java.lang.String
- */
- public boolean isMapFor(String domName) {
- if (domName.equals(getDOMPath()))
- return true;
- for (int i = 0; i < fDOMNames.length; i++) {
- if (domName.equals(fDOMNames[i]))
- return true;
- }
- return false;
- }
-
- public boolean isMapFor(Object aFeature, Object oldValue, Object newValue) {
- return feature == aFeature;
- }
-
- /**
- * Indicates whether feature being mapped is a collection.
- *
- * @return boolean True if the feature is multi valued.
- */
- public boolean isMultiValued() {
- if (feature != null)
- return feature.isMany();
- return false;
- }
-
- /**
- * Parses comma separated names from <domNamesString>. Returns an array containing the names.
- *
- * @return java.lang.String[]
- * @param domNamesString
- * java.lang.String
- */
- protected String[] parseDOMNames(String domNamesString) {
- int startInx = 0;
- int inx = domNamesString.indexOf(',');
- ArrayList results = new ArrayList(1);
- while (inx != -1) {
- results.add(domNamesString.substring(startInx, inx));
- startInx = inx + 1;
- inx = domNamesString.indexOf(',', startInx);
- }
- if (startInx == 0)
- results.add(domNamesString);
- else
- results.add(domNamesString.substring(startInx));
- return (String[]) results.toArray(new String[results.size()]);
- }
-
- public String toString() {
- StringBuffer sb = new StringBuffer();
- String cn = getClass().getName();
- int i = cn.lastIndexOf('.');
- cn = cn.substring(++i, cn.length());
- sb.append(cn);
- sb.append('(');
- sb.append(fDOMNames[0]);
- for (int j = 1; j < fDOMNames.length; j++) {
- sb.append('|');
- sb.append(fDOMNames[j]);
- }
- sb.append(',');
- sb.append(hashCode());
- sb.append(')');
- return sb.toString();
- }
-
- /**
- * Gets the TranslatorPath.
- *
- * @return Returns a TranslatorPath
- */
- public TranslatorPath[] getTranslatorPaths() {
- return fTranslatorPaths;
- }
-
- /*
- * @see Object#equals(Object)
- */
- public boolean equals(Object object) {
- if (!(object instanceof Translator))
- return false;
- Translator mapInfo = (Translator) object;
- return fDOMNames.equals(mapInfo.getDOMNames()) && (feature == null && mapInfo.getFeature() == null || feature.equals(mapInfo.getFeature()));
- }
-
- /**
- * Returns the isManagedByParent.
- *
- * @return boolean
- */
- public boolean isManagedByParent() {
- return getChildren(null, -1) == null;
- }
-
- /*
- * In the 99% case there is only one node name to be concerned with, but subclasses can override
- * for the cases where multiple dom names map to one feature
- */
- public EObject createEMFObject(String nodeName, String readAheadName) {
- if (emfClass == null) {
- if (feature == null)
- return null;
- if (isObjectMap())
- return createEMFObject(feature);
- }
- return createEMFObject(emfClass);
- }
-
- public static EObject createEMFObject(EStructuralFeature aFeature) {
- if (aFeature == null)
- return null;
-
- return createEMFObject(((EReference) aFeature).getEReferenceType());
- }
-
- public static EObject createEMFObject(EClass anEClass) {
- if (anEClass == null)
- return null;
- return anEClass.getEPackage().getEFactoryInstance().create(anEClass);
- }
-
- public void setTextValueIfNecessary(String textValue, Notifier owner, int versionId) {
- Translator textTranslator = this.findChild(Translator.TEXT_ATTRIBUTE_VALUE, owner, versionId);
- if (textTranslator != null) {
- Object objectValue = textTranslator.convertStringToValue(textValue, (EObject) owner);
- textTranslator.setMOFValue(owner, objectValue);
- }
- }
-
- /**
- * Check to see if feature is valid on a particular mofObject.
- *
- * @return boolean Return true if the feature specified exists on the MOF object.
- * @param emfObject
- * org.eclipse.emf.ecore.EObject
- */
- public boolean featureExists(EObject emfObject) {
- if (feature == null)
- return false;
-
- return emfObject.eClass().getEStructuralFeature(feature.getName()) != null;
- }
-
- /**
- * Translators which do not have a feature should override this method with custom behavior.
- */
- public String extractStringValue(EObject emfObject) {
- if (isEmptyTag() && feature == null)
- return ""; //Fake it out with a value //$NON-NLS-1$
- return null;
- }
-
- public Object convertStringToValue(String nodeName, String readAheadName, String value, Notifier owner) {
- Object result = null;
- try {
-
- if (!this.isManagedByParent()) {
- result = createEMFObject(nodeName, readAheadName);
- } else {
- result = convertStringToValue(value, (EObject) owner);
- }
-
- } catch (ClassCastException cce) {
-
- }
- return result;
- }
-
- /**
- * Converts a string value to the appropriate type.
- *
- * @return java.lang.Object The converted value
- * @param strValue
- * java.lang.String The string to convert.
- */
- public Object convertStringToValue(String strValue, EObject owner) {
- if (feature == null)
- return strValue;
- if (strValue != null) {
- if (isEnumWithHyphens())
- strValue = strValue.replace('-', '_');
- if (!isCDATAContent()) {
- strValue = strValue.trim();
- }
- }
- Object value = FeatureValueConverter.DEFAULT.convertValue(strValue, feature);
- if (value == null) {
- if (isEmptyTag() && !isDOMAttribute() && !isDOMTextValue() && isBooleanFeature())
- return Boolean.TRUE;
- EObject convertToType = feature.getEType();
- if (convertToType == null)
- value = strValue;
- else if (convertToType.equals(getEcorePackage().getEString())) {
- value = ""; //$NON-NLS-1$
- }
- }
- return value;
- }
-
- /**
- * Converts a value of a specified type to a string value. Subclasses may override for special
- * cases where special conversion needs to occur based on the feature and or object type.
- *
- * @return String The converted value
- * @param value
- * java.lang.Object The object to convert.
- */
- public String convertValueToString(Object value, EObject owner) {
- if (isEmptyTag() || value == null)
- return null;
- else if (isEnumWithHyphens())
- return value.toString().replace('_', '-');
- else if (isBooleanUppercase())
- return ((Boolean) value).booleanValue() ? "True" : "False"; //$NON-NLS-1$ //$NON-NLS-2$
-
- return value.toString();
- }
-
- public Translator[] getVariableChildren(Notifier target, int version) {
- Translator[] results = null;
- VariableTranslatorFactory factory = getVariableTranslatorFactory();
- if (factory != null) {
- List variableTranslators = factory.create(target);
- if (variableTranslators != null && variableTranslators.size() > 0) {
- Object[] vtoa = variableTranslators.toArray();
-
- results = new Translator[vtoa.length];
- for (int i = 0; i < results.length; i++)
- results[i] = (Translator) vtoa[i];
- }
-
- }
- if (results == null)
- results = new Translator[0];
- return results;
- }
-
- /**
- * Returns null by default; subclasses should override to return specific children
- */
- public Translator[] getChildren(Object target, int versionID) {
- return getChildren();
- }
-
- protected Translator[] getChildren() {
- return null;
- }
-
- /**
- * Return the list of MOF children that currently exist for the values of an attribute.
- */
- public List getMOFChildren(EObject mofObject) {
- if (feature == null)
- return Collections.EMPTY_LIST;
- Object value = getMOFValue(mofObject);
- List result = Collections.EMPTY_LIST;
- if (isMultiValued())
- result = (List) value;
- else if (value != null)
- result = Collections.singletonList(value);
- return result;
- }
-
- public Object getMOFValue(EObject mofObject) {
- if (feature == null)
- return null;
- return mofObject.eGet(feature);
- }
-
- /**
- * Sets a value of a feature in a mof object.
- */
- public void setMOFValue(Notifier owner, Object value, int newIndex) {
- if (feature != null) {
- if ((fStyle & UNSET_IF_NULL) != 0 && value == null)
- ExtendedEcoreUtil.eUnsetOrRemove((EObject) owner, feature, value);
- else
- ExtendedEcoreUtil.eSetOrAdd((EObject) owner, feature, value, newIndex);
- }
- }
-
- public void setMOFValue(Notifier owner, Object value) {
- if (owner instanceof EObject) {
- setMOFValue((EObject) owner, value);
- } else if (owner instanceof Resource) {
- setMOFValue((Resource) owner, value);
- }
- }
-
- public void setMOFValue(EObject emfObject, Object value) {
- // if (feature != null)
- // emfObject.eSet(feature, value);
- setMOFValue(emfObject, value, -1);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.Translator#setMOFValue(org.eclipse.emf.ecore.EObject,
- * java.lang.Object)
- */
- public void setMOFValue(Resource res, Object value) {
- if (res != null && value != null)
- res.getContents().add(value);
- }
-
- public void removeMOFValue(Notifier owner, Object value) {
- if (feature != null)
- ExtendedEcoreUtil.eUnsetOrRemove((EObject) owner, feature, value);
- }
-
- public boolean isSetMOFValue(EObject emfObject) {
- boolean isSet = feature != null && emfObject.eIsSet(feature);
- if (isEmptyTag())
- return isSet && ((Boolean) emfObject.eGet(feature)).booleanValue();
- return isSet;
- }
-
- public void unSetMOFValue(EObject emfObject) {
- if (feature != null)
- emfObject.eUnset(feature);
- }
-
- public void clearList(EObject mofObject) {
- if (feature != null)
- ((List) mofObject.eGet(feature)).clear();
- }
-
- protected void setFeature(EStructuralFeature aFeature) {
- this.feature = aFeature;
- if (feature == null)
- return;
- //This way an instance check happens only once
- if (aFeature instanceof EReference) {
- fStyle |= OBJECT_MAP;
- if (!((EReference) aFeature).isContainment())
- fStyle |= SHARED_REFERENCE;
- }
-
- if (getEcorePackage().getEBoolean() == feature.getEType())
- fStyle |= BOOLEAN_FEATURE;
- }
-
- protected void setEMFClass(EClass anEClass) {
- this.emfClass = anEClass;
- if (anEClass != null)
- fStyle |= OBJECT_MAP;
-
- }
-
- public boolean hasReadAheadNames() {
- return readAheadNames != null && !readAheadNames.isEmpty();
- }
-
- /**
- * Return the read ahead names, if they are defined, for a given parent node name. This is used
- * when creation of a specific EMF object is dependent on the value of a child node.
- */
- public ReadAheadHelper getReadAheadHelper(String parentName) {
- if (readAheadNames == null)
- return null;
- return (ReadAheadHelper) readAheadNames.get(parentName);
- }
-
- public void addReadAheadHelper(ReadAheadHelper helper) {
- if (readAheadNames == null)
- readAheadNames = new HashMap(3);
- readAheadNames.put(helper.getParentDOMName(), helper);
- }
-
- public boolean isDependencyChild() {
- return false;
- }
-
- /**
- * @return
- */
- public boolean isDependencyParent() {
- if (isDependencyParent == null) {
- isDependencyParent = Boolean.FALSE;
- Translator[] theChildren = getChildren(null, -1);
- if (theChildren != null) {
- for (int i = 0; i < theChildren.length; i++) {
- //For now we assume one
- if (theChildren[i].isDependencyChild()) {
- isDependencyParent = Boolean.TRUE;
- dependencyFeature = theChildren[i].getDependencyFeature();
- }
- }
- }
- }
- return isDependencyParent.booleanValue();
- }
-
- /**
- * @return
- */
- public EStructuralFeature getDependencyFeature() {
- return dependencyFeature;
- }
-
- public EObject basicGetDependencyObject(EObject parent) {
- return (EObject) parent.eGet(dependencyFeature);
- }
-
- /**
- * Use when the DOM path is not null, and there are no children. Default is false, but
- * subclasses may wish to override
- */
- public boolean shouldRenderEmptyDOMPath(EObject eObject) {
- return isEmptyContentSignificant();
- }
-
- /**
- * Use when the translator tolerates parent nodes that relate to the DOM path, and no children;
- * default is do nothing
- */
- public void setMOFValueFromEmptyDOMPath(EObject eObject) {
-
- }
-
- /**
- * Namespace for the attributes
- *
- * @return
- */
- public String getNameSpace() {
- return fNameSpace;
- }
-
- /**
- * Set the namespace for the dom attribute
- *
- * @param string
- */
- public void setNameSpace(String string) {
- fNameSpace = string;
- }
-
- public VariableTranslatorFactory getVariableTranslatorFactory() {
- if (isObjectMap())
- return DefaultTranslatorFactory.INSTANCE;
- return null;
- }
-
- public boolean isEnumFeature() {
- return feature != null && ECORE_PACKAGE.getEEnum().isInstance(feature.getEType());
- }
-
- public boolean isUnsettable() {
- return feature != null && feature.isUnsettable();
- }
-
- public boolean isDataType() {
- return feature != null && feature.getEType() instanceof EDataType;
- }
-
- /**
- * @return
- */
- public boolean isComment() {
- return (fStyle & COMMENT_FEATURE) != 0;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorFilter.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorFilter.java
deleted file mode 100644
index b12067d1b..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorFilter.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-/*
- * Created on Sep 21, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-import org.eclipse.emf.ecore.EObject;
-
-
-/*
- * Translator filters can be used to differentiate between Object and Attribute Translators without
- * breaking them out into seperate data structures. The Filter will rely on the underlying data
- * structure used to store the children of the given Translator.
- *
- * getNextChild() will return null when no other translators of the given genre are available.
- *
- * The processing hints which are created and then passed to getNext*Translator() store information
- * that needs to be persisted between calls. The createProcessingHints() will create a properly
- * initialized array. The constants NEXT_START_HINT_INDX and MODE_HINT_INDX provide pointers into
- * the array for the NEXT_START position and the proper mode to operate in
- * (STANDARD_TRANSLATORS_MODE or
- *
- */
-public abstract class TranslatorFilter {
-
- protected final Translator translator;
- protected final int version;
-
- public static final int NEXT_START_HINT_INDX = 0;
- public static final int MODE_HINT_INDX = 1;
-
- public static final int STANDARD_TRANSLATORS_MODE = 0;
- public static final int VARIABLE_TRANSLATORS_MODE = 1;
-
- /*
- * These TranslatorFilters are used in a stateless mode. Only their scanNextTranslator() methods
- * will be invoked
- */
- private static final TranslatorFilter objectTranslatorFilter = new ObjectTranslatorFilter(null, -1);
- private static final TranslatorFilter attributeTranslatorFilter = new AttributeTranslatorFilter(null, -1);
-
-
- protected int mode = STANDARD_TRANSLATORS_MODE;
- protected int index = -1;
-
- protected Translator cachedPeekAheadTranslator = null;
-
- public TranslatorFilter(Translator trans, int version) {
- this.translator = trans;
- this.version = version;
- }
-
- /**
- * Calling peek twice will advance the current child
- */
- public Translator peekNextChild(EObject target) {
- cachedPeekAheadTranslator = getNextChild(target);
- return cachedPeekAheadTranslator;
- }
-
- /**
- * getNextChild() will return null when no other translators of the given genre are available.
- */
- public Translator getNextChild(EObject target) {
-
- Translator result = null;
- if (cachedPeekAheadTranslator != null) {
- result = cachedPeekAheadTranslator;
- cachedPeekAheadTranslator = null;
- return result;
- }
-
- int found = 0;
- Translator children[] = null;
- switch (mode) {
- case STANDARD_TRANSLATORS_MODE :
- children = this.translator.getChildren(target, this.version);
-
- /* Look for the next Attribute Translator */
- found = scanNextTranslator(children, this.index);
-
- if (found >= 0) {
- /*
- * If found, (1) update the result, (2) update the index so we can skip ahead on
- * the next invocation (3) escape the VARIABLE_TRANSLATORS processing
- */
- result = children[found];
- this.index = found;
- break;
- }
- /*
- * Reset the index. DO NOT BREAK. Allow entry into VARIABLE_TRANSLATORS case
- */
- this.index = -1;
- /*
- * update the mode to VARIABLE_TRANSLATORS so we can skip to it directly next time
- */
- this.mode = VARIABLE_TRANSLATORS_MODE;
- case VARIABLE_TRANSLATORS_MODE :
- children = this.translator.getVariableChildren(target, this.version);
- found = scanNextTranslator(children, this.index);
- if (found >= 0) {
- /*
- * If found, (1) update the result, (2) update the index so we can skip ahead on
- * the next invocation
- */
- result = children[found];
- this.index = found;
- }
-
- }
-
- return result;
- }
-
- public static final int[] createProcessingHints() {
- return new int[]{-1, STANDARD_TRANSLATORS_MODE};
- }
-
- public static final Translator getNextAttributeTranslator(Translator translator, int startHint, int[] nextHint, EObject target, int version) {
-
- return TranslatorFilter.getNextChild(translator, startHint, nextHint, target, version, attributeTranslatorFilter);
- }
-
- public static final Translator getNextObjectTranslator(Translator translator, int startHint, int[] nextHint, EObject target, int version) {
-
- return TranslatorFilter.getNextChild(translator, startHint, nextHint, target, version, objectTranslatorFilter);
- }
-
- /**
- * getNextChild() takes hints on where to begin in the children array of the given Translator.
- * When it finds the translator, it will update the hints array with the start hint for the next
- * invocation(hints[0]) and when necessary it will use update the mode (hints[1]) to either
- * STANDARD_TRANSLATORS or VARIABLE_TRANSLATORS.
- *
- * @param translator
- * @param startHint
- * @param hints
- * a two-element array: hints[0] will be updated with the next startHint and hints[1]
- * will be used to store the mode.
- * @param target
- * @param version
- * @param translatorFilter
- * @return
- */
- public static final Translator getNextChild(Translator translator, int startHint, int[] hints, EObject target, int version, TranslatorFilter translatorFilter) {
-
- Translator result = null;
-
- int index = startHint;
- Translator children[] = null;
-
- switch (hints[MODE_HINT_INDX]) {
- case STANDARD_TRANSLATORS_MODE :
- children = translator.getChildren(target, version);
- if (children != null && startHint < children.length) {
-
- /* Look for the next Attribute Translator */
- index = translatorFilter.scanNextTranslator(children, index);
-
- if (index >= 0) {
- /*
- * If found, (1) update the result, (2) update the index so we can skip
- * ahead on the next invocation (3) escape the VARIABLE_TRANSLATORS
- * processing
- */
- result = children[index];
- break;
- }
- /*
- * DO NOT BREAK we will default to VARIABLE TRANSLATORS MODE so we must reset
- * the startHint appropriately
- */
- startHint = -1;
- }
-
- case VARIABLE_TRANSLATORS_MODE :
- hints[MODE_HINT_INDX] = VARIABLE_TRANSLATORS_MODE;
- /*
- * Reset the index.
- */
- index = startHint;
- children = translator.getVariableChildren(target, version);
- if (children != null && children.length > 0 && startHint < children.length) {
- index = translatorFilter.scanNextTranslator(children, index);
- result = (index >= 0) ? children[index] : null;
- }
- }
-
- hints[NEXT_START_HINT_INDX] = (result == null && children != null) ? children.length : index;
-
- return result;
- }
-
-
- public abstract int scanNextTranslator(Translator[] children, int start);
-
- /**
- * @return
- */
- public int getIndex() {
- return index;
- }
-
- /**
- * @return
- */
- public int getMode() {
- return mode;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorPath.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorPath.java
deleted file mode 100644
index a2d843e17..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorPath.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.resource;
-
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-
-public class TranslatorPath {
- protected Translator[] mapInfoPath;
-
- /**
- * Construct with an array of Translator that specifies the path to follow from an object to
- * another object
- */
- public TranslatorPath(Translator[] path) {
- mapInfoPath = path;
- }
-
- public List findObjects(EObject startObject) {
- Object cur = startObject;
- for (int i = 0; i < mapInfoPath.length; i++) {
- Translator curMap = mapInfoPath[i];
- if (cur instanceof EObject) {
- EStructuralFeature curAttr = curMap.getFeature();
- if (curAttr == Translator.CONTAINER_FEATURE) {
- curAttr = ((EObject) cur).eContainmentFeature();
- cur = ((EObject) cur).eContainer();
- } else if (curAttr == Translator.ROOT_FEATURE) {
- cur = ((TranslatorResource) startObject.eResource()).getRootObject();
- } else {
- cur = ((EObject) cur).eGet(curAttr);
- }
- if (curMap.isMultiValued()) {
- return (List) cur;
- }
- }
- }
- return null;
- }
-
- public Object findObject(EObject startObject, Object matchValue) {
- List objects = findObjects(startObject);
- if (objects == null)
- return null;
- return findObject(objects, getLastMap(), matchValue);
- }
-
- private Object findObject(List objectList, Translator map, Object matchValue) {
- for (Iterator iter = objectList.iterator(); iter.hasNext();) {
- EObject mofObject = (EObject) iter.next();
- Object curMatchValue = mofObject.eGet(map.getFeature());
- if (matchValue.equals(curMatchValue))
- return mofObject;
- }
- return null;
- }
-
- public Translator getLastMap() {
- return mapInfoPath[mapInfoPath.length - 1];
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#toString()
- */
- public String toString() {
- StringBuffer sb = new StringBuffer();
- String cn = getClass().getName();
- int i = cn.lastIndexOf('.');
- cn = cn.substring(++i, cn.length());
- sb.append(cn);
- sb.append('(');
- sb.append(mapInfoPath[0]);
- for (int j = 1; j < mapInfoPath.length; j++) {
- sb.append('\n');
- sb.append(mapInfoPath[j]);
- }
- sb.append(')');
- return sb.toString();
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorResource.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorResource.java
deleted file mode 100644
index 32c9c47fd..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorResource.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.resource;
-
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.impl.EStructuralFeatureImpl;
-import org.xml.sax.EntityResolver;
-
-public interface TranslatorResource extends ReferencedResource {
- /*
- * must make a subclass because the constructor for EStructuralFeature is protected
- */
- static class DocTypeFeature extends EStructuralFeatureImpl {
- protected DocTypeFeature() {
- super();
- }
- }
-
-
- EStructuralFeature DOC_TYPE_FEATURE = new DocTypeFeature();
-
- /**
- * The public id of the XML document, if specified.
- */
- String getPublicId();
-
- /**
- * Return the first element in the EList.
- */
- EObject getRootObject();
-
- /**
- * The system id of the XML document, if specified.
- */
- String getSystemId();
-
- /**
- * Sets the public id and system id of the XML document.
- */
- void setDoctypeValues(String publicId, String systemId);
-
- /**
- * Sets the default public/system ids if necessary
- */
- void setDefaults();
-
- /**
- * Returns the name that will be in the document type header of the serialized xml file
- */
- String getDoctype();
-
- /**
- * Returns the XML version of this document
- */
- String getXMLVersion();
-
- Translator getRootTranslator();
-
- /**
- * Entity resolver that can be used when using standard parsers to read the resource
- */
- EntityResolver getEntityResolver();
-
- boolean usesDTD();
-
- public int getVersionID();
-
- void setVersionID(int i);
-
- Renderer getRenderer();
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorResourceFactory.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorResourceFactory.java
deleted file mode 100644
index 20a450b36..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorResourceFactory.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.resource;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-
-public abstract class TranslatorResourceFactory extends ReferencedXMIFactoryImpl implements RendererFactory.Listener {
-
- protected RendererFactory rendererFactory;
- private boolean listeningForUpdates = false;
-
- /**
- * Constructor for TranslatorResourceFactory.
- */
- public TranslatorResourceFactory(RendererFactory aRendererFactory, boolean listeningForUpdates) {
- super();
- rendererFactory = aRendererFactory;
- setListeningForUpdates(listeningForUpdates);
- }
-
- /**
- * Constructor for TranslatorResourceFactory.
- */
- public TranslatorResourceFactory(RendererFactory aRendererFactory) {
- this(aRendererFactory, true);
- }
-
- public void setListeningForUpdates(boolean shouldBeListeningForUpdates) {
-
- if (this.listeningForUpdates ^ shouldBeListeningForUpdates) {
- if (!shouldBeListeningForUpdates)
- RendererFactory.NotificationEngine.removeListener(this);
- else
- RendererFactory.NotificationEngine.addListener(this);
-
- this.listeningForUpdates = shouldBeListeningForUpdates;
- }
- }
-
- public boolean isListeningForUpdates() {
- return this.listeningForUpdates;
- }
-
- public Resource doCreateResource(URI uri) {
- Renderer aRenderer = rendererFactory.createRenderer();
- return createResource(uri, aRenderer);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.RendererFactory.Listener#updateRendererFactory(com.ibm.etools.emf2xml.RendererFactory)
- */
- public void updateRendererFactory(RendererFactory newRendererFactory) {
- //System.out.println("Updating renderer factory");
- rendererFactory = newRendererFactory;
- }
-
- protected abstract TranslatorResource createResource(URI uri, Renderer aRenderer);
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorResourceImpl.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorResourceImpl.java
deleted file mode 100644
index 1fa8f5fdf..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/TranslatorResourceImpl.java
+++ /dev/null
@@ -1,396 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.resource;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Collection;
-import java.util.Map;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.impl.NotificationImpl;
-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.EStructuralFeature;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.resource.impl.ResourceImpl;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.wst.common.internal.emf.utilities.StringUtil;
-import org.xml.sax.EntityResolver;
-
-public abstract class TranslatorResourceImpl extends ReferencedXMIResourceImpl implements TranslatorResource {
- static final public EStructuralFeature ID_FEATURE = EcorePackage.eINSTANCE.getEClass_EIDAttribute();
- protected static final String DEFAULT_ENCODING = "UTF-8"; //$NON-NLS-1$
- protected static final String DEFAULT_VERSION = "1.0"; //$NON-NLS-1$
- protected Renderer renderer;
- /**
- * The public Id to use at the head of the document.
- */
- protected String publicId;
- /**
- * The system Id to use at the head of the document.
- */
- protected String systemId;
- protected String xmlVersion;
- // Default the resources to J2EE 1.4
- protected int versionID;
-
- /**
- * @deprecated since 4/29/2003 - used for compatibility Subclasses should
- * be using the Renderers and translator framework
- */
- public TranslatorResourceImpl() {
- super();
- }
-
- /**
- * @deprecated since 4/29/2003 - used for compatibility Subclasses should
- * be using the Renderers and translator framework
- */
- public TranslatorResourceImpl(URI uri) {
- super(uri);
- }
-
- public TranslatorResourceImpl(URI uri, Renderer aRenderer) {
- super(uri);
- setRenderer(aRenderer);
- versionID = getDefaultVersionID();
- }
-
- public TranslatorResourceImpl(Renderer aRenderer) {
- super();
- setRenderer(aRenderer);
- }
-
- public java.lang.String getEncoding() {
- if (super.getEncoding() == null)
- setEncoding(DEFAULT_ENCODING);
- return super.getEncoding();
- }
-
- public String getPublicId() {
- return publicId;
- }
-
- /**
- * Return the first element in the EList.
- */
- public EObject getRootObject() {
- if (contents == null || contents.isEmpty())
- return null;
- return (EObject) getContents().get(0);
- }
-
- public String getSystemId() {
- return systemId;
- }
-
- public void setDoctypeValues(String aPublicId, String aSystemId) {
- boolean changed = !(StringUtil.stringsEqual(publicId, aPublicId) && StringUtil.stringsEqual(systemId, aSystemId));
- publicId = aPublicId;
- systemId = aSystemId;
- if (changed) {
- eNotify(new NotificationImpl(Notification.SET, null, null) {
- public Object getFeature() {
- return DOC_TYPE_FEATURE;
- }
-
- public Object getNotifier() {
- return TranslatorResourceImpl.this;
- }
- });
- }
- }
-
- /**
- * Returns the xmlVersion.
- *
- * @return String
- */
- public String getXMLVersion() {
- if (xmlVersion == null)
- xmlVersion = DEFAULT_VERSION;
- return xmlVersion;
- }
-
- /**
- * Sets the xmlVersion.
- *
- * @param xmlVersion
- * The xmlVersion to set
- */
- public void setXMLVersion(String xmlVersion) {
- this.xmlVersion = xmlVersion;
- }
-
- protected void basicDoLoad(InputStream inputStream, Map options) throws IOException {
- // long start = System.currentTimeMillis();
- boolean isTrackingMods = isTrackingModification();
- try {
- if (isTrackingMods)
- setTrackingModification(false);
- renderer.doLoad(inputStream, options);
- }
- finally {
- if (isTrackingMods)
- setTrackingModification(true);
- }
- // long end = System.currentTimeMillis();
- // recordTime("Load", start, end);
- }
-
- public void save(Map options) throws IOException {
- if (renderer.useStreamsForIO()) {
- super.save(options);
- } else {
- notifyAboutToSave();
- try {
- doSave((OutputStream)null, options);
- notifySaved();
- } catch (Exception e) {
- notifySaveFailed();
- if (e instanceof IOException)
- throw (IOException) e;
- else
- Logger.getLogger().write(e);
- }
- notifySaved();
- }
- }
-
-
- /**
- * @see com.ibm.etools.xmi.helpers.CompatibilityXMIResourceImpl#doSave(OutputStream,
- * Map)
- */
- public void doSave(OutputStream outputStream, Map options) throws IOException {
- // long start = System.currentTimeMillis();
- renderer.doSave(outputStream, options);
- setModified(false);
- // long end = System.currentTimeMillis();
- // recordTime("Save", start, end);
- }
-
- // private void recordTime(String type, long start, long end) {
- // System.out.println(renderer.getClass().getName() + "\t" + type + "\t" +
- // (end - start) +
- // "\t\t\tms" + "\t" + (( this.getVersionID()) / 10.0) + "\t" + this);
- // //$NON-NLS-1$
- // //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- // }
-
- /**
- * @see org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl#doUnload()
- */
- protected void doUnload() {
- renderer.preUnload();
- super.doUnload();
- }
-
- public String toString() {
- return getClass().getName() + getURI().toString();
- }
-
- /**
- * Returns the renderer.
- *
- * @return Renderer
- */
- public Renderer getRenderer() {
- return renderer;
- }
-
- /**
- * Sets the renderer.
- *
- * @param renderer
- * The renderer to set
- */
- public void setRenderer(Renderer renderer) {
- this.renderer = renderer;
- if (renderer.getResource() != this)
- renderer.setResource(this);
- }
-
- /**
- * For compatibility of old subtype resources, returns the super
- * implementation
- *
- * @return
- */
- protected EList primGetContents() {
- return super.getContents();
- }
-
- public EList getContents() {
- waitForResourceToLoadIfNecessary();
- if (contents == null) {
- initializeContents();
- }
- return contents;
- }
-
- protected void initializeContents() {
- contents = new ResourceImpl.ContentsEList() {
- public boolean add(Object object) {
- renderer.prepareToAddContents();
- return super.add(object);
- }
-
- public boolean addAll(Collection collection) {
- renderer.prepareToAddContents();
- return super.addAll(collection);
- }
- };
- }
-
- public void setDefaults() {
- if (systemId != null && publicId != null)
- return;
- String pubId = publicId == null ? getDefaultPublicId() : publicId;
- String sysId = systemId == null ? getDefaultSystemId() : systemId;
- setDoctypeValues(pubId, sysId);
- }
-
- /**
- * @see org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl#init()
- */
- protected void init() {
- super.init();
- setEncoding(DEFAULT_ENCODING);
- }
-
- /**
- * Returns null by default; subclasses can override
- *
- * @see com.ibm.etools.emf2xml.TranslatorResource#createEntityResolver()
- */
- public EntityResolver getEntityResolver() {
- return null;
- }
-
- protected abstract String getDefaultPublicId();
-
- protected abstract String getDefaultSystemId();
-
- protected abstract int getDefaultVersionID();
-
- /**
- * @return
- */
- public int getVersionID() {
- return versionID;
- }
-
- /**
- * @param i
- */
- public void setVersionID(int i) {
- versionID = i;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.TranslatorResource#usesDTD()
- */
- public boolean usesDTD() {
- return getPublicId() != null && getSystemId() != null;
- }
-
- /**
- * Overridden to notify when the ID gets set; need this to push it into
- * the resource
- *
- * @see org.eclipse.emf.ecore.xmi.XMLResource#setID(EObject, String)
- */
- public void setID(EObject eObject, String id) {
- String oldId = getID(eObject);
- super.setID(eObject, id);
- eObject.eNotify(new ENotificationImpl((InternalEObject) eObject, Notification.SET, ID_FEATURE, oldId, id));
- }
-
- /**
- * This method indicates whether or not the extent associated with the
- * resource has been modified since the last time it was loaded or saved.
- *
- * @return boolean
- */
- public boolean isModified() {
- return super.isModified() || renderer.isModified();
- }
-
- /*
- * Overriden to give the renderer a hook
- *
- * @see org.eclipse.wst.common.internal.emf.resource.ReferencedResource#accessForWrite()
- */
- public void accessForWrite() {
- renderer.accessForWrite();
- super.accessForWrite();
- }
-
- /*
- * Overriden to give the renderer a hook
- *
- * @see org.eclipse.wst.common.internal.emf.resource.ReferencedResource#accessForRead()
- */
- public void accessForRead() {
- renderer.accessForRead();
- super.accessForRead();
- }
-
- public void releaseFromRead() {
- renderer.releaseFromRead();
- super.releaseFromRead();
- }
-
- public void releaseFromWrite() {
- renderer.releaseFromWrite();
- super.releaseFromWrite();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf.workbench.ReferencedXMIResourceImpl#preDelete()
- */
- public void preDelete() {
- super.preDelete();
- renderer.preDelete();
- }
-
- public boolean isShared() {
- return super.isShared() || renderer.isShared();
- }
-
- public boolean isSharedForWrite() {
- return super.isSharedForWrite() || renderer.isSharedForWrite();
- }
-
- public void load(Map options) throws IOException {
- synchronized (this) {
- if (isLoaded)
- return;
- // System.out.println(Thread.currentThread() + "
- // TranslatorResource.load(): " + this);
- if (renderer.useStreamsForIO()) {
- super.load(options);
- }
- else if (!isLoaded) {
- load((InputStream) null, options);
- }
- }
-
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/UnsupportedFeature.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/UnsupportedFeature.java
deleted file mode 100644
index 43c5864ab..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/UnsupportedFeature.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Apr 13, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.impl.EAttributeImpl;
-
-/**
- * @author cbridgha
- *
- * TODO To change the template for this generated type comment go to Window - Preferences - Java -
- * Code Generation - Code and Comments
- */
-public class UnsupportedFeature extends EAttributeImpl {
- /**
- * This is used to capture features that are no longer supported
- */
- public static boolean isUnsupported(EClass anEClass, String featureName) {
-
- if (featureName.equals("isZeroParams") && anEClass.getName().equals("MethodElement")) //$NON-NLS-1$ //$NON-NLS-2$
- return true;
- return false;
- }
-
- public UnsupportedFeature() {
- super();
- // TODO Auto-generated constructor stub
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/VariableTranslatorFactory.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/VariableTranslatorFactory.java
deleted file mode 100644
index 1a4eef991..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/VariableTranslatorFactory.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Aug 20, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-
-
-/**
- * @author schacher
- */
-public interface VariableTranslatorFactory {
- /** Returns whether a Translator should be created for the given DOM name */
- boolean accepts(String domName);
-
- /** Returns whether a Translator should be created for the given feature */
- boolean accepts(Notification notif);
-
- Translator create(Notification notif);
-
- /** Creates a new Translator for the DOM name */
- Translator create(String domName);
-
- /** Creates variable translators for an EMF object to be rendered */
- List create(Notifier target);
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/XMLEncoderDecoder.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/XMLEncoderDecoder.java
deleted file mode 100644
index 7898757a4..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/XMLEncoderDecoder.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on May 20, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
-package org.eclipse.wst.common.internal.emf.resource;
-
-/**
- * @author mdelder
- *
- */
-public class XMLEncoderDecoder {
-
- /**
- *
- */
- public XMLEncoderDecoder() {
- super();
- }
-
- /**
- * Identifies the last printable character in the Unicode range that is supported by the
- * encoding used with this serializer. For 8-bit encodings this will be either 0x7E or 0xFF. For
- * 16-bit encodings this will be 0xFFFF. Characters that are not printable will be escaped using
- * character references.
- */
- private int _lastPrintable = 0xFFFE;
-
- protected static XMLEncoderDecoder _singleton;
-
-
- /**
- * Returns a decoded version of the value.
- */
- public String decode(String value) {
- // NOT_IMPLEMENTED
- return value;
- }
-
-
- /**
- * Escapes a string so it may be printed as text content or attribute value. Non printable
- * characters are escaped using character references. Where the format specifies a deault entity
- * reference, that reference is used (e.g. <tt>&amp;lt;</tt>).
- *
- * @param source
- * The string to escape
- */
- public char[] encode(char[] value) {
- boolean unmodified = true;
- StringBuffer sbuf = new StringBuffer(value.length);
- String charRef = null;
- char ch;
- for (int i = 0; i < value.length; ++i) {
- ch = value[i];
- // If there is a suitable entity reference for this
- // character, print it. The list of available entity
- // references is almost but not identical between
- // XML and HTML.
- charRef = getEntityRef(ch);
- if (charRef != null) {
- sbuf.append('&');
- sbuf.append(charRef);
- sbuf.append(';');
- unmodified = false;
- } else if ((ch >= ' ' && ch <= _lastPrintable && ch != 0xF7) || ch == '\n' || ch == '\r' || ch == '\t') {
- // If the character is not printable, print as character
- // reference.
- // Non printables are below ASCII space but not tab or line
- // terminator, ASCII delete, or above a certain Unicode
- // threshold.
- sbuf.append(ch);
- } else {
- sbuf.append("&#");//$NON-NLS-1$
- sbuf.append(Integer.toString(ch));
- sbuf.append(';');
- unmodified = false;
- }
- }
- if (unmodified)
- return value;
- char[] result = new char[sbuf.length()];
- sbuf.getChars(0, sbuf.length(), result, 0);
- return result;
- }
-
- /**
- * Escapes a string so it may be printed as text content or attribute value. Non printable
- * characters are escaped using character references. Where the format specifies a deault entity
- * reference, that reference is used (e.g. <tt>&amp;lt;</tt>).
- *
- * @param source
- * The string to escape
- */
- public String encode(String value) {
- StringBuffer sbuf = new StringBuffer(value.length());
- String charRef = null;
- char ch;
- for (int i = 0; i < value.length(); ++i) {
- ch = value.charAt(i);
- // If there is a suitable entity reference for this
- // character, print it. The list of available entity
- // references is almost but not identical between
- // XML and HTML.
- charRef = getEntityRef(ch);
- if (charRef != null) {
- sbuf.append('&');
- sbuf.append(charRef);
- sbuf.append(';');
- } else if ((ch >= ' ' && ch <= _lastPrintable && ch != 0xF7) || ch == '\n' || ch == '\r' || ch == '\t') {
- // If the character is not printable, print as character
- // reference.
- // Non printables are below ASCII space but not tab or line
- // terminator, ASCII delete, or above a certain Unicode
- // threshold.
- sbuf.append(ch);
- } else {
- sbuf.append("&#");//$NON-NLS-1$
- sbuf.append(Integer.toString(ch));
- sbuf.append(';');
- }
- }
- return sbuf.toString();
- }
-
- public static String escape(String value) {
- if (_singleton == null) {
- _singleton = new XMLEncoderDecoder();
- }
- return _singleton.encode(value);
- }
-
- /**
- * Returns the suitable entity reference for this character value, or null if no such entity
- * exists. Calling this method with <tt>'&amp;'</tt> will return <tt>"&amp;amp;"</tt>.
- *
- * @param ch
- * Character value
- * @return Character entity name, or null
- */
- protected String getEntityRef(char ch) {
- // Encode special XML characters into the equivalent character
- // references.
- // These five are defined by default for all XML documents.
- switch (ch) {
- case '<' :
- return "lt";//$NON-NLS-1$
- case '>' :
- return "gt";//$NON-NLS-1$
- case '"' :
- return "quot";//$NON-NLS-1$
- case '\'' :
- return "apos";//$NON-NLS-1$
- case '&' :
- return "amp";//$NON-NLS-1$
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/AdapterFactoryDescriptor.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/AdapterFactoryDescriptor.java
deleted file mode 100644
index a852031ea..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/AdapterFactoryDescriptor.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.utilities;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-
-public interface AdapterFactoryDescriptor {
-
- public AdapterFactory createAdapterFactory();
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/AdapterFactoryUtil.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/AdapterFactoryUtil.java
deleted file mode 100644
index 706f9eac8..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/AdapterFactoryUtil.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.utilities;
-
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notifier;
-
-public class AdapterFactoryUtil {
-
- /**
- * Constructor for AdapterFactoryUtil.
- */
- public AdapterFactoryUtil() {
- super();
- }
-
- public static void adaptNew(Notifier newObject, List factories) {
- AdapterFactory fact;
- for (int i = 0; i < factories.size(); i++) {
- fact = (AdapterFactory) factories.get(i);
- fact.adaptNew(newObject, null);
- }
- }
-
- public static void createAdapterFactories(List descriptors, List factories) {
- AdapterFactoryDescriptor desc;
- AdapterFactory adapterFact;
- for (int i = 0; i < descriptors.size(); i++) {
- desc = (AdapterFactoryDescriptor) descriptors.get(i);
- adapterFact = desc.createAdapterFactory();
- if (adapterFact != null)
- factories.add(adapterFact);
- }
- descriptors.clear();
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/ArrayUtil.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/ArrayUtil.java
deleted file mode 100644
index 847b88d6f..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/ArrayUtil.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.utilities;
-
-
-
-public class ArrayUtil {
-
- public static Object[] concat(Object[] array1, Object[] array2) {
- Class componentType = null;
- if (array1.getClass().getComponentType() == array2.getClass().getComponentType())
- componentType = array1.getClass().getComponentType();
- else
- componentType = Object.class;
-
- return concat(array1, array2, componentType);
- }
-
- public static Object[] concat(Object[] array1, Object[] array2, Class componentType) {
- Object[] result = (Object[]) java.lang.reflect.Array.newInstance(componentType, array1.length + array2.length);
- System.arraycopy(array1, 0, result, 0, array1.length);
- System.arraycopy(array2, 0, result, array1.length, array2.length);
- return result;
- }
-
- public static Object[] concatAll(java.util.List arrays, Class componentType) {
- int resultLength = 0;
- for (int i = 0; i < arrays.size(); i++) {
- resultLength += ((Object[]) arrays.get(i)).length;
- }
- Object[] result = (Object[]) java.lang.reflect.Array.newInstance(componentType, resultLength);
- int pos = 0;
- for (int i = 0; i < arrays.size(); i++) {
- Object[] array = (Object[]) arrays.get(i);
- System.arraycopy(array, 0, result, pos, array.length);
- pos += array.length;
- }
- return result;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/Assert.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/Assert.java
deleted file mode 100644
index b37585115..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/Assert.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.utilities;
-
-import org.eclipse.jem.util.logger.proxy.Logger;
-
-
-
-/**
- * <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>
- */
-// This class was, originally, copied directly from com.ibm.itp.common.
-// It was copied to our own package just to minimize minor dependencies
-// on other packages and internal APIs.
-public final class Assert {
- /* This class is not intended to be instantiated. */
-
- private Assert() {
- }
-
- /**
- * Asserts that an argument is legal. If the given boolean is not <code>true</code>, an
- * <code>IllegalArgumentException</code> is thrown.
- *
- * @param expression
- * the outcode of the check
- * @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) {
- return isLegal(expression, "");//$NON-NLS-1$
- }
-
- /**
- * 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();
- 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.
- *
- * @param object
- * the value to test
- * @exception IllegalArgumentException
- * if the object is <code>null</code>
- */
- public static void isNotNull(Object object) {
- isNotNull(object, "");//$NON-NLS-1$
- }
-
- /**
- * 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) {
- Logger.getLogger().logError("null_argument: " + message);//$NON-NLS-1$
- throw new AssertionFailedException();
- }
- }
-
- /**
- * Asserts that the given boolean is <code>true</code>. If this is not the case, some kind of
- * unchecked exception is thrown.
- *
- * @param expression
- * the outcode of the check
- * @return <code>true</code> if the check passes (does not return if the check fails)
- */
- public static boolean isTrue(boolean expression) {
- return isTrue(expression, "");//$NON-NLS-1$
- }
-
- /**
- * 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) {
- Logger.getLogger().logError("assertion failed: " + message);//$NON-NLS-1$
- throw new AssertionFailedException();
- }
- return expression;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/AssertionFailedException.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/AssertionFailedException.java
deleted file mode 100644
index 044c60db5..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/AssertionFailedException.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.utilities;
-
-
-/**
- * <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>
- */
-// This class was, originally, copied directly from com.ibm.itp.common.
-// It was copied to our own package just to minimize minor dependencies
-// on other packages and internal APIs.
-class AssertionFailedException extends RuntimeException {
- /**
- * Constructs a new exception.
- */
- public AssertionFailedException() {
- }
-
- /**
- * Constructs a new exception with the given message.
- */
- public AssertionFailedException(String detail) {
- super(detail);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/Association.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/Association.java
deleted file mode 100644
index 485d0c3f0..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/Association.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.utilities;
-
-/**
- * Insert the type's description here. Creation date: (12/17/2000 7:38:15 PM)
- *
- * @author: Administrator
- */
-public class Association {
- protected Object key;
- protected Object value;
-
- /**
- * Association constructor comment.
- */
- public Association(Object aKey, Object aValue) {
- setKey(aKey);
- setValue(aValue);
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 7:38:48 PM)
- *
- * @return java.lang.Object
- */
- public java.lang.Object getKey() {
- return key;
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 7:38:48 PM)
- *
- * @return java.lang.Object
- */
- public java.lang.Object getValue() {
- return value;
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 7:38:48 PM)
- *
- * @param newKey
- * java.lang.Object
- */
- public void setKey(java.lang.Object newKey) {
- key = newKey;
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 7:38:48 PM)
- *
- * @param newValue
- * java.lang.Object
- */
- public void setValue(java.lang.Object newValue) {
- value = newValue;
- }
-}
-
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/CloneablePublic.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/CloneablePublic.java
deleted file mode 100644
index b243775af..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/CloneablePublic.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Sep 22, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.utilities;
-
-/**
- * Interface that exposes the clone method, for objects that need to generically copy other
- * cloneable objects
- */
-public interface CloneablePublic extends Cloneable {
- Object clone();
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/CommandContext.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/CommandContext.java
deleted file mode 100644
index 913139cb1..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/CommandContext.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Apr 27, 2004
- */
-package org.eclipse.wst.common.internal.emf.utilities;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-
-
-
-/**
- * @author John Mourra
- */
-public class CommandContext implements ICommandContext {
-
- private IProgressMonitor monitor;
- private Map properties;
- private ResourceSet resourceSet;
-
- /**
- * @param monitor
- */
- public CommandContext(IProgressMonitor monitor) {
- this(monitor, null, null);
- }
-
- /**
- * @param monitor
- * @param configurationProperties
- * @param resourceSet
- */
- public CommandContext(IProgressMonitor monitor, Map configurationProperties, ResourceSet resourceSet) {
- this.monitor = monitor;
- this.properties = configurationProperties;
- this.resourceSet = resourceSet;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.ws.rd.command.framework.ICommandContext#getProgressMonitor()
- */
- public IProgressMonitor getProgressMonitor() {
- if (monitor == null)
- monitor = new NullProgressMonitor();
- return monitor;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.ws.rd.command.framework.ICommandContext#getConfigurationProperties()
- */
- public Map getConfigurationProperties() {
- if (properties == null)
- properties = new HashMap();
- return properties;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.ws.rd.command.framework.ICommandContext#getResourceSet()
- */
- public ResourceSet getResourceSet() {
- if (resourceSet == null)
- resourceSet = new ResourceSetImpl();
- return resourceSet;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/CopyGroup.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/CopyGroup.java
deleted file mode 100644
index 79b3b1e71..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/CopyGroup.java
+++ /dev/null
@@ -1,320 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.utilities;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-
-/**
- * This class is used to copy a group of RefObjects and/or Resources. This group will ensure that
- * all non-composite relationships are deferred until all Resources and RefObjects are copied. This
- * allows you to make copies of a group of objects that may have non-composite relationships and
- * ensure that these relationships are pointing to the copied object if it is part of the group
- * (either directly or through a containment relationship). Creation date: (12/17/2000 1:21:17 PM)
- *
- * @author: Administrator
- */
-public class CopyGroup {
- protected String defaultIdSuffix;
- protected ResourceSet copyContext;
- protected List resources;
- protected List refObjects;
- protected List copiedResources;
- protected List copiedRefObjects;
- protected boolean preserveIds = false;
-
- /**
- * CopyGroup constructor comment.
- */
- public CopyGroup() {
- super();
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 1:28:16 PM)
- *
- * @param aRefObject
- * org.eclipse.emf.ecore.EObject
- */
- public boolean add(EObject aRefObject) {
- return add(aRefObject, null);
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 1:28:16 PM)
- *
- * @param aRefObject
- * org.eclipse.emf.ecore.EObject
- */
- public boolean add(EObject aRefObject, String idSuffix) {
- if (aRefObject != null && !containsRefObject(aRefObject)) {
- getRefObjects().add(createAssociation(aRefObject, idSuffix));
- return true;
- }
- return false;
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 1:27:32 PM)
- *
- * @param aResources
- * org.eclipse.emf.ecore.resource.Resource
- */
- public void add(Resource aResource) {
- add(aResource, null);
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 1:27:32 PM)
- *
- * @param aResources
- * org.eclipse.emf.ecore.resource.Resource
- */
- public void add(Resource aResource, String newUri) {
- if (aResource != null)
- getResources().add(createAssociation(aResource, newUri));
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 1:28:16 PM)
- *
- * @param aRefObject
- * org.eclipse.emf.ecore.EObject
- */
- public void addCopied(EObject aRefObject) {
- if (aRefObject != null)
- getCopiedRefObjects().add(aRefObject);
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 1:27:32 PM)
- *
- * @param aResources
- * org.eclipse.emf.ecore.resource.Resource
- */
- public void addCopied(Resource aResource) {
- if (aResource != null) {
- getCopiedResources().add(aResource);
- if (getCopyContext() != null)
- getCopyContext().getResources().add(aResource);
- }
- }
-
- protected boolean contains(List associations, Object anObject) {
- if (anObject == null)
- return false;
- int size = associations.size();
- Association assoc;
- for (int i = 0; i < size; i++) {
- assoc = (Association) associations.get(i);
- if (assoc.getKey() == anObject)
- return true;
- }
- return false;
- }
-
- /**
- * Return true if
- *
- * @aRefObject has been added to this group. Creation date: (12/17/2000 1:28:16 PM)
- * @param aRefObject
- * org.eclipse.emf.ecore.EObject
- */
- public boolean containsRefObject(EObject aRefObject) {
- return contains(getRefObjects(), aRefObject);
- }
-
- /**
- * Return true if
- *
- * @aResource has been added to this group. Creation date: (12/17/2000 1:28:16 PM)
- * @param aRefObject
- * org.eclipse.emf.ecore.EObject
- */
- public boolean containsResource(Resource aResource) {
- return contains(getResources(), aResource);
- }
-
- private Association createAssociation(Object key, Object value) {
- return new Association(key, value);
- }
-
- /**
- * Returns a List of RefObjects that were copied. Creation date: (12/17/2000 1:25:46 PM)
- *
- * @return java.util.List
- */
- public java.util.List getCopiedRefObjects() {
- if (copiedRefObjects == null)
- copiedRefObjects = new ArrayList();
- return copiedRefObjects;
- }
-
- /**
- * Returns a List of Resources that were copied. Creation date: (12/17/2000 1:25:46 PM)
- *
- * @return java.util.List
- */
- public java.util.List getCopiedResources() {
- if (copiedResources == null)
- copiedResources = new ArrayList();
- return copiedResources;
- }
-
- /**
- * The context to add all copied resources into. Creation date: (12/17/2000 8:09:45 PM)
- *
- * @return org.eclipse.emf.ecore.resource.ResourceSet
- */
- public org.eclipse.emf.ecore.resource.ResourceSet getCopyContext() {
- return copyContext;
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 1:44:43 PM)
- *
- * @return java.lang.String
- */
- public java.lang.String getDefaultIdSuffix() {
- return defaultIdSuffix;
- }
-
- /**
- * Should the id be copied in the case where no suffix is specified? Defaults to false
- */
- public boolean getPreserveIds() {
- return preserveIds;
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 1:25:46 PM)
- *
- * @return java.util.List
- */
- public java.util.List getRefObjects() {
- if (refObjects == null)
- refObjects = new ArrayList();
- return refObjects;
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 1:25:46 PM)
- *
- * @return java.util.List
- */
- public java.util.List getResources() {
- if (resources == null)
- resources = new ArrayList();
- return resources;
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 1:25:46 PM)
- *
- * @return java.util.List
- */
- public java.util.List primGetRefObjects() {
- return refObjects;
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 1:25:46 PM)
- *
- * @return java.util.List
- */
- public java.util.List primGetResources() {
- return resources;
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 1:28:16 PM)
- *
- * @param aRefObject
- * org.eclipse.emf.ecore.EObject
- * @return boolean
- */
- public boolean remove(EObject aRefObject) {
- if (aRefObject != null && primGetRefObjects() != null) {
- Iterator it = primGetRefObjects().iterator();
- Association association;
- while (it.hasNext()) {
- association = (Association) it.next();
- if (association.getKey() == aRefObject)
- return primGetRefObjects().remove(association);
- }
- }
- return false;
- }
-
- /**
- * Insert the method's description here. Creation date: (12/17/2000 1:27:32 PM)
- *
- * @param aResources
- * org.eclipse.emf.ecore.resource.Resource
- * @return boolean
- */
- public boolean remove(Resource aResource) {
- if (aResource != null && primGetResources() != null) {
- Iterator it = primGetResources().iterator();
- Association association;
- while (it.hasNext()) {
- association = (Association) it.next();
- if (association.getKey() == aResource)
- return primGetResources().remove(association);
- }
- }
- return false;
- }
-
- /**
- * Set the context to add all copied resources into. Creation date: (12/17/2000 8:09:45 PM)
- *
- * @param newCopyContext
- * org.eclipse.emf.ecore.resource.Context
- */
- public void setCopyContext(org.eclipse.emf.ecore.resource.ResourceSet newCopyContext) {
- copyContext = newCopyContext;
- }
-
- /**
- * If an ID suffix is not defined for a EObject that is to be copied, this value will be used.
- * Creation date: (12/17/2000 1:44:43 PM)
- *
- * @param newDefaultIdSuffix
- * java.lang.String
- */
- public void setDefaultIdSuffix(java.lang.String newDefaultIdSuffix) {
- defaultIdSuffix = newDefaultIdSuffix;
- }
-
- /**
- * Should the id be copied in the case where no suffix is specified?
- */
- public void setPreserveIds(boolean value) {
- preserveIds = value;
- }
-
- /**
- * Subclasses should override this method if they require additional processing after the group
- * has been copied.
- *
- * @param copyUtil
- */
- public void postCopy(EtoolsCopyUtility copyUtil) {
- }
-
-}
-
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DOMLoadOptions.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DOMLoadOptions.java
deleted file mode 100644
index 05ae8a5ef..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DOMLoadOptions.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Mar 12, 2003
- *
- * To change this generated comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.wst.common.internal.emf.utilities;
-
-/**
- * @author schacher
- *
- * To change this generated comment go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class DOMLoadOptions {
- protected boolean validate;
- protected boolean allowJavaEncodings;
- protected boolean expandEntityRefererences;
-
- /**
- * @return boolean
- */
- public boolean isAllowJavaEncodings() {
- return allowJavaEncodings;
- }
-
- /**
- * @return boolean
- */
- public boolean isExpandEntityRefererences() {
- return expandEntityRefererences;
- }
-
- /**
- * @return boolean
- */
- public boolean isValidate() {
- return validate;
- }
-
- /**
- * Sets the allowJavaEncodings.
- *
- * @param allowJavaEncodings
- * The allowJavaEncodings to set
- */
- public void setAllowJavaEncodings(boolean allowJavaEncodings) {
- this.allowJavaEncodings = allowJavaEncodings;
- }
-
- /**
- * Sets the expandEntityRefererences.
- *
- * @param expandEntityRefererences
- * The expandEntityRefererences to set
- */
- public void setExpandEntityRefererences(boolean expandEntityRefererences) {
- this.expandEntityRefererences = expandEntityRefererences;
- }
-
- /**
- * Sets the validate.
- *
- * @param validate
- * The validate to set
- */
- public void setValidate(boolean validate) {
- this.validate = validate;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DOMUtilities.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DOMUtilities.java
deleted file mode 100644
index 7eeac6c9e..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DOMUtilities.java
+++ /dev/null
@@ -1,680 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.utilities;
-
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Text;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-/**
- * A class containing common dom manipulation and search functions.
- */
-public class DOMUtilities {
- // Handy Constants
- public static final String INDENT_STRING = "\t"; //$NON-NLS-1$
- public static final String NEWLINE_STRING = System.getProperty("line.separator"); //$NON-NLS-1$
- //Hack to be removed when the DOM apis change such that there is an easier
- //way to fluff up and set the doctype
- private static final String DUMMY_ENTITY_STRING = "dummy"; //$NON-NLS-1$
- private static final String DUMMY_ENTITY_NODE_STRING = "<dummy/>"; //$NON-NLS-1$
- private static DocumentBuilder defaultDocumentBuilder;
- private static EntityResolver defaultEntityResolver;
-
- /**
- * Returns an iterator that iterates over the sub nodes of a path.
- */
- static public Iterator createPathIterator(String path) {
- String tPath = path.startsWith("/") ? path.substring(1) : path; //$NON-NLS-1$
- if (tPath.length() == 0)
- tPath = null;
- final String aPath = tPath;
-
- return new Iterator() {
- int prevIndex = 0;
- int curIndex = 0;
- String pathString = aPath;
-
- public boolean hasNext() {
- return pathString != null && prevIndex != -1;
- }
-
- public Object next() {
- curIndex = pathString.indexOf('/', prevIndex);
- String nodeString = null;
- if (curIndex != -1)
- nodeString = pathString.substring(prevIndex, curIndex++);
- else
- nodeString = pathString.substring(prevIndex);
- prevIndex = curIndex;
- return nodeString;
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
- };
- }
-
- /**
- * Get the text for the passed in node.
- */
- static public String getChildText(Node node) {
- Text textNode = getChildTextNode(node);
- if (textNode != null)
- return textNode.getData();
- return null;
- }
-
- /**
- * Get the text for the passed in node.
- */
- static public Text getChildTextNode(Node node) {
- Node textNode = node.getFirstChild();
- while (textNode != null && DOMUtilities.isTextNode(textNode)) {
- if (!isWhitespace(textNode))
- return (Text) textNode;
- textNode = textNode.getNextSibling();
- }
- return null;
- }
-
- /**
- * Return a string representing the current indentation of the node.
- */
- static public String getIndentString(Node node) {
- Revisit.toDo();
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Get the last non-text child of a node.
- *
- * @return org.w3c.dom.Node The last non-text child node of
- * @node.
- * @param node
- * org.w3c.dom.Node The node
- */
- public static Node getLastNodeChild(Node node) {
- if (node == null)
- return null;
- Node child = node.getLastChild();
- while (child != null && child.getNodeType() == Node.TEXT_NODE)
- child = child.getPreviousSibling();
- return child;
- }
-
- /**
- * Get the next non-text sibling after a node.
- *
- * @return org.w3c.dom.Node The first non-text sibling node after
- * @node. If there is no next non-text sibling, null is returned.
- * @param node
- * org.w3c.dom.Node The node
- */
- public static Node getNextNodeSibling(Node node) {
- Node sibling = node.getNextSibling();
- while (sibling != null && sibling.getNodeType() != Node.ELEMENT_NODE)
- sibling = sibling.getNextSibling();
- return sibling;
- }
-
- /**
- * Get the first child Node with the specified name
- */
- static public Node getNodeChild(Node node, String nodeName) {
- Node child = null;
- NodeList children = node.getChildNodes();
- for (int i = 0; i < children.getLength(); i++) {
- Node n = children.item(i);
- if (n.getNodeType() == Node.ELEMENT_NODE && n.getNodeName().equals(nodeName)) {
- child = n;
- break;
- }
- }
- return child;
- }
-
- /**
- * Traverses the path passed in <pathName>. The path is a string in the form
- * 'node1/node2/node3'. This method starts at node.
- */
- static public Node getNodeChildForPath(Node parent, String pathName) {
-
- Node curNode = parent;
- Iterator i = DOMUtilities.createPathIterator(pathName);
- while (i.hasNext()) {
- String child = (String) i.next();
- curNode = DOMUtilities.getNodeChild(curNode, child);
- if (curNode == null)
- return null;
- }
- return curNode;
- }
-
- /**
- * Get the Node children with the specified names
- */
- static public List getNodeChildren(Node node, String[] nodeNames) {
- NodeList childNodes = node.getChildNodes();
- ArrayList results = new ArrayList();
-
- for (int i = 0; i < childNodes.getLength(); i++) {
- Node n = childNodes.item(i);
- if (n.getNodeType() == Node.ELEMENT_NODE) {
- boolean found = false;
- for (int j = 0; j < nodeNames.length; j++) {
- if (nodeNames[j].equals(n.getNodeName())) {
- found = true;
- break;
- }
- }
- if (found)
- results.add(n);
- }
- }
- return results;
- }
-
- /**
- * Get the Node children with the specified name
- */
- static public List getNodeChildren(Node node, String nodeName) {
- NodeList childNodes = node.getChildNodes();
- ArrayList results = new ArrayList();
-
- for (int i = 0; i < childNodes.getLength(); i++) {
- Node n = childNodes.item(i);
- if (n.getNodeType() == Node.ELEMENT_NODE && n.getNodeName().equals(nodeName))
- results.add(n);
- }
- return results;
- }
-
- /**
- * Get the first non-text sibling before a node.
- *
- * @return org.w3c.dom.Node The first non-text sibling node before
- * @node. If there is no previous non-text sibling, null is returned.
- * @param node
- * org.w3c.dom.Node The node
- */
- public static Node getPreviousNodeSibling(Node node) {
- if (node == null)
- return null;
- Node sibling = node.getPreviousSibling();
- while (sibling != null && DOMUtilities.isTextNode(sibling))
- sibling = sibling.getPreviousSibling();
- return sibling;
- }
-
- /**
- * Get the first text node before a node.
- *
- * @return org.w3c.dom.Node The first text node before
- * @node. Null if no such node exist.
- * @param node
- * org.w3c.dom.Node The node
- */
- public static Text getPreviousText(Node node) {
- Text sibling = getPreviousTextSibling(node);
-
- if (sibling == null && node.getParentNode() != null)
- sibling = getPreviousText(node.getParentNode());
-
- return sibling;
- }
-
- /**
- * Get the first text sibling before a node.
- *
- * @return org.w3c.dom.Node The first text sibling node before
- * @node. If there is no previous text sibling, null is returned.
- * @param node
- * org.w3c.dom.Node The node
- */
- public static Text getPreviousTextSibling(Node node) {
- Assert.isNotNull(node);
-
- Node sibling = node.getPreviousSibling();
- Node lastText = null;
- while (sibling != null && sibling.getNodeType() == Node.TEXT_NODE) {
- lastText = sibling;
- sibling = sibling.getPreviousSibling();
- }
- return (Text) lastText;
- }
-
- /**
- * Get the first text sibling before a node.
- *
- * @return org.w3c.dom.Node The first text sibling node before
- * @node. If there is no previous text sibling, null is returned.
- * @param node
- * org.w3c.dom.Node The node
- */
- public static String getTrailingWhitespace(Text node) {
- Assert.isNotNull(node);
-
- String text = node.getData();
- if (text.length() == 0)
- return ""; //$NON-NLS-1$
-
- int i = text.length() - 1;
- for (; i >= 0; i--) {
- if (!Character.isWhitespace(text.charAt(i))) {
- break;
- }
- }
-
- return text.substring(++i);
- }
-
- /**
- * Inserts <newNode>into <parent>after <refNode>. If <refNode>is null then the node is inserted
- * to the beginning of the parent's child nodes.
- *
- * @param parent
- * org.w3c.dom.Node
- * @param newNode
- * org.w3c.dom.Node
- * @param refNode
- * org.w3c.dom.Node
- */
- public static void insertAfterNode(Node parent, Node newNode, Node refNode) {
- Node insertBeforeNode = null;
- if (refNode != null) {
- insertBeforeNode = refNode.getNextSibling();
- }
- if (refNode == null)
- insertBeforeNode(parent, newNode, parent.getFirstChild());
- else
- insertBeforeNode(parent, newNode, insertBeforeNode);
- }
-
- /**
- * Insert a <newNode>into <parent>before <refNode>. This utility method is used to ensure that
- * the insertion does not result in two adjacent text nodes. The DOM model does not handle
- * adjacent text nodes. They must be joined together.
- *
- * @param newNode
- * org.w3c.dom.Node
- * @param newNode
- * org.w3c.dom.Node
- * @param refNode
- * org.w3c.dom.Node
- */
- static public void insertBeforeNode(Node parent, Node newNode, Node refNode) {
- if (newNode.getNodeType() == Node.TEXT_NODE) {
- Text textNewNode = (Text) newNode;
-
- // If the insert before node is text, join it with the new node.
- if (refNode != null && refNode.getNodeType() == Node.TEXT_NODE) {
- Text textRefNode = (Text) refNode;
- textRefNode.setData(textNewNode.getData() + textRefNode.getData());
- return;
- }
- // If the node we are inserting after is text,
- // join it with the new node.
- Node insertAfterNode = (refNode == null) ? parent.getLastChild() : refNode.getPreviousSibling();
- if (insertAfterNode != null && insertAfterNode.getNodeType() == Node.TEXT_NODE) {
- Text textInsertAfterNode = (Text) insertAfterNode;
- textInsertAfterNode.setData(textInsertAfterNode.getData() + textNewNode.getData());
- return;
- }
- }
- // There is no text node to join to, simple insert the node.
- parent.insertBefore(newNode, refNode);
- }
-
- /**
- * Insert a <newNode>into <parent>before <refNode>. This method will also insert the node before
- * any whitespace nodes that appear in the tree before <refNode>. This method will also ensure
- * that the insertion does not result in two adjacent text nodes. The DOM model does not handle
- * adjacent text nodes. They must be joined together.
- *
- * @param newNode
- * org.w3c.dom.Node
- * @param newNode
- * org.w3c.dom.Node
- * @param refNode
- * org.w3c.dom.Node
- */
- static public void insertBeforeNodeAndWhitespace(Node parent, Node newNode, Node refNode) {
- Node curNode = (refNode == null) ? parent.getLastChild() : refNode.getPreviousSibling();
- Node lastNode = refNode;
-
- while (curNode != null && (DOMUtilities.isWhitespace(curNode) || DOMUtilities.isComment(curNode))) {
- lastNode = curNode;
- curNode = curNode.getPreviousSibling();
- }
-
- insertBeforeNode(parent, newNode, lastNode);
- }
-
- /**
- * Return whether the node is a text node.
- *
- * @return boolean Answer true if the node is a text node, false otherwise.
- * @param node
- * org.w3c.dom.Node The node to check
- */
- static public boolean isTextNode(Node node) {
- Assert.isNotNull(node);
- return (node.getNodeType() == Node.TEXT_NODE) || (node.getNodeType() == Node.CDATA_SECTION_NODE);
- }
-
- /**
- * Return whether the node is entirely comment or not.
- *
- * @return boolean Answer true if the node is whitespace, false otherwise.
- * @param node
- * org.w3c.dom.Node The node to check
- */
- static public boolean isComment(Node node) {
- Assert.isNotNull(node);
-
- return node.getNodeType() == Node.COMMENT_NODE;
- }
-
- /**
- * Return whether the node is entirely whitepace or not.
- *
- * @return boolean Answer true if the node is whitespace, false otherwise.
- * @param node
- * org.w3c.dom.Node The node to check
- */
- static public boolean isWhitespace(Node node) {
- Assert.isNotNull(node);
-
- if (node.getNodeType() != Node.TEXT_NODE)
- return false;
-
- Text textNode = (Text) node;
- String text = textNode.getData();
- if (text == null)
- return false;
-
- for (int i = 0; i < text.length(); i++) {
- if (!Character.isWhitespace(text.charAt(i))) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * Remove all the children of <node>
- */
- static public void removeAllChildren(Node node) {
- NodeList list = node.getChildNodes();
- for (int i = 0; i < list.getLength(); i++) {
- node.removeChild(list.item(i));
- }
- }
-
- // traverses the DOM starting at the specified node and returns a list
- // of nodes matching the search string
-
- static public ArrayList getAllNodes(Node node, String nodeName) {
- ArrayList nodeList = new ArrayList();
-
- String[] nodeNames = {nodeName};
- findAllNodes(node, nodeNames, nodeList);
-
- return nodeList;
- }
-
- // traverses the DOM starting at the specified node and returns a list
- // of nodes matching the search strings
-
- static public ArrayList getAllNodes(Node node, String[] nodeNamesArray) {
- ArrayList nodeList = new ArrayList();
- findAllNodes(node, nodeNamesArray, nodeList);
-
- return nodeList;
- }
-
- // recursive helper for getAllNodes
- static private void findAllNodes(Node node, String[] nodeNames, ArrayList results) {
-
- NodeList nodes = node.getChildNodes();
- if (nodes != null) {
- for (int i = 0; i < nodes.getLength(); i++) {
- for (int j = 0; j < nodeNames.length; j++) {
- if (nodes.item(i).getNodeName().equals(nodeNames[j])) {
- results.add(nodes.item(i));
- }
- }
- findAllNodes(nodes.item(i), nodeNames, results);
- }
- }
- }
-
- /**
- * Returns the system defined JAXP document builder
- */
- static public DocumentBuilder newDefaultDocumentBuilder(DOMLoadOptions options) throws ParserConfigurationException {
- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
- dbf.setValidating(options.isValidate());
- dbf.setNamespaceAware(options.isValidate());
- /*
- * Causes errors in IBM JDK try { dbf.setAttribute(Renderer.JAXP_SCHEMA_LANGUAGE,
- * Renwderer.W3C_XML_SCHEMA); } catch (IllegalArgumentException x) { }
- */
- try {
- dbf.setAttribute("http://apache.org/xml/features/allow-java-encodings", new Boolean(options.isAllowJavaEncodings())); //$NON-NLS-1$
- } catch (IllegalArgumentException ignore) {
- Logger.getLogger().log("Warning: Parser does not support \"http://apache.org/xml/features/allow-java-encodings\"."); //$NON-NLS-1$
- }
- try {
- dbf.setAttribute("http://apache.org/xml/features/validation/schema", new Boolean(options.isValidate())); //$NON-NLS-1$
- } catch (IllegalArgumentException ignore) {
- dbf.setValidating(false);
- Logger.getLogger().log("Warning: Parser does not support \"http://apache.org/xml/features/validation/schema\". Validation will be disabled."); //$NON-NLS-1$
- }
- dbf.setExpandEntityReferences(options.isExpandEntityRefererences());
- DocumentBuilder result = dbf.newDocumentBuilder();
- result.setErrorHandler(new ErrorHandler() {
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ErrorHandler#error(org.xml.sax.SAXParseException)
- */
- public void error(SAXParseException arg0) throws SAXException {
- throw arg0;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ErrorHandler#fatalError(org.xml.sax.SAXParseException)
- */
- public void fatalError(SAXParseException arg0) throws SAXException {
- throw arg0;
- }
-
- public void warning(SAXParseException arg0) throws SAXException {
- Logger.getLogger().logWarning(arg0);
- }
-
- });
- return result;
- }
-
- /**
- * Creates a stub document, where the DocumentType is defined by the parameters.
- */
- static public Document createNewDocument(String doctype, String publicId, String systemId) throws ParserConfigurationException, SAXException, IOException {
- DocumentBuilder builder = getDefaultDocumentBuilder();
- InputStream in = createHeaderInputStream(doctype, publicId, systemId, true);
- Document result = builder.parse(in);
- removeDummyEntity(result);
- removeExtraneousComments(result);
- return result;
- }
-
- public static Document loadDocument(InputStream in, DOMLoadOptions options, EntityResolver resolver) throws ParserConfigurationException, SAXException, IOException {
- DocumentBuilder builder = DOMUtilities.newDefaultDocumentBuilder(options);
- builder.setEntityResolver(resolver);
- Document result = builder.parse(in);
- removeExtraneousComments(result);
- return result;
- }
-
- /**
- * At the time of this writing, the DOM Level 2 APIs are not advanced enough for setting the
- * document type; so the only parser independent way of accomplishing this is by creating a
- * stream and parsing it.
- */
- public static InputStream createHeaderInputStream(String doctype, String publicId, String systemId) {
- return createHeaderInputStream(doctype, publicId, systemId, false);
- }
-
-
- private static InputStream createHeaderInputStream(String doctype, String publicId, String systemId, boolean includeDummy) {
- ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
- PrintWriter writer = new PrintWriter(outputStream);
- writeHeader(writer, doctype, publicId, systemId);
- if (includeDummy)
- addDummyEntity(writer);
- writer.flush();
- writer.close();
- return new java.io.ByteArrayInputStream(outputStream.toByteArray());
- }
-
- private static void writeHeader(PrintWriter writer, String doctype, String publicId, String systemId) {
- writer.write("<?xml version=\""); //$NON-NLS-1$
- writer.write("1.0"); //$NON-NLS-1$
- writer.write("\" encoding=\""); //$NON-NLS-1$
- writer.write("UTF-8"); //$NON-NLS-1$
- writer.write("\"?>"); //$NON-NLS-1$
- writer.println();
-
- if (doctype != null) {
- writer.write("<!DOCTYPE "); //$NON-NLS-1$
- writer.write(doctype);
- writer.write(" PUBLIC \""); //$NON-NLS-1$
- writer.write(publicId);
- writer.write("\" \""); //$NON-NLS-1$
- writer.write(systemId);
- writer.write("\">"); //$NON-NLS-1$
- writer.println();
- }
- }
-
- private static void addDummyEntity(PrintWriter writer) {
- Revisit.revisit();
- writer.println(DUMMY_ENTITY_NODE_STRING);
- //Major hack because we can not parse an empty document
- }
-
- private static void removeDummyEntity(Document doc) {
- doc.removeChild(getNodeChild(doc, DUMMY_ENTITY_STRING));
- }
-
- private static void removeExtraneousComments(Document doc) {
- //another major hack because of a bug in XML4J 4.0.7 that added all the
- //comments from the dtd to the document. Can be removed after we move up
- //Xerces levels
- Node aNode = doc.getFirstChild();
- while (aNode != null) {
- Node nextNode = aNode.getNextSibling();
- if (aNode.getNodeType() == Node.COMMENT_NODE)
- doc.removeChild(aNode);
- aNode = nextNode;
- }
- }
-
- /**
- * For performance, cache a static instance of the JAXP registered document builder. Validation
- * is disabled for this instance. If you need validation, use
- * {@link #newDefaultDocumentBuilder(boolean, boolean, boolean)}
- *
- * @return DocumentBuilder
- * @throws ParserConfigurationException
- * if JAXP is not configured correctly
- */
- public static DocumentBuilder getDefaultDocumentBuilder() throws ParserConfigurationException {
- if (defaultDocumentBuilder == null) {
- DOMLoadOptions opts = new DOMLoadOptions();
- opts.setAllowJavaEncodings(true);
- opts.setExpandEntityRefererences(true);
- opts.setValidate(false);
- defaultDocumentBuilder = newDefaultDocumentBuilder(opts);
- defaultDocumentBuilder.setEntityResolver(defaultEntityResolver);
- defaultDocumentBuilder.setErrorHandler(new ErrorHandler() {
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ErrorHandler#error(org.xml.sax.SAXParseException)
- */
- public void error(SAXParseException exception) throws SAXException {
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ErrorHandler#fatalError(org.xml.sax.SAXParseException)
- */
- public void fatalError(SAXParseException exception) throws SAXException {
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ErrorHandler#warning(org.xml.sax.SAXParseException)
- */
- public void warning(SAXParseException exception) throws SAXException {
-
- }
-
- });
- }
-
- return defaultDocumentBuilder;
- }
-
- /**
- * @return
- */
- public static EntityResolver getDefaultEntityResolver() {
- return defaultEntityResolver;
- }
-
- /**
- * @param resolver
- */
- public static void setDefaultEntityResolver(EntityResolver resolver) {
- defaultEntityResolver = resolver;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DanglingHREFException.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DanglingHREFException.java
deleted file mode 100644
index 21f9254f7..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DanglingHREFException.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on May 12, 2003
- *
- */
-package org.eclipse.wst.common.internal.emf.utilities;
-
-/**
- * Exception thrown when a proxy can not be resolved
- */
-public class DanglingHREFException extends Exception {
-
-
- public DanglingHREFException() {
- super();
- }
-
- /**
- * @param s
- */
- public DanglingHREFException(String s) {
- super(s);
- }
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DefaultFeatureValueConverter.java b/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DefaultFeatureValueConverter.java
deleted file mode 100644
index 92270606e..000000000
--- a/plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/DefaultFeatureValueConverter.java
+++ /dev/null
@@ -1,321 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.common.internal.emf.utilities;
-
-
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EEnumLiteral;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.EcorePackage;
-
-/**
- * Insert the type's description here. Creation date: (5/10/2001 2:49:49 PM)
- *
- * @author: Administrator
- */
-public class DefaultFeatureValueConverter implements FeatureValueConverter {
- private static final String FAILED_CONVERSION_PATTERN = WFTUtilsResourceHandler.Failed_to_convert__0__to___ERROR_;
-
- /**
- * DefaultFeatureValueConverter constructor comment.
- */
- public DefaultFeatureValueConverter() {
- super();
- }
-
- /**
- * Convert
- *
- * @aValue to a Boolean.
- */
- protected Object convertToBoolean(Object aValue) {
- if (aValue instanceof String)
- return Boolean.valueOf((String) aValue);
- if (aValue instanceof Boolean)
- return aValue;
- return failedToConvert(aValue, WFTUtilsResourceHandler.Boolean_UI_);
- }
-
- /**
- * Convert
- *
- * @aValue to a Byte.
- */
- protected Object convertToByte(Object aValue) {
- if (aValue instanceof String)
- return Byte.valueOf((String) aValue);
- if (aValue instanceof Byte)
- return aValue;
- return failedToConvert(aValue, WFTUtilsResourceHandler.Byte_UI_);
- }
-
- /**
- * Convert
- *
- * @aValue to a Character.
- */
- protected Object convertToCharacter(Object aValue) {
- if (aValue instanceof String && ((String) aValue).length() == 1)
- return new Character(((String) aValue).charAt(0));
- if (aValue instanceof Character)
- return aValue;
- return failedToConvert(aValue, WFTUtilsResourceHandler.Character_UI_);
- }
-
- /**
- * Convert
- *
- * @aValue to a Double.
- */
- protected Object convertToDouble(Object aValue) {
- if (aValue instanceof String) {
- try {
- return Double.valueOf((String) aValue);
- } catch (NumberFormatException e) {
- return defaultDouble();
- }
- }
- if (aValue instanceof Double)
- return aValue;
- return failedToConvert(aValue, WFTUtilsResourceHandler.Double_UI_);
- }
-
- /**
- * Convert
- *
- * @aValue to a EEnumLiteral.
- */
- protected Object convertToEnum(Object aValue, EStructuralFeature aFeature) {
- EEnumLiteral literal = null;
- EEnum eenum = (EEnum) aFeature.getEType();
- if (aValue instanceof String)
- literal = eenum.getEEnumLiteral((String) aValue);
- else if (aValue instanceof Integer)
- literal = eenum.getEEnumLiteral(((Integer) aValue).intValue());
- else if (aValue instanceof EEnumLiteral)
- literal = (EEnumLiteral) aValue;
-
- if (literal == null)
- return failedToConvert(aValue, WFTUtilsResourceHandler.Enumeration_UI_);
-
- return literal.getInstance();
- }
-
- /**
- * Convert
- *
- * @aValue to a Float.
- */
- protected Object convertToFloat(Object aValue) {
- if (aValue instanceof String) {
- try {
- return Float.valueOf((String) aValue);
- } catch (NumberFormatException e) {
- return defaultFloat();
- }
- }
- if (aValue instanceof Float)
- return aValue;
- return failedToConvert(aValue, WFTUtilsResourceHandler.Float_UI_);
- }
-
- /**
- * Convert
- *
- * @aValue to a Integer.
- */
- protected Object convertToInteger(Object aValue) {
- if (aValue instanceof String) {
- try {
- return Integer.valueOf((String) aValue);
- } catch (NumberFormatException e) {
- return defaultInteger();
- }
- }
- if (aValue instanceof Integer)
- return aValue;
- return failedToConvert(aValue, WFTUtilsResourceHandler.Integer_UI_);
- }
-
- /**
- * Convert
- *
- * @aValue to a Java Object.
- */
- protected Object convertToJavaObject(Object aValue) {
- return aValue;
- }
-
- /**
- * Convert
- *
- * @aValue to a Long.
- */
- protected Object convertToLong(Object aValue) {
- if (aValue instanceof String) {
- try {
- return Long.valueOf((String) aValue);
- } catch (NumberFormatException e) {
- return defaultLong();
- }
- }
- if (aValue instanceof Long)