Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.wst.wsi/src/org/eclipse/wst/wsi/internal/core/profile/validator/impl/wsdl/AP2944.java')
-rw-r--r--bundles/org.eclipse.wst.wsi/src/org/eclipse/wst/wsi/internal/core/profile/validator/impl/wsdl/AP2944.java234
1 files changed, 0 insertions, 234 deletions
diff --git a/bundles/org.eclipse.wst.wsi/src/org/eclipse/wst/wsi/internal/core/profile/validator/impl/wsdl/AP2944.java b/bundles/org.eclipse.wst.wsi/src/org/eclipse/wst/wsi/internal/core/profile/validator/impl/wsdl/AP2944.java
deleted file mode 100644
index ca93a7bfd..000000000
--- a/bundles/org.eclipse.wst.wsi/src/org/eclipse/wst/wsi/internal/core/profile/validator/impl/wsdl/AP2944.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002-2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.wsi.internal.core.profile.validator.impl.wsdl;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.wsdl.Binding;
-import javax.wsdl.BindingInput;
-import javax.wsdl.BindingOperation;
-import javax.wsdl.BindingOutput;
-import javax.wsdl.Input;
-import javax.wsdl.Message;
-import javax.wsdl.Output;
-import javax.wsdl.Part;
-import javax.wsdl.extensions.ExtensibilityElement;
-import javax.wsdl.extensions.mime.MIMEContent;
-import javax.wsdl.extensions.mime.MIMEMultipartRelated;
-import javax.wsdl.extensions.mime.MIMEPart;
-
-import org.eclipse.wst.wsi.internal.core.WSIConstants;
-import org.eclipse.wst.wsi.internal.core.WSIException;
-import org.eclipse.wst.wsi.internal.core.WSITag;
-import org.eclipse.wst.wsi.internal.core.analyzer.AssertionFailException;
-import org.eclipse.wst.wsi.internal.core.analyzer.AssertionNotApplicableException;
-import org.eclipse.wst.wsi.internal.core.profile.TestAssertion;
-import org.eclipse.wst.wsi.internal.core.profile.validator.EntryContext;
-import org.eclipse.wst.wsi.internal.core.profile.validator.impl.AssertionProcess;
-import org.eclipse.wst.wsi.internal.core.report.AssertionResult;
-
-/**
- * AP2944
- *
- * <context>For a candidate wsdl:binding</context>
- * <assertionDescription>In a DESCRIPTION, if a wsdl:part element refers to a
- * global element declaration (via the element attribute of the wsdl:part element)
- * then the value of the type attribute of a mime:content element that binds that part
- * is a content type suitable for carrying an XML serialization.</assertionDescription>
- */
-public class AP2944 extends AssertionProcess implements WSITag
-{
- private final WSDLValidatorImpl validator;
-
- // A variable that indicates a binding contains mime:content elements
- // that bind wsdl:partS defined with the element attribute
- private boolean mimeContentFound;
- /**
- * @param WSDLValidatorImpl
- */
- public AP2944(WSDLValidatorImpl impl)
- {
- super(impl);
- this.validator = impl;
- }
-
- /* Validates the test assertion.
- * @see org.wsi.test.profile.validator.impl.BaseValidatorImpl.AssertionProcess#validate(org.wsi.test.profile.TestAssertion, org.wsi.test.profile.validator.EntryContext)
- */
- public AssertionResult validate(
- TestAssertion testAssertion,
- EntryContext entryContext)
- throws WSIException
- {
- // Resetting the variable
- mimeContentFound = false;
-
- try
- {
- // Getting a wsdl:binding
- Binding binding = (Binding) entryContext.getEntry().getEntryDetail();
-
- // Getting its wsdl:operation elements
- List ops = binding.getBindingOperations();
-
- // Going through the operation elements
- for (int i = 0; i < ops.size(); i++)
- {
- BindingOperation bindingOperation = (BindingOperation) ops.get(i);
-
- // Getting wsdl:input and wsdl:output elements of an operation
- BindingInput bindingInput = bindingOperation.getBindingInput();
- BindingOutput bindingOutput = bindingOperation.getBindingOutput();
-
- // Collecting all the mime:content elements from wsdl:input and wsdl:output
- List inputMimeContents = getMimeContentElements(
- bindingInput == null ? null : bindingInput.getExtensibilityElements());
- List outputMimeContents = getMimeContentElements(
- bindingOutput == null ? null : bindingOutput.getExtensibilityElements());
-
- // If the wsdl:input contains mime:content elements
- if (!inputMimeContents.isEmpty())
- {
- Input portTypeInput = bindingOperation.getOperation().getInput();
- // If the corresponding wsdl:input exists in wsdl:portType
- // and includes the message attribute
- if (portTypeInput != null && portTypeInput.getMessage() != null)
- {
- // If there is an invalid mime:content element
- MIMEContent imc = getInvalidMimeContent(
- inputMimeContents, portTypeInput.getMessage());
- if (imc != null)
- {
- throw new AssertionFailException("The mime:content element in "
- + "the wsdl:input of the \"" + bindingOperation.getName()
- + "\" that binds the \"" + imc.getPart()
- + "\" wsdl:part uses the invalid content type \""
- + imc.getType() + "\". ");
- }
- }
- }
-
- // If the wsdl:output contains mime:content elements
- if (!outputMimeContents.isEmpty())
- {
- Output portTypeOutput = bindingOperation.getOperation().getOutput();
- // If the corresponding wsdl:output exists in wsdl:portType
- // and includes the message attribute
- if (portTypeOutput != null && portTypeOutput.getMessage() != null)
- {
- // If there is an invalid mime:content element
- MIMEContent imc = getInvalidMimeContent(
- outputMimeContents, portTypeOutput.getMessage());
- if (imc != null)
- {
- throw new AssertionFailException("The mime:content element in "
- + "the wsdl:output of the \"" + bindingOperation.getName()
- + "\" that binds the \"" + imc.getPart()
- + "\" wsdl:part uses the invalid content type \""
- + imc.getType() + "\". ");
- }
- }
- }
- }
- // If mime:content elements are not found,
- // the assertion is not applicable
- if (!mimeContentFound)
- throw new AssertionNotApplicableException();
- }
- catch (AssertionNotApplicableException anae)
- {
- result = AssertionResult.RESULT_NOT_APPLICABLE;
- }
- catch (AssertionFailException afe)
- {
- result = AssertionResult.RESULT_FAILED;
- failureDetail = validator.createFailureDetail(
- afe.getMessage(), entryContext);
- }
- // Return assertion result
- return validator.createAssertionResult(
- testAssertion, result, failureDetail);
- }
-
- /**
- * Checks whether any mime:content element binds wsdl:part that is defined
- * with the element attribute and uses the content type "text/xml".
- * @param mimeContents a list of mime:content elements of binding operation.
- * @param message the corresponding wsdl:message element.
- * @return a mime:content element that uses a content type other than
- * "text/xml", null if no one such element is found.
- */
- private MIMEContent getInvalidMimeContent(List mimeContents, Message message)
- {
- // Going through a list of mime:content elements
- for (int i = 0; i < mimeContents.size(); i++)
- {
- MIMEContent mimeContent = (MIMEContent) mimeContents.get(i);
- // Getting the corresponding wsdl:part
- Part part = message.getPart(mimeContent.getPart());
- // If the part is defined with the element attribute
- if (part != null && part.getElementName() != null)
- {
- mimeContentFound = true;
- // If the type attribute value is other than "text/xml"
- if (!WSIConstants.CONTENT_TYPE_TEXT_XML.equals(mimeContent.getType()))
- {
- // return the invalid element
- return mimeContent;
- }
- }
- }
- return null;
- }
-
- /**
- * Collects all mime:content elements.
- * @param extElems a list of extensibility elements that can contain mime:contentS.
- * @return the list of mime:content elements found.
- */
- private List getMimeContentElements(List extElems)
- {
- List mimeContentElements = new ArrayList();
-
- if (extElems != null)
- {
- // Going through all the extensibility elements
- for (int i = 0; i < extElems.size(); i++)
- {
- ExtensibilityElement extElem = (ExtensibilityElement) extElems.get(i);
- // If the element is mime:multipartRelated
- if (extElem.getElementType().equals(WSDL_MIME_MULTIPART))
- {
- // Getting the mime:part elements of the mime:multipartRelated
- List mimeParts = ((MIMEMultipartRelated) extElem).getMIMEParts();
- // Going through all the mime:part elements
- for (int j = 0; j < mimeParts.size(); j++)
- {
- // Collecting all the mime:content elements of this mime:part
- List elems = getMimeContentElements(
- ((MIMEPart) mimeParts.get(j)).getExtensibilityElements());
- // Adding the elements to the list being returned
- mimeContentElements.addAll(elems);
- }
- }
- // Else if the element is mime:content
- else if (extElem.getElementType().equals(WSDL_MIME_CONTENT))
- {
- // Adding the element to the list being returned
- mimeContentElements.add(extElem);
- }
- }
- }
-
- return mimeContentElements;
- }
-} \ No newline at end of file

Back to the top

='mode'>-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.java297
-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.xml33
-rw-r--r--plugins/org.eclipse.jem.util/property_files/emfworkbench.properties16
-rw-r--r--plugins/org.eclipse.jem.util/schema/uiContextSensitiveClass.exsd136
-rw-r--r--plugins/org.eclipse.jem.util/schema/uiTester.exsd104
-rw-r--r--plugins/org.eclipse.wst.common.emf/.classpath8
-rw-r--r--plugins/org.eclipse.wst.common.emf/.cvsignore4
-rw-r--r--plugins/org.eclipse.wst.common.emf/.project28
-rw-r--r--plugins/org.eclipse.wst.common.emf/build.properties19
-rw-r--r--plugins/org.eclipse.wst.common.emf/component.xml1
-rw-r--r--plugins/org.eclipse.wst.common.emf/plugin.xml56
-rw-r--r--plugins/org.eclipse.wst.common.emf/prepareforpii.xml37
-rw-r--r--plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/plugin/EcoreUtilitiesPlugin.java50
-rw-r--r--plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/plugin/PackageURIMapReader.java73
-rw-r--r--plugins/org.eclipse.wst.common.emf/workbench/org/eclipse/wst/common/internal/emf/plugin/PluginRendererFactoryDefaultHandler.java53
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/AbstractRendererImpl.java148
-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.java240
-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.java1740
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/EMF2DOMRenderer.java257
-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.java176
-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.java90
-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.java73
-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.java116
-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.java301
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/resource/Renderer.java60
-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/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/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.java369
-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.java681
-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.java247
-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.java73
-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/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/UnsupportedCryptoAlgorithmException.java16
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/org/eclipse/wst/common/internal/emf/utilities/WFTUtilsResourceHandler.java61
-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.properties25
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/wftutils_de.properties25
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/wftutils_es.properties25
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/wftutils_fr.properties25
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/wftutils_it.properties25
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/wftutils_ja.properties25
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/wftutils_ko.properties25
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/wftutils_pt_BR.properties25
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/wftutils_zh_CN.properties25
-rw-r--r--plugins/org.eclipse.wst.common.emf/wtpemf/wftutils_zh_TW.properties25
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/.classpath8
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/.cvsignore4
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/.project28
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/build.properties16
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/plugin.xml70
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/prepareforpii.xml37
-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.exsd140
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/schema/editModel.exsd178
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/schema/editModelExtension.exsd127
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/schema/modifierHelperFactory.exsd156
-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/EMFAdapterFactory.java66
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/EMFWorkbenchContext.java369
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/EMFWorkbenchEditResourceHandler.java78
-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.java447
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/AdapterFactoryDescriptor.java160
-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.java103
-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.java48
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EditModelExtension.java67
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EditModelExtensionRegistry.java99
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/edit/EditModelRegistry.java257
-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/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.java280
-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.java643
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EMFWorkbenchEditPlugin.java85
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/integration/EditModel.java1543
-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.java362
-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.java275
-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.java356
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/operation/DataObjectGenerator.java401
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/operation/DataObjectGeneratorModel.java345
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/operation/EditModelOperation.java109
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/operation/EditModelOperationDataModel.java64
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/operation/ModelModifierOperation.java126
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/operation/ModelModifierOperationDataModel.java43
-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.java56
-rw-r--r--plugins/org.eclipse.wst.common.emfworkbench.integration/src/org/eclipse/wst/common/internal/emfworkbench/validateedit/ResourceStateValidatorImpl.java445
-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.ui/.classpath7
-rw-r--r--plugins/org.eclipse.wst.common.ui/.cvsignore5
-rw-r--r--plugins/org.eclipse.wst.common.ui/.project28
-rw-r--r--plugins/org.eclipse.wst.common.ui/README.txt1
-rw-r--r--plugins/org.eclipse.wst.common.ui/build.properties6
-rw-r--r--plugins/org.eclipse.wst.common.ui/component.xml61
-rw-r--r--plugins/org.eclipse.wst.common.ui/plugin.properties132
-rw-r--r--plugins/org.eclipse.wst.common.ui/plugin.xml30
-rw-r--r--plugins/org.eclipse.wst.common.ui/schema/exampleProjectCreationWizard.exsd243
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/ImageFactory.java92
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/OverlayIconManager.java239
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/UIPlugin.java167
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/WindowUtility.java118
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/actionhandler/ActionHandlerListener.java325
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/actionhandler/action/CopyAction.java49
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/actionhandler/action/CutAction.java49
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/actionhandler/action/EditAction.java111
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/actionhandler/action/PasteAction.java49
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/dialogs/SelectSingleFileDialog.java117
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/dnd/DefaultDragAndDropCommand.java112
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/dnd/DragAndDropCommand.java31
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/dnd/DragAndDropManager.java21
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/dnd/ObjectTransfer.java119
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/dnd/ViewerDragAdapter.java88
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/dnd/ViewerDropAdapter.java770
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/resources/ChangeHelper.java134
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/resources/IExternalChangeEditorListener.java23
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/resources/IValidateEditEditor.java19
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/resources/PropertyResourceChangeListener.java116
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/internal/resources/ResourceChangeListener.java200
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/resource/ResourceDeleteListener.java171
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/viewers/NavigableTableViewer.java49
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/viewers/ResourceFilter.java103
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/viewers/SelectMultiFilePage.java392
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/viewers/SelectSingleFilePage.java97
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/viewers/SelectSingleFileView.java403
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/viewers/TableNavigator.java411
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/wizards/ExampleProjectCreationOperation.java204
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/wizards/ExampleProjectCreationWizard.java228
-rw-r--r--plugins/org.eclipse.wst.common.ui/src/org/eclipse/wst/common/ui/wizards/ExampleProjectCreationWizardPage.java110
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/.classpath7
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/.cvsignore5
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/.project28
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/README.txt1
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/build.properties5
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/plugin.xml24
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/src/org/eclipse/wst/common/uriresolver/URIResolver.java28
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/src/org/eclipse/wst/common/uriresolver/URIResolverExtension.java23
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/src/org/eclipse/wst/common/uriresolver/URIResolverPlugin.java64
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/src/org/eclipse/wst/common/uriresolver/internal/ExtensibleURIResolver.java135
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/src/org/eclipse/wst/common/uriresolver/internal/URI.java2019
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/src/org/eclipse/wst/common/uriresolver/internal/URIResolverExtensionDescriptor.java79
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/src/org/eclipse/wst/common/uriresolver/internal/URIResolverExtensionRegistry.java129
-rw-r--r--plugins/org.eclipse.wst.common.uriresolver/src/org/eclipse/wst/common/uriresolver/internal/URIResolverExtensionRegistryReader.java104
-rw-r--r--plugins/org.eclipse.wst.internet.cache/.classpath7
-rw-r--r--plugins/org.eclipse.wst.internet.cache/.cvsignore1
-rw-r--r--plugins/org.eclipse.wst.internet.cache/.project28
-rw-r--r--plugins/org.eclipse.wst.internet.cache/META-INF/MANIFEST.MF16
-rw-r--r--plugins/org.eclipse.wst.internet.cache/build.properties5
-rw-r--r--plugins/org.eclipse.wst.internet.cache/exsd/cacheresource.exsd101
-rw-r--r--plugins/org.eclipse.wst.internet.cache/plugin.properties15
-rw-r--r--plugins/org.eclipse.wst.internet.cache/plugin.xml29
-rw-r--r--plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/Cache.java522
-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.java92
-rw-r--r--plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/CachePlugin.java163
-rw-r--r--plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/CachePluginResources.properties24
-rw-r--r--plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/CacheURIResolverExtension.java45
-rw-r--r--plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/ToCacheRegistryReader.java99
-rw-r--r--plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/preferences/CachePreferencePage.java255
-rw-r--r--plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/preferences/PreferenceConstants.java21
-rw-r--r--plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/preferences/PreferenceInitializer.java32
-rw-r--r--plugins/org.eclipse.wst.validation.ui/.classpath8
-rw-r--r--plugins/org.eclipse.wst.validation.ui/.cvsignore4
-rw-r--r--plugins/org.eclipse.wst.validation.ui/.project26
-rw-r--r--plugins/org.eclipse.wst.validation.ui/build.properties16
-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/plugin.properties16
-rw-r--r--plugins/org.eclipse.wst.validation.ui/plugin.xml75
-rw-r--r--plugins/org.eclipse.wst.validation.ui/prepareforpii.xml38
-rw-r--r--plugins/org.eclipse.wst.validation.ui/property_files/validate_ui.properties113
-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/ProgressAndTextDialog.java160
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ResourceConstants.java89
-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/ValidateAction.java66
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidationMenuAction.java561
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidationPreferencePage.java946
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/ValidationPropertiesPage.java1033
-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/plugin/RunnableWithProgressWrapper.java97
-rw-r--r--plugins/org.eclipse.wst.validation.ui/validateui/org/eclipse/wst/validation/internal/ui/plugin/ValidationUIPlugin.java100
-rw-r--r--plugins/org.eclipse.wst.validation/.classpath9
-rw-r--r--plugins/org.eclipse.wst.validation/.cvsignore5
-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/build.properties22
-rw-r--r--plugins/org.eclipse.wst.validation/component.xml1
-rw-r--r--plugins/org.eclipse.wst.validation/plugin.properties17
-rw-r--r--plugins/org.eclipse.wst.validation/plugin.xml131
-rw-r--r--plugins/org.eclipse.wst.validation/prepareforpii.xml38
-rw-r--r--plugins/org.eclipse.wst.validation/property_files/validate_base.properties139
-rw-r--r--plugins/org.eclipse.wst.validation/property_files/validate_base_de.properties139
-rw-r--r--plugins/org.eclipse.wst.validation/property_files/validate_base_es.properties139
-rw-r--r--plugins/org.eclipse.wst.validation/property_files/validate_base_fr.properties139
-rw-r--r--plugins/org.eclipse.wst.validation/property_files/validate_base_it.properties139
-rw-r--r--plugins/org.eclipse.wst.validation/property_files/validate_base_ja.properties139
-rw-r--r--plugins/org.eclipse.wst.validation/property_files/validate_base_ko.properties139
-rw-r--r--plugins/org.eclipse.wst.validation/property_files/validate_base_pt_BR.properties139
-rw-r--r--plugins/org.eclipse.wst.validation/property_files/validate_base_zh_CN.properties138
-rw-r--r--plugins/org.eclipse.wst.validation/property_files/validate_base_zh_TW.properties139
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ConfigurationConstants.java78
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ConfigurationManager.java275
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/EventManager.java430
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/FilterUtil.java729
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/GlobalConfiguration.java186
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/InternalValidatorManager.java207
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ProjectConfiguration.java615
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ReferencialFileValidatorExtension.java83
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ReferencialFileValidatorRegistryReader.java117
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/RegistryConstants.java71
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ResourceConstants.java117
-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.java170
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidationConfiguration.java770
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidationFactoryImpl.java24
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidationRegistryReader.java1369
-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.java104
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidatorMetaData.java482
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidatorNameFilter.java152
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidatorTypeFilter.java154
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/AllValidatorsOperation.java73
-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.java215
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/EnabledValidatorsOperation.java120
-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/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.java298
-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.java1438
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidationUtility.java122
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidatorManager.java1335
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidatorSubsetOperation.java300
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/WorkbenchContext.java717
-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.java720
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/plugin/ValidationPlugin.java159
-rw-r--r--plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/provisional/ValidationFactory.java36
-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.java373
-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.java163
-rw-r--r--plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/core/ValidatorLauncher.java93
-rw-r--r--plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/provisional/core/IMessage.java330
-rw-r--r--plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/provisional/core/IMetaModelContext.java7
-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.java79
-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/MessageLimitException.java27
-rw-r--r--plugins/org.eclipse.wst.validation/xsds/referencialFileExtSchema.exsd119
-rw-r--r--plugins/org.eclipse.wst.validation/xsds/validatorExtSchema.exsd280
427 files changed, 0 insertions, 74779 deletions
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/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/about.html b/plugins/org.eclipse.jem.util/about.html
deleted file mode 100644
index 6f6b96c4c..000000000
--- a/plugins/org.eclipse.jem.util/about.html
+++ /dev/null
@@ -1,22 +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>
-
-</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 34a35dc13..000000000
--- a/plugins/org.eclipse.jem.util/build.properties
+++ /dev/null
@@ -1,21 +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
-###############################################################################
-source.util.jar = jemutil/,\
- property_files/,\
- jemutil-nonworkbnech/
-output.util.jar = bin/
-bin.includes = plugin.xml,\
- util.jar,\
- .options,\
- about.html,\
- plugin.properties
-src.includes = schema/,\
- about.html
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 a58566650..000000000
--- a/plugins/org.eclipse.jem.util/jemutil-nonworkbnech/org/eclipse/jem/util/logger/LogEntry.java
+++ /dev/null
@@ -1,322 +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: LogEntry.java,v $
- * $Revision: 1.2 $ $Date: 2005/02/15 23:05:54 $
- */
-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.
- *
- *
- * @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
- */
- public void setMessageTypeIdentifier(String string) {
- messageTypeIdentifier = string;
- }
-
- /**
- * Set message type id. Same as <code>setMessageTypeIdentifier.</code>
- * @param string
- *
- * @since 1.0.0
- */
- public void setMessageTypeID(String string) {
- setMessageTypeIdentifier(string);
- }
-
- /**
- * Set tokens. (Currently this is ignored).
- *
- * @param strings
- *
- * @since 1.0.0
- */
- public void setTokens(String[] strings) {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#toString()
- */
- public String toString() {
- StringBuffer b = new StringBuffer();
- if (text != null)
- b.append(text);
- if (_caughtException != null)
- b.append(_caughtException.toString());
- return b.toString();
- }
-
-} \ No newline at end of file
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 fb87172f7..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 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.2 $ $Date: 2005/02/15 23:05:54 $
- */
-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);
-
- /**
- * 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);
-
- /**
- * 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 6dc9f8a85..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 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.2 $ $Date: 2005/02/15 23:05:54 $
- */
-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;
- }
-
-} \ No newline at end of file
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 465bfe40f..000000000
--- a/plugins/org.eclipse.jem.util/jemutil-nonworkbnech/org/eclipse/jem/util/logger/proxy/Logger.java
+++ /dev/null
@@ -1,836 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * $RCSfile: Logger.java,v $
- * $Revision: 1.2 $ $Date: 2005/02/15 23:05:54 $
- */
-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 {
- 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()));
-
- 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(": ");
- 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 ***",
- "+++ Warning +++",
- "Info",
- "[Trace]"
- };
-
- 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 450b46e84..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/internal/util/emf/workbench/EMFWorkbenchContextFactory.java
+++ /dev/null
@@ -1,167 +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.2 $$ $$Date: 2005/02/15 23:04:14 $$
- */
-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);
- if (context == null) {
- context = primCreateEMFContext(aProject);
- cacheEMFContext(aProject, context);
- if (contributor == null)
- initializeEMFContextFromContributors(aProject, context);
- }
- if (contributor != null && context != null)
- contributor.primaryContributeToContext(context);
- return context;
- }
-
- protected void initializeEMFContextFromContributors(IProject aProject, EMFWorkbenchContextBase emfContext) {
- if (aProject == null || emfContext == null)
- return;
- 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))
- ((IEMFContextContributor) nature).primaryContributeToContext(emfContext);
- }
- }
-
- 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/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 c24fcee79..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/PerformanceMonitorUtil.java
+++ /dev/null
@@ -1,273 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * $RCSfile: PerformanceMonitorUtil.java,v $
- * $Revision: 1.4 $ $Date: 2005/02/15 23:04:14 $
- */
-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 {
-
- 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
- // exception otherwise.
- Class presentClass = Class.forName("org.eclipse.jem.util.PresentPerformanceMonitor"); // Get the class we use wrapper it.
- 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;}
-} \ No newline at end of file
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 4f4897831..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/PresentPerformanceMonitor.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * $RCSfile: PresentPerformanceMonitor.java,v $
- * $Revision: 1.4 $ $Date: 2005/02/15 23:04:14 $
- */
-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);
- }
-
-} \ No newline at end of file
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 3f3cfbe61..000000000
--- a/plugins/org.eclipse.jem.util/jemutil/org/eclipse/jem/util/RegistryReader.java
+++ /dev/null
@@ -1,156 +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: RegistryReader.java,v $$
- * $$Revision: 1.2 $$ $$Date: 2005/02/15 23:04:14 $$
- */
-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.getNamespace();
- }
-
- 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.getNamespace() + ", 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;
- }
-
- /**