Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon McDuff2008-10-28 14:00:35 +0000
committerSimon McDuff2008-10-28 14:00:35 +0000
commit2a61d4ffabe3f0d04b6c417335a092b9c2d59d2c (patch)
tree80256ad99821ba94d9377459ad73996bb2a47d99 /plugins
parente032e6a8f73447b4d9e89f1f0d4a90da19eefb9e (diff)
downloadcdo-2a61d4ffabe3f0d04b6c417335a092b9c2d59d2c.tar.gz
cdo-2a61d4ffabe3f0d04b6c417335a092b9c2d59d2c.tar.xz
cdo-2a61d4ffabe3f0d04b6c417335a092b9c2d59d2c.zip
[252214] NPE when calling audit.setTimeStamp()
https://bugs.eclipse.org/bugs/show_bug.cgi?id=252214
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllTestsAllConfigs.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_252214_Test.java89
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java7
3 files changed, 97 insertions, 1 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllTestsAllConfigs.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllTestsAllConfigs.java
index 1edefe0d50..6112ea3f41 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllTestsAllConfigs.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllTestsAllConfigs.java
@@ -26,6 +26,7 @@ import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_251087_Test;
import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_251263_Test;
import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_251544_Test;
import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_251752_Test;
+import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_252214_Test;
import org.eclipse.emf.cdo.tests.config.ConfigTest;
import org.eclipse.emf.cdo.tests.config.ConfigTestSuite;
@@ -97,6 +98,7 @@ public class AllTestsAllConfigs extends ConfigTestSuite
testClasses.add(Bugzilla_251263_Test.class);
testClasses.add(Bugzilla_251544_Test.class);
testClasses.add(Bugzilla_251752_Test.class);
+ testClasses.add(Bugzilla_252214_Test.class);
// TODO testClasses.add(NonCDOResourceTest.class);
// TODO testClasses.add(GeneratedEcoreTest.class);
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_252214_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_252214_Test.java
new file mode 100644
index 0000000000..30a4a8a5d2
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_252214_Test.java
@@ -0,0 +1,89 @@
+/***************************************************************************
+ * Copyright (c) 2008 Eike Stepper, Germany.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Simon McDuff - initial API and implementation
+ **************************************************************************/
+
+package org.eclipse.emf.cdo.tests.bugzilla;
+
+import org.eclipse.emf.cdo.CDOAudit;
+import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.cdo.CDOSession;
+import org.eclipse.emf.cdo.CDOTransaction;
+import org.eclipse.emf.cdo.common.revision.CDORevision;
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.server.IRepository;
+import org.eclipse.emf.cdo.tests.AbstractCDOTest;
+import org.eclipse.emf.cdo.tests.model1.Company;
+import org.eclipse.emf.cdo.util.CDOUtil;
+
+import org.eclipse.emf.internal.cdo.CDOStateMachine;
+import org.eclipse.emf.internal.cdo.InternalCDOObject;
+
+import java.util.Map;
+
+/**
+ * NPE when calling audit.setTimeStamp()
+ * <p>
+ * See https://bugs.eclipse.org/252214
+ *
+ * @author Simon McDuff
+ */
+public class Bugzilla_252214_Test extends AbstractCDOTest
+{
+ @Override
+ public Map<String, Object> getTestProperties()
+ {
+ Map<String, Object> testProperties = super.getTestProperties();
+ testProperties.put(IRepository.Props.SUPPORTING_AUDITS, "true");
+ return testProperties;
+ }
+
+ public void testBugzilla_252214() throws Exception
+ {
+ long commitTime1 = 0;
+ long commitTime2 = 0;
+
+ {
+ CDOSession session = openModel1Session();
+ CDOTransaction transaction = session.openTransaction();
+ CDOResource resource = transaction.createResource("/res1");
+
+ Company company = getModel1Factory().createCompany();
+ company.setName("ESC");
+ resource.getContents().add(company);
+ transaction.commit();
+ commitTime1 = transaction.getLastCommitTime();
+ assertTrue(session.getRepositoryCreationTime() < commitTime1);
+ assertEquals("ESC", company.getName());
+
+ company.setName("Sympedia");
+ transaction.commit();
+ commitTime2 = transaction.getLastCommitTime();
+ assertTrue(commitTime1 < commitTime2);
+ assertTrue(session.getRepositoryCreationTime() < commitTime2);
+ assertEquals("Sympedia", company.getName());
+ }
+ CDOSession session = openModel1Session();
+
+ CDOAudit audit = session.openAudit(commitTime1);
+ {
+ CDOResource auditResource = audit.getResource("/res1");
+ Company auditCompany = (Company)auditResource.getContents().get(0);
+ CDOObject cdoAuditCompany = CDOUtil.getCDOObject(auditCompany);
+ CDOStateMachine.INSTANCE.invalidate((InternalCDOObject)cdoAuditCompany, CDORevision.UNSPECIFIED_VERSION);
+ }
+ audit.setTimeStamp(commitTime2);
+ {
+ CDOResource auditResource = audit.getResource("/res1");
+ Company auditCompany = (Company)auditResource.getContents().get(0);
+ assertEquals("Sympedia", auditCompany.getName());
+ }
+ session.close();
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java
index 9ec886f528..b9aa30f2df 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java
@@ -1177,7 +1177,12 @@ public class CDOViewImpl extends org.eclipse.net4j.util.event.Notifier implement
for (InternalCDOObject object : objects.values())
{
CDORevision revision = object.cdoRevision();
- if (!revision.isValid(timeStamp))
+ if (revision == null)
+ {
+ revision = getRevision(object.cdoID(), false);
+ }
+
+ if (revision == null || !revision.isValid(timeStamp))
{
result.add(object);
}

Back to the top

singException.java?h=v200905242203'>bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/resolver/StopParsingException.java25
-rw-r--r--bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/resolver/XSLVersionHandler.java220
-rwxr-xr-xbundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/encoding/XSLDocumentLoader.java74
-rwxr-xr-xbundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/modelhandler/ModelHandlerForXSL.java63
-rwxr-xr-xbundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/modelhandler/XSLModelLoader.java92
-rw-r--r--bundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/parser/XSLSourceParser.java213
-rwxr-xr-xbundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/parser/regions/XPathSeparatorRegion.java93
-rwxr-xr-xbundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/regions/XPathRegionContext.java27
-rw-r--r--bundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/regions/XSLParserRegionFactory.java19
-rwxr-xr-xbundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/text/IXSLPartitions.java27
-rwxr-xr-xbundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/text/rules/StructuredTextPartitionerForXSL.java64
-rw-r--r--bundles/org.eclipse.wst.xsl.core/xslt-schemas/xinclude.xsd86
-rw-r--r--bundles/org.eclipse.wst.xsl.core/xslt-schemas/xslt-1.0.xsd1708
-rw-r--r--bundles/org.eclipse.wst.xsl.core/xslt-schemas/xslt-2.0.xsd1173
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/.classpath7
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/.cvsignore4
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/.project34
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/.settings/org.eclipse.jdt.core.prefs25
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/.settings/org.eclipse.pde.prefs16
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/META-INF/MANIFEST.MF30
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/about.html34
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/build.properties8
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/icons/brkp_obj.gifbin197 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/icons/localvariable_obj.gifbin152 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/icons/operation.gifbin142 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/icons/sample.gifbin983 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/icons/xslt_launch.gifbin300 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/icons/xslt_output.gifbin352 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/plugin.properties12
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/plugin.xml116
-rwxr-xr-xbundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/debug/internal/util/XSLDebugPluginImages.java34
-rwxr-xr-xbundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/debug/internal/util/XSLPluginImageHelper.java162
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/AbstractTableBlock.java99
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/Messages.java253
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/ResourceSelectionBlock.java654
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/XSLDebugUIConstants.java42
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/XSLDebugUILaunchListener.java154
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/XSLDebugUIPlugin.java192
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/XSLLaunchConfigurationTab.java141
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/XSLLaunchShortcut.java332
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/XSLTTabGroup.java59
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/AbstractParameterAction.java125
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/AbstractStylesheetAction.java201
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/AddExternalFileAction.java83
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/AddParameterAction.java65
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/AddWorkspaceFileAction.java121
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/ControlAccessibleListener.java54
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/MoveDownAction.java79
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/MoveUpAction.java82
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/MultipleInputDialog.java435
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/OpenDialogAction.java66
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/RemoveAction.java59
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/RemoveParameterAction.java54
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/breakpoint/XSLBreakpointProvider.java160
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/messages.properties127
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/model/XSLBreakpointAdapterFactory.java49
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/model/XSLLineBreakpointAdapter.java105
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/model/XSLModelPresentation.java139
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/IParametersChangedListener.java16
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/IStylesheetEntriesChangedListener.java16
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/InputFileBlock.java139
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/ParameterViewer.java107
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/ParametersBlock.java242
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/ParametersContentProvider.java82
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/ParametersLabelProvider.java54
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/StylesheetContentProvider.java73
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/StylesheetLabelProvider.java85
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/StylesheetViewer.java116
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/TransformsBlock.java208
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/XSLMainTab.java223
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/output/OutputFileBlock.java297
-rw-r--r--bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/output/OutputTab.java87
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/.classpath12
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/.project34
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/.settings/org.eclipse.jdt.core.prefs20
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/META-INF/MANIFEST.MF29
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/about.html34
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/build.properties8
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/icons/xslt_processor.gifbin161 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/plugin.properties5
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/plugin.xml70
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/JAXPDebugUIPlugin.java52
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/preferences/AddProcessorDialog.java384
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/preferences/BasePreferencePage.java30
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/preferences/InstalledProcessorsBlock.java646
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/preferences/Messages.java51
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/preferences/ProcessorLibraryBlock.java344
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/preferences/ProcessorsPreferencePage.java162
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/preferences/messages.properties31
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/AttributeDialog.java161
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/AttributesBlock.java367
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/InstallStandin.java29
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/JarContentProvider.java34
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/JarLabelProvider.java26
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/Messages.java22
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/OutputPropertiesBlock.java378
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/OutputPropertyDialog.java160
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/ProcessorBlock.java373
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/ProcessorDescriptor.java16
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/ProcessorDetailsDialog.java113
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/ProcessorMessages.java37
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/ProcessorMessages.properties14
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/XSLProcessorTab2.java98
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/messages.properties11
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/views/ResultRunnable.java83
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/views/ResultView.java124
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/views/ResultViewJob.java73
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug/.classpath7
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug/.project34
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug/.settings/org.eclipse.jdt.core.prefs20
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug/META-INF/MANIFEST.MF11
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug/about.html34
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug/build.properties6
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug/plugin.properties3
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug/src/log4j.properties10
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/debugger/AbstractDebugger.java406
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/debugger/BreakPoint.java77
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/debugger/DebugConstants.java70
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/debugger/DebugRunner.java400
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/debugger/IXSLDebugger.java148
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/debugger/StyleFrame.java128
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/debugger/Variable.java159
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/IProcessorInvoker.java62
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/Messages.java48
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/PipelineDefinition.java301
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/TransformDefinition.java246
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/TransformationException.java42
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/TypedValue.java136
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/internal/ConfigurationException.java32
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/internal/CreationException.java42
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/internal/JAXPSAXProcessorInvoker.java228
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/internal/Main.java86
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/internal/Messages.java48
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/internal/messages.properties10
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/messages.properties25
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/.classpath7
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/.project34
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/.settings/org.eclipse.jdt.core.prefs25
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/JREDefaultAttributes.properties10
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/JREDefaultOutputProperties.properties40
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/META-INF/MANIFEST.MF23
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/about.html34
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/build.properties10
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/log4j.debug.properties10
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/plugin.properties9
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/plugin.xml51
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/schema/debugger.exsd145
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/schema/invoke.exsd93
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/schema/processor.exsd147
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/schema/processorType.exsd167
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/IAttribute.java89
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/IDebugger.java56
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/IOutputProperty.java31
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/IProcessorInstall.java69
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/IProcessorInvoker.java20
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/IProcessorJar.java36
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/IProcessorType.java40
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/ITransformerFactory.java7
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/JAXPLaunchConfigurationConstants.java28
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/JAXPRuntime.java331
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/LaunchAttributes.java104
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/LaunchProperties.java90
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/ProcessorInstall.java148
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/Attribute.java103
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/DebuggerDescriptor.java67
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/FeaturePreferences.java122
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/JAXPJavaLaunchConfigurationDelegate.java431
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/JAXPLaunchingPlugin.java64
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/LaunchHelper.java244
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/Messages.java61
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/OutputProperty.java36
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/OutputPropertyPreferences.java119
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/PluginProcessorJar.java78
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/PreferenceInitializer.java67
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/ProcessorInvokerDescriptor.java96
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/ProcessorJar.java64
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/ProcessorPreferences.java169
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/ProcessorType.java225
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/TransformerFactory.java27
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/Utils.java57
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/messages.properties47
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/registry/AbstractRegistryReader.java126
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/registry/DebuggerRegistry.java43
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/registry/DebuggerRegistryReader.java97
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/registry/InvokerRegistry.java42
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/registry/InvokerRegistryReader.java79
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/registry/ProcessorRegistry.java181
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/registry/ProcessorRegistryReader.java90
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/registry/ProcessorTypeRegistry.java146
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/registry/ProcessorTypeRegistryReader.java82
-rw-r--r--bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/model/JAXPDebugTarget.java583
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/.classpath7
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/.cvsignore4
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/.project34
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/.settings/org.eclipse.jdt.core.prefs25
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/.settings/org.eclipse.pde.prefs24
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/META-INF/MANIFEST.MF24
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/about.html34
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/build.properties8
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/plugin.properties9
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/plugin.xml50
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/src/org/eclipse/wst/xsl/internal/launching/LaunchingPlugin.java71
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/src/org/eclipse/wst/xsl/internal/launching/Messages.java21
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/src/org/eclipse/wst/xsl/internal/launching/Utils.java57
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/src/org/eclipse/wst/xsl/internal/launching/XSLPropertyTester.java21
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/src/org/eclipse/wst/xsl/internal/launching/XSLTSourceLookupDirector.java22
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/src/org/eclipse/wst/xsl/internal/launching/XSLTSourceLookupParticipant.java30
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/src/org/eclipse/wst/xsl/internal/launching/XSLTSourcePathComputerDelegate.java105
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/src/org/eclipse/wst/xsl/internal/launching/messages.properties4
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/src/org/eclipse/wst/xsl/launching/XSLLaunchConfigurationConstants.java41
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/src/org/eclipse/wst/xsl/launching/XSLTRuntime.java51
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/src/org/eclipse/wst/xsl/launching/config/BaseLaunchHelper.java215
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/src/org/eclipse/wst/xsl/launching/config/LaunchAttribute.java55
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/src/org/eclipse/wst/xsl/launching/config/LaunchPipeline.java148
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/src/org/eclipse/wst/xsl/launching/config/LaunchTransform.java205
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/src/org/eclipse/wst/xsl/launching/config/PreferenceUtil.java159
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/src/org/eclipse/wst/xsl/launching/model/IXSLConstants.java19
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/src/org/eclipse/wst/xsl/launching/model/IXSLDebugTarget.java21
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/src/org/eclipse/wst/xsl/launching/model/NodeListVariable.java97
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/src/org/eclipse/wst/xsl/launching/model/XSLDebugElement.java54
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/src/org/eclipse/wst/xsl/launching/model/XSLLineBreakpoint.java79
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/src/org/eclipse/wst/xsl/launching/model/XSLStackFrame.java249
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/src/org/eclipse/wst/xsl/launching/model/XSLThread.java182
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/src/org/eclipse/wst/xsl/launching/model/XSLValue.java159
-rw-r--r--bundles/org.eclipse.wst.xsl.launching/src/org/eclipse/wst/xsl/launching/model/XSLVariable.java102
-rw-r--r--bundles/org.eclipse.wst.xsl.saxon/.classpath7
-rw-r--r--bundles/org.eclipse.wst.xsl.saxon/.project28
-rw-r--r--bundles/org.eclipse.wst.xsl.saxon/.settings/org.eclipse.jdt.core.prefs15
-rw-r--r--bundles/org.eclipse.wst.xsl.saxon/META-INF/MANIFEST.MF8
-rw-r--r--bundles/org.eclipse.wst.xsl.saxon/SaxonAttributes.properties89
-rw-r--r--bundles/org.eclipse.wst.xsl.saxon/SaxonOutputProperties.properties27
-rw-r--r--bundles/org.eclipse.wst.xsl.saxon/about.html34
-rw-r--r--bundles/org.eclipse.wst.xsl.saxon/build.properties9
-rw-r--r--bundles/org.eclipse.wst.xsl.saxon/plugin.properties7
-rw-r--r--bundles/org.eclipse.wst.xsl.saxon/plugin.xml28
-rw-r--r--bundles/org.eclipse.wst.xsl.saxon/src-debugger/README.txt1
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/.classpath15
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/.project34
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/.settings/org.eclipse.jdt.core.prefs87
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/.settings/org.eclipse.pde.prefs22
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/META-INF/MANIFEST.MF43
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/about.html34
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/build.properties10
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/icons/full/XSDFile.gifbin970 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsl.ui/icons/full/ancestor.gifbin573 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsl.ui/icons/full/directional.gifbin470 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsl.ui/icons/full/family.gifbin598 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsl.ui/icons/full/field_default_obj.gifbin118 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsl.ui/icons/full/function.gifbin100 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsl.ui/icons/full/import.gifbin114 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsl.ui/icons/full/imports.gifbin185 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsl.ui/icons/full/mode.gifbin176 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsl.ui/icons/full/new_xml.gifbin370 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsl.ui/icons/full/newdtd_wiz.gifbin360 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsl.ui/icons/full/operation.gifbin142 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsl.ui/icons/full/over_co.gifbin131 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsl.ui/icons/full/package_obj.gifbin227 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsl.ui/icons/full/template.gifbin100 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsl.ui/icons/full/variable.gifbin191 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsl.ui/icons/full/xslt_file.gifbin354 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsl.ui/icons/full/xslt_launch.gifbin300 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsl.ui/plugin.properties34
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/plugin.xml255
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/ListWorkbenchAdapter.java59
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/Messages.java63
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/PreferenceInitializer.java27
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/StructuredTextViewerConfigurationXSL.java135
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/StylesheetView.java159
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/XSLModelAdapterFactory.java33
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/XSLUIConstants.java17
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/XSLUIPlugin.java154
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/XSLWorkbenchAdapter.java98
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/actions/NewDTDFileWizardDelegate.java43
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/actions/NewWSDLFileWizardDelegate.java43
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/actions/NewWizardAction.java76
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/actions/NewXMLFileWizardDelegate.java43
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/actions/NewXSDFileWizardDelegate.java43
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/actions/NewXSLFileWizardDelegate.java43
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/contentassist/AbstractXMLElementContentAssistRequest.java379
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/contentassist/AbstractXSLContentAssistRequest.java252
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/contentassist/CallTemplateContentAssistRequest.java104
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/contentassist/CustomCompletionProposal.java63
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/contentassist/ExcludeResultPrefixesContentAssist.java120
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/contentassist/IContentAssistProposalRequest.java20
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/contentassist/NullContentAssistRequest.java53
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/contentassist/SelectAttributeContentAssist.java298
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/contentassist/TemplateModeAttributeContentAssist.java105
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/contentassist/TemplateNameAttributeContentAssist.java99
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/contentassist/TestAttributeContentAssist.java92
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/contentassist/XPathElementContentAssist.java118
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/contentassist/XSLContentAssistProcessor.java453
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/contentassist/XSLContentAssistRequestFactory.java184
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/contentassist/XSLElementContentAssistRequest.java124
-rwxr-xr-xbundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/contentassist/contentmodel/XSLContentModelGenerator.java165
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/contentassist/href/HrefContentAssistRequest.java184
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/contentassist/href/PathComparator.java36
-rwxr-xr-xbundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/doubleclick/XSLDoubleClickStrategy.java118
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/editor/OverrideIndicator.java61
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/editor/OverrideIndicatorImageProvider.java64
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/editor/OverrideIndicatorManager.java173
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/editor/SourceFileHyperlink.java121
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/editor/XSLEditor.java73
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/editor/XSLHyperlinkDetector.java236
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/handlers/OpenDeclarationHandler.java87
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/messages.properties53
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/preferences/AbstractValidationSettingsPage.java353
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/preferences/AbstractXSLPreferencePage.java202
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/preferences/ComboData.java51
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/preferences/MainPreferencePage.java75
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/preferences/PropertyPreferencePage.java305
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/preferences/ValidationPreferencePage.java167
-rwxr-xr-xbundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/preferences/XSLSyntaxColoringPage.java926
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/preferences/XSLTemplatePreferencePage.java46
-rwxr-xr-xbundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/preferences/XSLUIPreferenceInitializer.java56
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/preferences/XSLValidationPreferencePage.java347
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/quickassist/OverrideQuickAssist.java40
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/quickassist/ValidationQuickAssist.java56
-rwxr-xr-xbundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/style/IStyleConstantsXSL.java31
-rwxr-xr-xbundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/style/LineStyleProviderForXSL.java518
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/style/XMLRegionMap.java81
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/style/XMLTextAttributeMap.java113
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/style/XSLRegionMap.java56
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/style/XSLTextAttributeMap.java98
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/templates/TemplateContextTypeXSL.java33
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/templates/VersionTemplateVariableResolverXSL.java38
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/templates/XSLTemplatesPage.java259
-rwxr-xr-xbundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/util/XSLPluginImageHelper.java161
-rwxr-xr-xbundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/util/XSLPluginImages.java59
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/validation/DelegatingSourceValidatorForXSL.java124
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/validation/XSLErrorListener.java80
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/validation/XSLMarkupValidator.java95
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/wizards/NewXSLFileTemplatesWizardPage.java417
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/wizards/NewXSLFileWizard.java150
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/wizards/NewXSLFileWizardPage.java167
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/wizards/TemplateContentProvider.java26
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/src/org/eclipse/wst/xsl/ui/internal/wizards/TemplateLabelProvider.java29
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/templates/file_templates.xml34
-rw-r--r--bundles/org.eclipse.wst.xsl.ui/xslfiles/syntaxcoloring.xsl8
-rw-r--r--bundles/org.eclipse.wst.xsl.xalan/.classpath7
-rw-r--r--bundles/org.eclipse.wst.xsl.xalan/.cvsignore4
-rw-r--r--bundles/org.eclipse.wst.xsl.xalan/.project34
-rw-r--r--bundles/org.eclipse.wst.xsl.xalan/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--bundles/org.eclipse.wst.xsl.xalan/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--bundles/org.eclipse.wst.xsl.xalan/.settings/org.eclipse.pde.prefs24
-rw-r--r--bundles/org.eclipse.wst.xsl.xalan/META-INF/MANIFEST.MF17
-rw-r--r--bundles/org.eclipse.wst.xsl.xalan/XalanAttributes.properties21
-rw-r--r--bundles/org.eclipse.wst.xsl.xalan/XalanOutputProperties.properties37
-rw-r--r--bundles/org.eclipse.wst.xsl.xalan/about.html34
-rw-r--r--bundles/org.eclipse.wst.xsl.xalan/build.properties10
-rw-r--r--bundles/org.eclipse.wst.xsl.xalan/plugin.properties8
-rw-r--r--bundles/org.eclipse.wst.xsl.xalan/plugin.xml45
-rw-r--r--bundles/org.eclipse.wst.xsl.xalan/src-debugger/org/eclipse/wst/xsl/xalan/debugger/XalanDebugger.java93
-rw-r--r--bundles/org.eclipse.wst.xsl.xalan/src-debugger/org/eclipse/wst/xsl/xalan/debugger/XalanPrintTraceListener.java104
-rw-r--r--bundles/org.eclipse.wst.xsl.xalan/src-debugger/org/eclipse/wst/xsl/xalan/debugger/XalanRootStyleFrame.java78
-rw-r--r--bundles/org.eclipse.wst.xsl.xalan/src-debugger/org/eclipse/wst/xsl/xalan/debugger/XalanStyleFrame.java200
-rw-r--r--bundles/org.eclipse.wst.xsl.xalan/src-debugger/org/eclipse/wst/xsl/xalan/debugger/XalanTraceListener.java167
-rw-r--r--bundles/org.eclipse.wst.xsl.xalan/src-debugger/org/eclipse/wst/xsl/xalan/debugger/XalanVariable.java218
-rw-r--r--features/org.eclipse.wst.xsl_sdk.feature/.project17
-rw-r--r--features/org.eclipse.wst.xsl_sdk.feature/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--features/org.eclipse.wst.xsl_sdk.feature/.settings/org.eclipse.pde.prefs16
-rw-r--r--features/org.eclipse.wst.xsl_sdk.feature/build.properties7
-rw-r--r--features/org.eclipse.wst.xsl_sdk.feature/eclipse_update_120.jpgbin21695 -> 0 bytes-rw-r--r--features/org.eclipse.wst.xsl_sdk.feature/epl-v10.html328
-rw-r--r--features/org.eclipse.wst.xsl_sdk.feature/feature.properties138
-rw-r--r--features/org.eclipse.wst.xsl_sdk.feature/feature.xml40
-rw-r--r--features/org.eclipse.wst.xsl_sdk.feature/license.html96
414 files changed, 0 insertions, 41927 deletions
diff --git a/bundles/org.eclipse.wst.xsl.core/.classpath b/bundles/org.eclipse.wst.xsl.core/.classpath
deleted file mode 100644
index 27e4bf7..0000000
--- a/bundles/org.eclipse.wst.xsl.core/.classpath
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="src_sse"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
- <accessrules>
- <accessrule kind="accessible" pattern="org/apache/xerces/**"/>
- <accessrule kind="accessible" pattern="org/apache/xalan/**"/>
- <accessrule kind="accessible" pattern="org/apache/xml/**"/>
- <accessrule kind="accessible" pattern="org/apache/xpath/**"/>
- </accessrules>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
- <accessrules>
- <accessrule kind="accessible" pattern="*org/eclipse/wst/xsl/**"/>
- </accessrules>
- </classpathentry>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.wst.xsl.core/.cvsignore b/bundles/org.eclipse.wst.xsl.core/.cvsignore
deleted file mode 100644
index 964f6df..0000000
--- a/bundles/org.eclipse.wst.xsl.core/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-src_xpath
-xpathgrammar
diff --git a/bundles/org.eclipse.wst.xsl.core/.project b/bundles/org.eclipse.wst.xsl.core/.project
deleted file mode 100644
index 72c2525..0000000
--- a/bundles/org.eclipse.wst.xsl.core/.project
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.xsl.core</name>
- <comment>JavaCC Nature</comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>sf.eclipse.javacc.javaccbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>sf.eclipse.javacc.javaccnature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.wst.xsl.core/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.wst.xsl.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 6ccb4ee..0000000
--- a/bundles/org.eclipse.wst.xsl.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,88 +0,0 @@
-#Tue Feb 10 05:37:53 GMT 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeUncheckedExceptions=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/bundles/org.eclipse.wst.xsl.core/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.wst.xsl.core/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index c2645f4..0000000
--- a/bundles/org.eclipse.wst.xsl.core/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Tue Mar 18 11:38:05 GMT 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
diff --git a/bundles/org.eclipse.wst.xsl.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.xsl.core/META-INF/MANIFEST.MF
deleted file mode 100644
index 2e156fd..0000000
--- a/bundles/org.eclipse.wst.xsl.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,43 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name.0
-Bundle-SymbolicName: org.eclipse.wst.xsl.core;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.wst.xsl.core.internal.XSLCorePlugin
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.wst.common.uriresolver;bundle-version="[1.1.301,2.0.0)",
- org.eclipse.wst.xml.core;bundle-version="[1.1.300,2.0.0)",
- org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.wst.sse.core;bundle-version="[1.1.300,2.0.0)",
- org.apache.ant;bundle-version="[1.7.0,2.0.0)";resolution:=optional,
- org.eclipse.wst.validation;bundle-version="[1.1.103,2.0.0)",
- org.apache.xalan;bundle-version="[2.7.1,2.8.0)",
- org.eclipse.wst.xml.xpath.core;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.osgi.util;bundle-version="[3.2.0,4.0.0)"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-ClassPath: .
-Bundle-Localization: plugin
-Bundle-Vendor: %Bundle-Vendor.0
-Export-Package: org.eclipse.wst.xsl.core;uses:="org.eclipse.wst.xsl.core.internal.model,org.eclipse.core.resources,org.eclipse.core.runtime",
- org.eclipse.wst.xsl.core.internal;x-friends:="org.eclipse.wst.xsl.*",
- org.eclipse.wst.xsl.core.internal.ant;x-internal:=true,
- org.eclipse.wst.xsl.core.internal.encoding;x-friends:="org.eclipse.wst.xsl.*",
- org.eclipse.wst.xsl.core.internal.modelhandler;x-friends:="org.eclipse.wst.xsl.*",
- org.eclipse.wst.xsl.core.internal.parser;x-friends:="org.eclipse.wst.xsl.*",
- org.eclipse.wst.xsl.core.internal.parser.regions;x-friends:="org.eclipse.wst.xsl.*",
- org.eclipse.wst.xsl.core.internal.preferences;x-friends:="org.eclipse.wst.xsl.*",
- org.eclipse.wst.xsl.core.internal.regions;x-friends:="org.eclipse.wst.xsl.*",
- org.eclipse.wst.xsl.core.internal.text;x-friends:="org.eclipse.wst.xsl.*",
- org.eclipse.wst.xsl.core.internal.text.rules;x-friends:="org.eclipse.wst.xsl.*",
- org.eclipse.wst.xsl.core.internal.util;x-friends:="org.eclipse.wst.xsl.*",
- org.eclipse.wst.xsl.core.internal.validation;x-friends:="org.eclipse.wst.xsl.*",
- org.eclipse.wst.xsl.core.internal.validation.eclipse;x-friends:="org.eclipse.wst.xsl.*",
- org.eclipse.wst.xsl.core.internal.xinclude;x-friends:="org.eclipse.wst.xsl.*",
- org.eclipse.wst.xsl.core.model,
- org.eclipse.wst.xsl.core.resolver;
- uses:="org.eclipse.wst.common.uriresolver.internal.provisional,
- org.xml.sax,
- org.xml.sax.ext,
- org.xml.sax.helpers,
- org.eclipse.core.resources"
diff --git a/bundles/org.eclipse.wst.xsl.core/about.html b/bundles/org.eclipse.wst.xsl.core/about.html
deleted file mode 100644
index 991d714..0000000
--- a/bundles/org.eclipse.wst.xsl.core/about.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<HTML>
-
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-
-<BODY lang="EN-US">
-
-<H3>About This Content</H3>
-
-<P>June, 2008</P>
-
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-
-<h3>Third Party Content</h3>
-<p>The Content includes items that have been sourced from third parties as set out below. If you
-did not receive this Content directly from the Eclipse Foundation, the following is provided
-for informational purposes only, and you should look to the Redistributor's license for
-terms and conditions of use.</p>
-<p>
-<strong>XSLT and XInclude Schema</strong> <br/><br/>
-
-The following XML Schema in the plug-in are based on W3C code available on the World Wide Web Consortium website
-and shall be defined as the "W3C-Derived Work":<br/><br/>
-
-xslt-schemas/xslt-1.0.xsd (derived from <a href="http://www.w3.org/XML/2000/04schema-hacking/xslt.xsd">W3C XSLT 1.0 Schema</a>)<br/>
-xslt-schemas/xslt-2.0.xsd (derived from <a href="http://www.w3.org/2005/02/schema-for-xslt20.xsd">W3C XSLT 2.0 Schema</a>)<br/>
-xslt-schemas/xinclude.xsd (copied from <a href="http://www.w3.org/TR/xinclude/">XInclude Schema</a>)<br/><br/>
-
-Your use of the W3C-Derived Work is subject to the terms and conditions of the W3C Software License.<br/>
-A copy of the license is contained in the file <a href="about_files/W3CSoftwareLicense.html">W3CSoftwareLicense.html</a> and is
-also available at <a href="http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231">http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231</a>.
-</p>
-
-</BODY>
-</HTML>
diff --git a/bundles/org.eclipse.wst.xsl.core/about_files/W3CSoftwareLicense.html b/bundles/org.eclipse.wst.xsl.core/about_files/W3CSoftwareLicense.html
deleted file mode 100644
index 1dffe56..0000000
--- a/bundles/org.eclipse.wst.xsl.core/about_files/W3CSoftwareLicense.html
+++ /dev/null
@@ -1,99 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <title>W3C Software License</title>
- <link rel="stylesheet" type="text/css" href="/StyleSheets/base.css" />
- <style type="text/css">
- <!--
-h3#version { margin-top: -0.8em;}
--->
-
-
-
-
-
-
-
-
-
- </style>
-</head>
-
-<body text="#000000" bgcolor="#FFFFFF">
-<h1>W3C<sup>®</sup> SOFTWARE NOTICE AND LICENSE</h1>
-
-<h3 id="version"><a
-href="http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231">http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231</a></h3>
-
-<p>This work (and included software, documentation such as READMEs, or other
-related items) is being provided by the copyright holders under the following
-license. By obtaining, using and/or copying this work, you (the licensee)
-agree that you have read, understood, and will comply with the following
-terms and conditions.</p>
-
-<p>Permission to copy, modify, and distribute this software and its
-documentation, with or without modification,&nbsp;for any purpose and without
-fee or royalty is hereby granted, provided that you include the following on
-ALL copies of the software and documentation or portions thereof, including
-modifications:</p>
-<ol>
- <li>The full text of this NOTICE in a location viewable to users of the
- redistributed or derivative work.</li>
- <li>Any pre-existing intellectual property disclaimers, notices, or terms
- and conditions. If none exist, the <a
- href="copyright-software-short-notice-20021231.html">W3C Software Short
- Notice</a> should be included (hypertext is preferred, text is permitted)
- within the body of any redistributed or derivative code.</li>
- <li>Notice of any changes or modifications to the files, including the date
- changes were made. (We recommend you provide URIs to the location from
- which the code is derived.)</li>
-</ol>
-
-<p>THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS
-MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT
-LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
-PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE
-ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.</p>
-
-<p>COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
-DOCUMENTATION.</p>
-
-<p>The name and trademarks of copyright holders may NOT be used in
-advertising or publicity pertaining to the software without specific, written
-prior permission. Title to copyright in this software and any associated
-documentation will at all times remain with copyright holders.</p>
-
-<p></p>
-
-<p>____________________________________</p>
-
-<p>This formulation of W3C's notice and license became active on December 31
-2002. This version removes the copyright ownership notice such that this
-license can be used with materials other than those owned by the W3C,
-reflects that ERCIM is now a host of the W3C, includes references to this
-specific dated version of the license, and removes the ambiguous grant of
-"use". Otherwise, this version is the same as the <a
-href="http://www.w3.org/Consortium/Legal/copyright-software-19980720">previous
-version</a> and is written so as to preserve the <a
-href="http://www.gnu.org/philosophy/license-list.html#GPLCompatibleLicenses">Free
-Software Foundation's assessment of GPL compatibility</a> and <a
-href="http://www.opensource.org/licenses/W3C.php">OSI's certification</a>
-under the <a href="http://www.opensource.org/docs/definition.php">Open Source
-Definition</a>. Please see our <a
-href="http://www.w3.org/Consortium/Legal/IPR-FAQ">Copyright FAQ</a> for
-common questions about using materials from our site, including specific
-terms and conditions for packages like libwww, Amaya, and Jigsaw. Other
-questions about this notice can be directed to <a
-href="mailto:site-policy@w3.org">site-policy@w3.org</a>.<br />
-&nbsp;</p>
-<address>
- Joseph Reagle &lt;<a
- href="mailto:site-policy@w3.org">site-policy@w3.org&gt;</a>
-</address>
-
-<p>Last revised $Id: W3CSoftwareLicense.html,v 1.1 2008/08/02 13:03:11 dsatchwel Exp $</p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.wst.xsl.core/build.properties b/bundles/org.eclipse.wst.xsl.core/build.properties
deleted file mode 100644
index 2c3b42d..0000000
--- a/bundles/org.eclipse.wst.xsl.core/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-source.. = src/,\
- src_sse/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- plugin.properties,\
- xslt-schemas/,\
- lib/,\
- bin/,\
- about.html,\
- about_files/
diff --git a/bundles/org.eclipse.wst.xsl.core/lib/.cvsignore b/bundles/org.eclipse.wst.xsl.core/lib/.cvsignore
deleted file mode 100644
index 6dc6df9..0000000
--- a/bundles/org.eclipse.wst.xsl.core/lib/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-antlr-runtime-3.0.1.jar
-commons-jxpath-1.2.jar
diff --git a/bundles/org.eclipse.wst.xsl.core/lib/xinclude.jar b/bundles/org.eclipse.wst.xsl.core/lib/xinclude.jar
deleted file mode 100644
index fc3203a..0000000
--- a/bundles/org.eclipse.wst.xsl.core/lib/xinclude.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsl.core/plugin.properties b/bundles/org.eclipse.wst.xsl.core/plugin.properties
deleted file mode 100644
index 0c5a5ec..0000000
--- a/bundles/org.eclipse.wst.xsl.core/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-#Properties file for org.eclipse.wst.xsl.core
-Bundle-Name.0 = XSL Core
-Bundle-Vendor.0 =Eclipse.org
-XSL.ContentType.Name=XSL Template
-DITA_Content_Type_Extension_Element.name=DITA
-Docbook_Content_Type_Extension_Element.name=Docbook
-XSL.Validator.Name=XSL Validator
-XSL.ValidatorDelegate.Name=XSL Validator del
-# ====================================================================
-pluginName = XSL Core
-providerName = Eclipse.org
-
-XSLProblem = XSL Problem \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsl.core/plugin.xml b/bundles/org.eclipse.wst.xsl.core/plugin.xml
deleted file mode 100644
index d8cb95d..0000000
--- a/bundles/org.eclipse.wst.xsl.core/plugin.xml
+++ /dev/null
@@ -1,127 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
-
- <!-- Team provider info -->
-
- <extension point="org.eclipse.team.core.fileTypes">
- <fileTypes type="text" extension="xsl" />
- <fileTypes type="text" extension="xslt" />
- </extension>
-
- <extension point="org.eclipse.core.runtime.contentTypes">
- <!-- content-type
- file-extensions="xsl,xslt"
- priority="normal"
- name="%XSL.ContentType.Name"
- id="xslsource"
- base-type="org.eclipse.core.runtime.xml"
- default-charset="UTF-8">
- <describer class="org.eclipse.core.runtime.content.XMLRootElementContentDescriber">
- <parameter name="element" value="stylesheet"/>
- </describer>
- </content-type -->
- <content-type
- base-type="org.eclipse.core.runtime.xml"
- file-extensions="dita,ditamap"
- id="org.eclipse.wst.xsl.core.content-type.ditasource"
- name="%DITA_Content_Type_Extension_Element.name"
- priority="high">
- </content-type>
- <content-type
- base-type="org.eclipse.core.runtime.xml"
- file-extensions="dbk"
- id="org.eclipse.wst.xsl.core.content-type.docbooksource"
- name="%Docbook_Content_Type_Extension_Element.name"
- priority="high">
- </content-type>
- </extension>
-
- <!-- The magic which detects XSLT 1.0 or 2.0 stylesheets and supplies the correct XSD -->
- <extension
- point="org.eclipse.wst.common.uriresolver.resolverExtensions">
- <resolverExtension
- class="org.eclipse.wst.xsl.core.resolver.ResolverExtension"
- stage="prenormalization">
- </resolverExtension>
- </extension>
-
- <extension
- id="problem"
- name="%XSLProblem"
- point="org.eclipse.core.resources.markers">
- <super type="org.eclipse.wst.xml.core.validationMarker"/>
- <persistent value="true"/>
- </extension>
-
- <extension
- point="org.eclipse.ant.core.antTasks">
- <antTask
- class="org.eclipse.wst.xsl.core.internal.ant.XIncludeTask"
- headless="true"
- library="lib/xinclude.jar"
- name="xsl.xinclude">
- </antTask>
- </extension>
- <!-- Extra Classpath -->
- <extension
- point="org.eclipse.ant.core.extraClasspathEntries">
- <extraClasspathEntry
- library="lib/xinclude.jar">
- </extraClasspathEntry>
- </extension>
-
- <extension id="xsl" name="%XSL.Validator.Name" point="org.eclipse.wst.validation.validatorV2">
- <validator
- build="true"
- class="org.eclipse.wst.xsl.core.internal.validation.eclipse.Validator"
- sourceid="org.eclipse.wst.xsl.ui.internal.validation.DelegatingSourceValidatorForXSL"
- manual="true"
- markerId="org.eclipse.wst.xsl.core.problem"
- version="2">
- <include>
- <rules>
- <fileext caseSensitive="false" ext="xsl"/>
- <contentType id="org.eclipse.wst.xml.core.xslsource"/>
- </rules>
- </include>
- </validator>
- </extension>
-
-
- <extension
- point="org.eclipse.core.filebuffers.documentCreation"
- id="org.eclipse.wst.xml.core.documentfactories"
- name="%Structured_XML_Document_Factory_Extension.name">
- <factory
- contentTypeId="org.eclipse.wst.xml.core.xslsource"
- class="org.eclipse.wst.sse.core.internal.filebuffers.BasicStructuredDocumentFactory" />
- </extension>
- <extension
- point="org.eclipse.wst.sse.core.modelHandler">
- <modelHandler
- default="true"
- class="org.eclipse.wst.xsl.core.internal.modelhandler.ModelHandlerForXSL"
- associatedContentTypeId="org.eclipse.wst.xml.core.xslsource"
- id="org.eclipse.wst.xsl.core.handler">
- </modelHandler>
- </extension>
- <extension
- point="org.eclipse.wst.xml.core.catalogContributions">
- <catalogContribution>
- <uri
- id="org.w3c.xinclude"
- name="http://www.w3.org/2001/XInclude"
- uri="xslt-schemas/xinclude.xsd">
- </uri>
- </catalogContribution>
- </extension>
- <extension
- point="org.eclipse.core.runtime.preferences">
- <initializer
- class="org.eclipse.wst.xsl.core.internal.preferences.PreferenceInitializer">
- </initializer>
- </extension>
-
-
-</plugin>
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/ValidationPreferences.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/ValidationPreferences.java
deleted file mode 100644
index 816fbd3..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/ValidationPreferences.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.core;
-
-/**
- * Preference constants specific to the XSL validator.
- *
- * @author Doug Satchwell
- * @see org.eclipse.core.resources.IMarker
- */
-public class ValidationPreferences
-{
-
- /**
- * The maximum number of errors allowed per XSL file.
- * <p>
- * Value is of type <code>Integer</code>.
- * </p>
- */
- public static final String MAX_ERRORS = "MAX_ERRORS"; //$NON-NLS-1$
-
- /**
- * The level at which a missing parameter is reported.
- * <p>
- * Value is one of <code>IMarker.SEVERITY_ERROR, IMarker.SEVERITY_WARNING, IMarker.SEVERITY_INFO</code>
- * </p>
- */
- public static final String MISSING_PARAM = "MISSING_PARAM"; //$NON-NLS-1$
-
- /**
- * The level at which an invalid XPath is reported.
- * <p>
- * Value is one of <code>IMarker.SEVERITY_ERROR, IMarker.SEVERITY_WARNING, IMarker.SEVERITY_INFO</code>
- * </p>
- */
- public static final String XPATHS = "CHECK_XPATHS"; //$NON-NLS-1$
-
- /**
- * The level at which an unresolved called template is reported.
- * <p>
- * Value is one of <code>IMarker.SEVERITY_ERROR, IMarker.SEVERITY_WARNING, IMarker.SEVERITY_INFO</code>
- * </p>
- */
- public static final String CALL_TEMPLATES = "CHECK_CALL_TEMPLATES"; //$NON-NLS-1$
-
- /**
- * The level at which a parameter that does not have a default value and does not specify a value is reported.
- * <p>
- * Value is one of <code>IMarker.SEVERITY_ERROR, IMarker.SEVERITY_WARNING, IMarker.SEVERITY_INFO</code>
- * </p>
- */
- public static final String EMPTY_PARAM = "EMPTY_PARAM"; //$NON-NLS-1$
-
- /**
- * The level at which an unresolved import or included is reported.
- * <p>
- * Value is one of <code>IMarker.SEVERITY_ERROR, IMarker.SEVERITY_WARNING, IMarker.SEVERITY_INFO</code>
- * </p>
- */
- public static final String MISSING_INCLUDE = "MISSING_INCLUDE"; //$NON-NLS-1$
-
- /**
- * The level at which an include/import circular references is reported.
- * <p>
- * Value is one of <code>IMarker.SEVERITY_ERROR, IMarker.SEVERITY_WARNING, IMarker.SEVERITY_INFO</code>
- * </p>
- */
- public static final String CIRCULAR_REF = "CIRCULAR_REF"; //$NON-NLS-1$
-
- /**
- * The level at which a template conflict is reported.
- * <p>
- * Value is one of <code>IMarker.SEVERITY_ERROR, IMarker.SEVERITY_WARNING, IMarker.SEVERITY_INFO</code>
- * </p>
- */
- public static final String TEMPLATE_CONFLICT = "TEMPLATE_CONFLICT"; //$NON-NLS-1$
-
- /**
- * The level at which a parameter without a name attribute is reported.
- * <p>
- * Value is one of <code>IMarker.SEVERITY_ERROR, IMarker.SEVERITY_WARNING, IMarker.SEVERITY_INFO</code>
- * </p>
- */
- public static final String NAME_ATTRIBUTE_MISSING = "NAME_ATTRIBUTE_MISSING"; //$NON-NLS-1$
-
- /**
- * The level at which a parameter with an empty name attribute is reported.
- * <p>
- * Value is one of <code>IMarker.SEVERITY_ERROR, IMarker.SEVERITY_WARNING, IMarker.SEVERITY_INFO</code>
- * </p>
- */
- public static final String NAME_ATTRIBUTE_EMPTY = "NAME_ATTRIBUTE_EMPTY"; //$NON-NLS-1$
-
- /**
- * The level at which a duplicate parameter is reported.
- * <p>
- * Value is one of <code>IMarker.SEVERITY_ERROR, IMarker.SEVERITY_WARNING, IMarker.SEVERITY_INFO</code>
- * </p>
- */
- public static final String DUPLICATE_PARAMETER = "DUPLICATE_PARAMETER"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/XSLCore.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/XSLCore.java
deleted file mode 100644
index 1223927..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/XSLCore.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.core;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xsl.core.internal.StylesheetBuilder;
-import org.eclipse.wst.xsl.core.internal.util.FileUtil;
-import org.eclipse.wst.xsl.core.model.Stylesheet;
-import org.eclipse.wst.xsl.core.model.StylesheetModel;
-import org.w3c.dom.Attr;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-/**
- * The interface to all aspects of the XSL core functionality.
- * <p>
- * This is responsible for building and maintaining the cache of built XSL models.
- * </p>
- *
- * @author Doug Satchwell
- */
-public class XSLCore
-{
- /**
- * The XSL namespace URI (= http://www.w3.org/1999/XSL/Transform)
- */
- public static final String XSL_NAMESPACE_URI = "http://www.w3.org/1999/XSL/Transform"; //$NON-NLS-1$
-
- /**
- * The XSL content type (= org.eclipse.wst.xml.core.xslsource)
- */
- public static final String XSL_CONTENT_TYPE = "org.eclipse.wst.xml.core.xslsource"; //$NON-NLS-1$
-
- private static XSLCore instance;
- private Map<IFile, StylesheetModel> stylesheetsComposed = new HashMap<IFile, StylesheetModel>();
-
- private XSLCore()
- {}
-
- /**
- * Get the cached stylesheet, or build it if it has not yet been built.
- *
- * @param file
- * @return source file, or null if could not be built
- * @since 1.0
- */
- public synchronized StylesheetModel getStylesheet(IFile file)
- {
- StylesheetModel stylesheet = stylesheetsComposed.get(file);
- if (stylesheet == null)
- stylesheet = buildStylesheet(file);
- return stylesheet;
- }
-
- /**
- * Completely rebuild the source file from its DOM
- *
- * @param file
- * @return the stylesheet model, or null if it could not be created.
- * @since 1.0
- */
- public synchronized StylesheetModel buildStylesheet(IFile file)
- {
- Stylesheet stylesheet = StylesheetBuilder.getInstance().getStylesheet(file, true);
- if (stylesheet == null)
- return null;
- StylesheetModel stylesheetComposed = new StylesheetModel(stylesheet);
- stylesheetsComposed.put(file, stylesheetComposed);
- stylesheetComposed.fix();
- return stylesheetComposed;
- }
-
- /**
- * Clean all of the stylesheets from the given project.
- *
- * @param project the project to be cleaned
- * @param monitor a progress monitor to track the clean progress
- */
- public synchronized void clean(IProject project, IProgressMonitor monitor)
- {
- for (Iterator<StylesheetModel> iter = stylesheetsComposed.values().iterator(); iter.hasNext();)
- {
- StylesheetModel model = iter.next();
- if (project == null || project.equals(model.getStylesheet().getFile().getProject()))
- {
- iter.remove();
- }
- }
- }
-
- /**
- * Get the singleton <code>XSLCore</code> instance.
- *
- * @return the <code>XSLCore</code> instance
- */
- public static synchronized XSLCore getInstance()
- {
- if (instance == null)
- instance = new XSLCore();
- return instance;
- }
-
- /**
- * Locates a file for the given current file and URI.
- *
- * @param currentFile the file to resolve relative to
- * @param uri the relative URI
- * @return the file at the URI relative to this <code>currentFile</code>
- */
- // TODO depends on how we resolve URIs
- public static IFile resolveFile(IFile currentFile, String uri)
- {
- if (uri == null || uri.trim().length() == 0)
- return null;
- IResource resource = currentFile.getParent().findMember(new Path(uri));
- if (resource == null || resource.getType() != IResource.FILE)
- return null;
- return (IFile)resource;
- }
- /**
- * Determine whether the given file is an XML file by inspecting its content types.
- *
- * @param file the file to inspect
- * @return true if this file is an XML file
- */
-
- public static boolean isXMLFile(IFile file)
- {
- return FileUtil.isXMLFile(file);
- }
-
- /**
- * Determine whether the given file is an XSL file by inspecting its content types.
- *
- * @param file the file to inspect
- * @return true if this file is an XSL file
- */
- public static boolean isXSLFile(IFile file)
- {
- return FileUtil.isXSLFile(file);
- }
-
-
- /**
- * Takes a given <code>Node</code> and returns whether it
- * is part of the the XSLT Namespace.
- * @param node The Node to be checked.
- * @return True if part of the XSLT namespace, false otherwise.
- * @since 1.0
- */
- public static boolean isXSLNamespace(Node node) {
- if (hasNamespace(node)) {
- return false;
- }
- return node.getNamespaceURI().equals(XSL_NAMESPACE_URI);
- }
-
- /**
- * Determine if the Node that was passed has a Namespace. If it
- * doesn't the node is either going to be false, or the call to the
- * getNamespace() method will return null.
- * @param node
- * @return
- */
- private static boolean hasNamespace(Node node) {
- return node == null || node.getNamespaceURI() == null;
- }
-
- /**
- * Returns an Attr node for the current Node if one exits at the specified offset.
- * @param node
- * @param offset
- * @return A w3c.dom.Attr
- * @since 1.0
- */
- public static Attr getCurrentAttrNode(Node node, int offset)
- {
- if ((node instanceof IndexedRegion) && ((IndexedRegion) node).contains(offset) && (node.hasAttributes()))
- {
- NamedNodeMap attrs = node.getAttributes();
- for (int i = 0; i < attrs.getLength(); ++i)
- {
- IndexedRegion attRegion = (IndexedRegion) attrs.item(i);
- if (attRegion.contains(offset))
- {
- return (Attr) attrs.item(i);
- }
- }
- }
- return null;
- }
-
- /**
- * Returns the current Node at the specified offset.
- *
- * @param document
- * @param offset
- * @return an w3c.dom.Node
- * @since 1.0
- */
- public static Node getCurrentNode(IDocument document, int offset)
- {
- IndexedRegion inode = null;
- IStructuredModel sModel = null;
- try
- {
- sModel = StructuredModelManager.getModelManager().getExistingModelForRead(document);
- inode = sModel.getIndexedRegion(offset);
- if (inode == null)
- inode = sModel.getIndexedRegion(offset - 1);
- }
- finally
- {
- if (sModel != null)
- sModel.releaseFromRead();
- }
-
- if (inode instanceof Node)
- {
- return (Node) inode;
- }
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/Messages.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/Messages.java
deleted file mode 100644
index 32014f1..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/Messages.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- * Jesper Steen M�ller - adapted from org.eclipse.core.internal.content
- **********************************************************************/
-package org.eclipse.wst.xsl.core.internal;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * @author Jesper Steen
- * @since 1.0
- *
- */
-// Runtime plugin message catalog
-
-public class Messages extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.wst.xsl.core.internal.messages"; //$NON-NLS-1$
-
- /**
- * TODO: Add JavaDoc
- */
- // Content type manager
- public static String XSLCorePlugin_parserConfiguration;
-
- /**
- * TODO: Add JavaDoc
- */
- public static String XSLCorePlugin_badInitializationData;
-
- /**
- * TODO: Add JavaDoc
- */
- public static String XSLCorePlugin_coreError;
-
- /**
- * TODO: Add JavaDoc
- */
- public static String XIncludeTask_0;
- /**
- * TODO: Add JavaDoc
- */
- public static String XIncludeTask_1;
-
- /**
- * TODO: Add JavaDoc
- */
- public static String XIncludeTask_2;
-
- /**
- * TODO: Add JavaDoc
- */
- public static String XIncludeTask_3;
-
- /**
- * TODO: Add JavaDoc
- */
- public static String XIncludeTask_4;
-
- /**
- * TODO: Add JavaDoc
- */
- public static String XIncludeTask_5;
-
- /**
- * TODO: Add JavaDoc
- */
- public static String XIncludeTask_6;
-
- /**
- * TODO: Add JavaDoc
- */
- public static String XIncludeTask_7;
-
- /**
- * TODO: Add JavaDoc
- */
- public static String XIncludeTask_8;
-
- /**
- * TODO: Add JavaDoc
- */
- public static String XIncludeTask_9;
- public static String XSLValidator_1;
- /**
- * Stylesheet importing itself
- */
- public static String XSLValidator_10;
- /**
- * Template conflict (internal)
- */
- public static String XSLValidator_11;
- /**
- * Template conflict (included)
- */
- public static String XSLValidator_12;
- /**
- * Template conflict (external)
- */
- public static String XSLValidator_13;
- /**
- * Parameter missing name attribute
- */
- public static String XSLValidator_14;
- /**
- * Parameter with empty name attribute
- */
- public static String XSLValidator_15;
- /**
- * Duplicate parameter
- */
- public static String XSLValidator_16;
- /**
- * Unresolved named template
- */
- public static String XSLValidator_18;
- /**
- * Circular reference
- */
- public static String XSLValidator_2;
- /**
- * Parameter without default value
- */
- public static String XSLValidator_20;
- /**
- * Parameter does not exist
- */
- public static String XSLValidator_22;
- /**
- * href attribute is required
- */
- public static String XSLValidator_23;
- /**
- * Missing parameter
- */
- public static String XSLValidator_3;
- /**
- * Unresolved include
- */
- public static String XSLValidator_4;
- /**
- * Stylesheet includes itself
- */
- public static String XSLValidator_6;
- /**
- * Unresolved import
- */
- public static String XSLValidator_8;
-
-
-
- static {
- // load message values from bundle file
- reloadMessages();
- }
-
- /**
- * TODO: Add JavaDoc
- */
- public static void reloadMessages() {
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/StylesheetBuilder.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/StylesheetBuilder.java
deleted file mode 100644
index 57995a4..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/StylesheetBuilder.java
+++ /dev/null
@@ -1,292 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- * David Carver - fix issue with xslElm being null on local variables.
- *******************************************************************************/
-package org.eclipse.wst.xsl.core.internal;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Stack;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xsl.core.XSLCore;
-import org.eclipse.wst.xsl.core.internal.util.Debug;
-import org.eclipse.wst.xsl.core.model.CallTemplate;
-import org.eclipse.wst.xsl.core.model.Import;
-import org.eclipse.wst.xsl.core.model.Include;
-import org.eclipse.wst.xsl.core.model.Parameter;
-import org.eclipse.wst.xsl.core.model.Stylesheet;
-import org.eclipse.wst.xsl.core.model.Template;
-import org.eclipse.wst.xsl.core.model.Variable;
-import org.eclipse.wst.xsl.core.model.XSLAttribute;
-import org.eclipse.wst.xsl.core.model.XSLElement;
-import org.eclipse.wst.xsl.core.model.XSLNode;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * A builder that creates and maintains a cache of <code>Stylesheet</code>'s.
- *
- * @author Doug Satchwell
- */
-public class StylesheetBuilder {
- private static StylesheetBuilder instance;
- private final Map<IFile, Stylesheet> builtFiles = new HashMap<IFile, Stylesheet>();
-
- private StylesheetBuilder() {
- }
-
- /**
- * Get the <code>Stylesheet</code> associated with the given file. If either
- * the <code>Stylesheet</code> has not yet been created or
- * <code>force</code> is specified then the <code>Stylesheet</code> is
- * built.
- *
- * @param file
- * the XSL file
- * @param force
- * <code>true</code> to force a parse of the file
- * @return the <code>Stylesheet</code>
- */
- public Stylesheet getStylesheet(IFile file, boolean force) {
- Stylesheet stylesheet = builtFiles.get(file);
- if (stylesheet == null || force) {
- stylesheet = build(file);
- builtFiles.put(file, stylesheet);
- }
- return stylesheet;
- }
-
- private Stylesheet build(IFile file) {
- long start = System.currentTimeMillis();
- if (Debug.debugXSLModel) {
- System.out.println("Building " + file + "..."); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- Stylesheet stylesheet = null;
- IStructuredModel smodel = null;
- try {
- smodel = StructuredModelManager.getModelManager()
- .getExistingModelForRead(file);
- if (smodel == null) {
- smodel = StructuredModelManager.getModelManager()
- .getModelForRead(file);
- if (Debug.debugXSLModel) {
- long endParse = System.currentTimeMillis();
- System.out.println("PARSE " + file + " in " //$NON-NLS-1$ //$NON-NLS-2$
- + (endParse - start) + "ms"); //$NON-NLS-1$
- }
- } else if (Debug.debugXSLModel) {
- long endParse = System.currentTimeMillis();
- System.out.println("NO-PARSE " + file + " in " //$NON-NLS-1$ //$NON-NLS-2$
- + (endParse - start) + "ms"); //$NON-NLS-1$
- }
- // start = System.currentTimeMillis();
- if (smodel != null && smodel instanceof IDOMModel) {
- IDOMModel model = (IDOMModel) smodel;
- stylesheet = parseModel(model, file);
- }
- } catch (IOException e) {
- XSLCorePlugin.log(e);
- } catch (CoreException e) {
- XSLCorePlugin.log(e);
- } finally {
- if (smodel != null)
- smodel.releaseFromRead();
- }
- if (Debug.debugXSLModel) {
- long end = System.currentTimeMillis();
- System.out.println("BUILD " + file + " in " + (end - start) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- return stylesheet;
- }
-
- private Stylesheet parseModel(IDOMModel model, IFile file) {
- IDOMDocument document = model.getDocument();
- Stylesheet sf = new Stylesheet(file);
- StylesheetParser walker = new StylesheetParser(sf);
- walker.walkDocument(document);
- return sf;
- }
-
- /**
- * Get the singleton <code>StylesheetBuilder</code> instance.
- *
- * @return the <code>StylesheetBuilder</code> instance
- */
- public static synchronized StylesheetBuilder getInstance() {
- if (instance == null) {
- instance = new StylesheetBuilder();
- }
- return instance;
- }
-
- private static class StylesheetParser {
- private final Stylesheet sf;
- private final Stack<Element> elementStack = new Stack<Element>();
- private Template currentTemplate;
- private Stack<CallTemplate> callTemplates = new Stack<CallTemplate>();
- private XSLElement parentEl;
-
- public StylesheetParser(Stylesheet stylesheet) {
- this.sf = stylesheet;
- }
-
- public void walkDocument(IDOMDocument document) {
-
- if (document.getDocumentElement() != null)
- recurse(document.getDocumentElement());
- }
-
- private void recurse(Element element) {
- XSLElement xslEl = null;
- if (XSLCore.XSL_NAMESPACE_URI.equals(element.getNamespaceURI())) {
- String elName = element.getLocalName();
- if ("stylesheet".equals(elName) && elementStack.size() == 0) //$NON-NLS-1$
- {
- NamedNodeMap map = element.getAttributes();
- String version = element.getAttribute("version"); //$NON-NLS-1$
- sf.setVersion(version);
- xslEl = sf;
- } else if ("include".equals(elName) && elementStack.size() == 1) //$NON-NLS-1$
- {
- Include include = new Include(sf);
- sf.addInclude(include);
- xslEl = include;
- } else if ("import".equals(elName) && elementStack.size() == 1) //$NON-NLS-1$
- {
- Import include = new Import(sf);
- sf.addImport(include);
- xslEl = include;
- } else if ("template".equals(elName) && elementStack.size() == 1) //$NON-NLS-1$
- {
- currentTemplate = new Template(sf);
- sf.addTemplate(currentTemplate);
- xslEl = currentTemplate;
- } else if ("param".equals(elName) && elementStack.size() == 2 && currentTemplate != null) //$NON-NLS-1$
- {
- Parameter param = new Parameter(sf);
- // determine whether param has a value
- NodeList childNodes = element.getChildNodes();
- for (int i = 0; i < childNodes.getLength(); i++) {
- Node childNode = childNodes.item(i);
- if (childNode.getNodeType() != Node.ATTRIBUTE_NODE) {
- param.setValue(true);
- break;
- }
- }
- currentTemplate.addParameter(param);
- xslEl = param;
- } else if ("call-template".equals(elName) && elementStack.size() >= 2) //$NON-NLS-1$
- {
- CallTemplate currentCallTemplate = new CallTemplate(sf);
- callTemplates.push(currentCallTemplate);
- sf.addCalledTemplate(currentCallTemplate);
- xslEl = currentCallTemplate;
- } else if ("with-param".equals(elName) && elementStack.size() >= 3 && callTemplates.size() > 0) //$NON-NLS-1$
- {
- Parameter param = new Parameter(sf);
- // determine whether param has a value
- NodeList childNodes = element.getChildNodes();
- for (int i = 0; i < childNodes.getLength(); i++) {
- Node childNode = childNodes.item(i);
- if (childNode.getNodeType() != Node.ATTRIBUTE_NODE) {
- param.setValue(true);
- break;
- }
- }
- // get the previous call-template
- CallTemplate currentCallTemplate = callTemplates.peek();
- currentCallTemplate.addParameter(param);
- xslEl = param;
- } else if ("variable".equals(elName)) //$NON-NLS-1$
- {
- if (elementStack.size() == 1)
- {// global variable
- Variable var = new Variable(sf);
- sf.addGlobalVariable(var);
- xslEl = var;
- }
- else if (elementStack.size() > 1 && currentTemplate != null)
- {// local variable
- Variable var = new Variable(sf);
- currentTemplate.addVariable(var);
- xslEl = var;
- }
- }
- else {
- xslEl = new XSLElement(sf);
- }
- if (xslEl!=null)
- configure((IDOMNode) element, xslEl);
- }
- elementStack.push(element);
- NodeList childNodes = element.getChildNodes();
- for (int i = 0; i < childNodes.getLength(); i++) {
- Node node = childNodes.item(i);
- if (node.getNodeType() == Node.ELEMENT_NODE) {
- recurse((Element) node);
- }
- }
- if (xslEl instanceof CallTemplate)
- callTemplates.pop();
- elementStack.pop();
- // currentTemplate = null;
- // currentCallTemplate = null;
- }
-
- private void configure(IDOMNode node, XSLElement element) {
- setPositionInfo(node, element);
- IDOMElement domElem = (IDOMElement) node;
- element.setName(domElem.getLocalName());
- NamedNodeMap map = node.getAttributes();
- for (int i = 0; i < map.getLength(); i++) {
- IDOMAttr attr = (IDOMAttr) map.item(i);
- XSLAttribute xslatt = new XSLAttribute(element, attr.getName(),
- attr.getValue());
- setPositionInfo(attr, xslatt);
- element.setAttribute(xslatt);
- }
- if (parentEl != null)
- parentEl.addChild(element);
- parentEl = element;
- }
-
- private static void setPositionInfo(IDOMNode node, XSLNode inc) {
- try {
- IStructuredDocument structuredDocument = node
- .getStructuredDocument();
- int line = structuredDocument.getLineOfOffset(node
- .getStartOffset());
- int lineOffset = structuredDocument.getLineOffset(line);
- int col = node.getStartOffset() - lineOffset;
- inc.setOffset(node.getStartOffset());
- inc.setLineNumber(line);
- inc.setColumnNumber(col);
- inc.setLength(node.getLength());
- } catch (BadLocationException e) {
- XSLCorePlugin.log(e);
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/XSLCorePlugin.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/XSLCorePlugin.java
deleted file mode 100644
index d4109f8..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/XSLCorePlugin.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Jesper Steen M�ller and others
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jesper Steen M�ller - XSL core plugin
- *******************************************************************************/
-
-package org.eclipse.wst.xsl.core.internal;
-
-import javax.xml.parsers.SAXParserFactory;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Status;
-import org.osgi.framework.BundleContext;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class XSLCorePlugin extends Plugin {
-
- // The plug-in ID
- /**
- * TODO: Add JavaDoc
- */
- public static final String PLUGIN_ID = "org.eclipse.wst.xsl.core"; //$NON-NLS-1$
-
- /**
- *
- */
- public static final String USE_PROJECT_SETTINGS = "use-project-settings";//$NON-NLS-1$
-
- // The shared instance
- private static XSLCorePlugin plugin;
-
- private ServiceTracker parserTracker = null;
-
- private BundleContext bundleContext;
-
- /**
- * The constructor
- */
- public XSLCorePlugin() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- bundleContext = context;
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static XSLCorePlugin getDefault() {
- return plugin;
- }
-
- /**
- * Return the registered SAX parser factory or null if one
- * does not exist. * @return
- * @return returns a SAXParserFactory
- */
- public SAXParserFactory getFactory() {
- if (parserTracker == null) {
- parserTracker = new ServiceTracker(bundleContext, SAXParserFactory.class.getName(), null);
- parserTracker.open();
- }
- SAXParserFactory theFactory = (SAXParserFactory) parserTracker.getService();
- if (theFactory != null)
- theFactory.setNamespaceAware(true);
- return theFactory;
- }
-
- /**
- * Logs the specified status with this plug-in's log.
- *
- * @param status status to log
- */
- public static void log(IStatus status) {
- getDefault().getLog().log(status);
- }
-
- /**
- * Logs the specified exception.
- *
- * @param e throwable to log
- */
- public static void log(Throwable e) {
- if (e instanceof CoreException) {
- log(((CoreException)e).getStatus());
- } else {
- log(newErrorStatus(Messages.XSLCorePlugin_coreError, e));
- }
- }
-
- /**
- * Returns a new error status for this plug-in with the given message
- * @param message the message to be included in the status
- * @param exception the exception to be included in the status or <code>null</code> if none
- * @return a new error status
- */
- public static IStatus newErrorStatus(String message, Throwable exception) {
- return new Status(IStatus.ERROR, PLUGIN_ID, message, exception);
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/ant/XIncludeTask.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/ant/XIncludeTask.java
deleted file mode 100644
index 6055413..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/ant/XIncludeTask.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/******************************************************************************
-* Copyright (c) 2008 Lars Vogel
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-* http://www.eclipse.org/legal/eplv10.html
-*
-* Contributors:
-* Lars Vogel - Lars.Vogel@gmail.com - initial API and implementation
-*******************************************************************************/
-
-package org.eclipse.wst.xsl.core.internal.ant;
-
-import java.io.File;
-import java.util.Collection;
-import java.util.Vector;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Task;
-import org.eclipse.wst.xsl.core.internal.Messages;
-import org.eclipse.wst.xsl.core.internal.xinclude.XIncluder;
-
-/**
- * This class provides an XInclude ANT task definition.
- *
- * @author Lars Vogel
- *
- */
-public class XIncludeTask extends Task {
- private String inFile;
-
- private String outFile;
-
- /**
- * TODO: Add JavaDoc
- * @param inFile
- */
- public void setIn(String inFile) {
- log(Messages.XIncludeTask_0 + inFile, Project.MSG_VERBOSE);
- this.inFile = inFile;
- }
-
- /**
- * TODO: Add JavaDoc
- * @param outFile
- */
- public void setOut(String outFile) {
- log(Messages.XIncludeTask_1 + outFile, Project.MSG_VERBOSE);
- this.outFile = outFile;
- }
-
- @Override
- public void execute() {
- validate();
- log(Messages.XIncludeTask_2, Project.MSG_VERBOSE);
- File file = new File(inFile);
- if (!file.exists()) {
- throw new BuildException(Messages.XIncludeTask_3
- + inFile);
- }
- // We will check if the file exists, if not we will try to create the
- // output file and or the output directory
- File fileout = new File(outFile);
- File dir = new File(fileout.getParent());
- if (!dir.exists()) {
- log(Messages.XIncludeTask_4 + dir.getAbsolutePath());
-
- Boolean success = (new File(dir.getAbsolutePath())).mkdirs();
- if (!success) {
- throw new BuildException(Messages.XIncludeTask_5
- + outFile);
- }
- }
- // check if the included files are modified after the last run
- // Assumption that all the included files are part of the input file
- // directory
- if (checkmodified(inFile, outFile)) {
- log(Messages.XIncludeTask_6,
- Project.MSG_INFO);
- XIncluder la = new XIncluder();
- try {
- la.extractXMLFile(inFile, outFile);
- } catch (Exception e) {
- throw new BuildException(Messages.XIncludeTask_7
- + e.getMessage());
- }
- }
- }
-
- private boolean checkmodified(String inFile, String outFile) {
- File in = new File(inFile);
- File out = new File(outFile);
- File dir = new File(in.getParent());
-
- Collection<File> allFiles = listFiles(dir, true);
- for (File f : allFiles) {
- if (f.lastModified() > out.lastModified()) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * TODO: Add JavaDoc
- * @param directory
- * @param recurse
- * @return
- */
- public Collection<File> listFiles(File directory, boolean recurse) {
- // List of files / directories
- Vector<File> files = new Vector<File>();
-
- // Get files / directories in the directory
- File[] entries = directory.listFiles();
-
- // Go over entries
- for (File entry : entries) {
-
- files.add(entry);
-
- // If the file is a directory and the recurse flag
- // is set, recurse into the directory
- if (recurse && entry.isDirectory()) {
- files.addAll(listFiles(entry, recurse));
- }
- }
-
- // Return collection of files
- return files;
- }
-
- private void validate() {
- if (inFile == null) {
- throw new BuildException(Messages.XIncludeTask_8);
- }
- if (outFile == null) {
- throw new BuildException(Messages.XIncludeTask_9);
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/messages.properties b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/messages.properties
deleted file mode 100644
index c55859e..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/messages.properties
+++ /dev/null
@@ -1,45 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2005, 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# Jesper Steen Møller - adapted from org.eclipse.core.internal.content
-###############################################################################
-
-### Resolver problems
-XSLCorePlugin_badInitializationData = Invalid initialization data for "{0}".
-XSLCorePlugin_parserConfiguration = XSL parser configuration error during content description.
-XSLCorePlugin_coreError=Error logged from XSL core plug-in\:
-# XInclude
-XIncludeTask_0=Setting the output File to:
-XIncludeTask_1=Setting the output File to:
-XIncludeTask_2=Executing the XIncludeTask
-XIncludeTask_3=Specified Inputfile does not exists
-XIncludeTask_4=Creating the output directory
-XIncludeTask_5=Could not create outputfile
-XIncludeTask_6=Changes detected. Creating a new output file
-XIncludeTask_7=Problems with accessing the files.
-XIncludeTask_8=Please specify inputfile
-XIncludeTask_9=Please specify outputfile
-# Validation
-XSLValidator_1=Xpath is invalid
-XSLValidator_10=A stylesheet must not import itself
-XSLValidator_11=Template conflicts with another template in this stylesheet
-XSLValidator_12=Template conflicts with an included template
-XSLValidator_13=Included templates conflict with each other
-XSLValidator_14=Name attribute is required
-XSLValidator_23=href attribute is required
-XSLValidator_15=Name must be specified
-XSLValidator_16=Parameter already defined
-XSLValidator_18=Named template {0} is not available
-XSLValidator_2=Included stylesheets form a circular reference
-XSLValidator_20=Parameter {0} does not have a default value
-XSLValidator_22=Parameter {0} does not exist
-XSLValidator_3=Missing parameter: {0}
-XSLValidator_4=Missing include:
-XSLValidator_6=A stylesheet must not include itself
-XSLValidator_8=Missing import:
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/preferences/PreferenceInitializer.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/preferences/PreferenceInitializer.java
deleted file mode 100644
index 3c00b80..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/preferences/PreferenceInitializer.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.core.internal.preferences;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.core.runtime.preferences.DefaultScope;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.wst.xsl.core.ValidationPreferences;
-import org.eclipse.wst.xsl.core.internal.XSLCorePlugin;
-
-/**
- * Preferences initializer for XSL core preferences.
- *
- * @author Doug Satchwell
- */
-public class PreferenceInitializer extends AbstractPreferenceInitializer
-{
- @Override
- public void initializeDefaultPreferences()
- {
- IEclipsePreferences node = new DefaultScope().getNode(XSLCorePlugin.getDefault().getBundle().getSymbolicName());
- node.putInt(ValidationPreferences.MAX_ERRORS, 100);
- node.putInt(ValidationPreferences.MISSING_PARAM, IMarker.SEVERITY_WARNING);
- node.putInt(ValidationPreferences.XPATHS, IMarker.SEVERITY_ERROR);
- node.putInt(ValidationPreferences.CALL_TEMPLATES, IMarker.SEVERITY_ERROR);
- node.putInt(ValidationPreferences.EMPTY_PARAM, IMarker.SEVERITY_WARNING);
- node.putInt(ValidationPreferences.MISSING_INCLUDE, IMarker.SEVERITY_ERROR);
- node.putInt(ValidationPreferences.CIRCULAR_REF, IMarker.SEVERITY_ERROR);
- node.putInt(ValidationPreferences.TEMPLATE_CONFLICT, IMarker.SEVERITY_ERROR);
- node.putInt(ValidationPreferences.NAME_ATTRIBUTE_MISSING, IMarker.SEVERITY_ERROR);
- node.putInt(ValidationPreferences.NAME_ATTRIBUTE_EMPTY, IMarker.SEVERITY_ERROR);
- node.putInt(ValidationPreferences.DUPLICATE_PARAMETER, IMarker.SEVERITY_ERROR);
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/util/Debug.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/util/Debug.java
deleted file mode 100755
index 672ada5..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/util/Debug.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail and others
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Carver - initial API and implementation based on WTP SSE Debug class
- *******************************************************************************/
-package org.eclipse.wst.xsl.core.internal.util;
-
-
-
-import java.util.Enumeration;
-
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegionList;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionCollection;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionContainer;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
-
-
-/**
- * Debug Class is used to determine when Debugging output to system out.
- * @author dcarver
- *
- */
-public final class Debug {
- public static final boolean checkForMemoryLeaks = false;
-
- public static final boolean collectStats = false;
-
- public static final int DEBUG = 0;
-
- public static final boolean DEBUG_THREADLOCAL = false;
-
- public static final boolean debugBreakpoints = false;
- public static final boolean debugCaretMediator = false;
- public static final boolean debugDisplayTreePositions = false;
- //
- public static final boolean debugMediator = false;
- //
- public static final boolean debugNotification = false;
- public static final boolean debugNotificationAndEvents = false;
-
- public static final boolean debugNotifyDeferred = false;
- public static final boolean debugReconciling = false;
- //
- public static final boolean debugRtfFormatProvider = false;
- //
- public static final boolean debugStructuredDocument = false;
- public static final boolean debugTaglibs = false;
- //
- public static final boolean debugTokenizer = false;
-
- //
- public static final boolean debugLauncher = false;
-
- /**
- * Output Modeling Messages.
- */
- public static final boolean debugXSLModel = false;
- //
- public static final boolean debugTreeModel = false;
- public static final boolean debugUpdateTreePositions = false;
- public static final boolean displayInfo = false;
-
- /** effects output of Logger */
- public static final boolean displayToConsole = true;
- public static final boolean displayWarnings = false;
- //
- public static final boolean headParsing = false;
- public static final boolean jsDebugContextAssist = false;
- //
- public static final boolean jsDebugSyntaxColoring = false;
-
- public static final boolean LOCKS = false;
- //
- public static final boolean perfTest = false;
- public static final boolean perfTestAdapterClassLoading = false;
- public static final boolean perfTestFormat = false;
- public static final boolean perfTestRawStructuredDocumentOnly = false;
- public static final boolean perfTestStructuredDocumentEventOnly = false;
- public static final boolean perfTestStructuredDocumentOnly = false;
-
- //
- public static final boolean syntaxHighlighting = false;
- //
- public static final boolean useStandardEolInWidget = false;
-
- /**
- * For tests and debug only
- * @param structuredDocument
- */
-
- public static final void dump(IStructuredDocument structuredDocument) {
- dump(structuredDocument, false);
- }
-
- public static final void dump(IStructuredDocument structuredDocument, boolean verbose) {
- ITextRegionCollection flatNode = null;
- System.out.println("Dump of structuredDocument:"); //$NON-NLS-1$
- IStructuredDocumentRegionList flatNodes = structuredDocument.getRegionList();
- Enumeration structuredDocumentRegions = flatNodes.elements();
- while (structuredDocumentRegions.hasMoreElements()) {
- flatNode = (ITextRegionCollection) structuredDocumentRegions.nextElement();
- if (!verbose) {
- String outString = flatNode.toString();
- outString = org.eclipse.wst.sse.core.utils.StringUtils.escape(outString);
- System.out.println(outString);
- } else {
- dump(flatNode, verbose);
- }
- }
- System.out.println();
- System.out.println("= = = = = ="); //$NON-NLS-1$
- System.out.println();
- }
-
- /**
- * @param region
- * @param flatNode
- * @param verbose
- */
- public static final void dump(ITextRegionCollection region, boolean verbose) {
- if (region == null)
- return;
- if (verbose) {
- printParent(region);
- }
- printChildRegions(region, 0);
- }
-
- private static void printChildRegions(ITextRegionCollection region, int depth) {
- if (region != null) {
- // ==> // ITextRegionCollection regionCollection = region;
- System.out.println(region);
- ITextRegionList regionList = region.getRegions();
- for (int i = 0; i < regionList.size(); i++) {
- ITextRegion r = regionList.get(i);
- if (r instanceof ITextRegionCollection) {
- ITextRegionCollection rc = (ITextRegionCollection) r;
- printChildRegions(rc, depth++);
- } else {
- System.out.println(space(depth) + r);
- depth--;
- }
- }
- }
- }
-
- /**
- * Simple utility to make sure println's are some what in order
- * @param msg
- */
- public static final synchronized void println(String msg) {
- System.out.println(System.currentTimeMillis() + "\t" + msg); //$NON-NLS-1$
- }
-
- private static void printParent(IStructuredDocumentRegion region) {
- System.out.println(" [parent document: " + toStringUtil(region.getParentDocument()) + "]"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- private static void printParent(ITextRegionCollection region) {
- if (region instanceof IStructuredDocumentRegion) {
- printParent((IStructuredDocumentRegion) region);
- } else if (region instanceof ITextRegionContainer) {
- printParent((ITextRegionContainer) region);
- } else
- System.out.println(" [parent document: " + "(na)" + "]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- private static void printParent(ITextRegionContainer region) {
- System.out.println(" [parent document: " + toStringUtil(region.getParent()) + "]"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * @param depth
- * @return
- */
- private static String space(int depth) {
- String result = " "; //$NON-NLS-1$
- for (int i = 0; i < depth; i++) {
- result += " "; //$NON-NLS-1$
- }
- return result;
- }
-
- public static final String toStringUtil(IStructuredDocument object) {
- String className = object.getClass().getName();
- String shortClassName = className.substring(className.lastIndexOf(".") + 1); //$NON-NLS-1$
- String result = shortClassName;
- // NOTE: if the document held by any region has been updated and the
- // region offsets have not
- // yet been updated, the output from this method invalid.
- return result;
-
- }
-
- public static final String toStringUtil(ITextRegionCollection object) {
- String className = object.getClass().getName();
- String shortClassName = className.substring(className.lastIndexOf(".") + 1); //$NON-NLS-1$
- String result = shortClassName;
- // NOTE: if the document held by any region has been updated and the
- // region offsets have not
- // yet been updated, the output from this method invalid.
- return result;
-
- }
-
- /**
- * Debug constructor comment.
- */
- public Debug() {
- super();
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/util/FileUtil.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/util/FileUtil.java
deleted file mode 100644
index 45f9404..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/util/FileUtil.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package org.eclipse.wst.xsl.core.internal.util;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.core.runtime.content.IContentTypeManager;
-import org.eclipse.wst.xsl.core.XSLCore;
-
-/**
- * This is a general file utility class.
- *
- * @author dcarver
- *
- */
-public class FileUtil {
-
- /**
- * Determines if a file is one of the valid XML content types.
- * @param file The input IFile to check
- * @return True if it is a XML file, false otherwise.
- */
- public static boolean isXMLFile(IFile file)
- {
- IContentTypeManager contentTypeManager = Platform.getContentTypeManager();
- IContentType[] types = contentTypeManager.findContentTypesFor(file.getName());
- for (IContentType contentType : types)
- {
- if (contentType.isKindOf(contentTypeManager.getContentType("org.eclipse.core.runtime.xml")) || contentType.isKindOf(contentTypeManager.getContentType("org.eclipse.wst.xml.core.xmlsource"))) //$NON-NLS-1$ //$NON-NLS-2$
- {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Determines if a file is a XSLT File.
- * @param file The input IFile to check.
- * @return True if it is a XSLT file, false otherwise.
- *
- */
- public static boolean isXSLFile(IFile file)
- {
- IContentTypeManager contentTypeManager = Platform.getContentTypeManager();
- IContentType[] types = contentTypeManager.findContentTypesFor(file.getName());
- for (IContentType contentType : types)
- {
- if (contentType.equals(contentTypeManager.getContentType(XSLCore.XSL_CONTENT_TYPE)))
- {
- return true;
- }
- }
- return false;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/util/StructuredDocumentUtil.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/util/StructuredDocumentUtil.java
deleted file mode 100644
index 1827d31..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/util/StructuredDocumentUtil.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.eclipse.wst.xsl.core.internal.util;
-
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-
-/**
- * General Purpose utility classes to convert from StructuredDocument to DOM.
- *
- * @author dcarver
- *
- */
-public class StructuredDocumentUtil {
-
- /**
- * Given a StructuredDocumentRegion and a TextRegion, return a
- * IDOMNode for that particular position in the StructuredDocument
- *
- * @param documentRegion
- * @param textRegion
- * @return IDOMNode
- */
- public static IDOMNode getNode(IStructuredDocumentRegion documentRegion, ITextRegion textRegion) {
- IStructuredModel sModel = StructuredModelManager.getModelManager().getExistingModelForRead(documentRegion.getParentDocument());
- IDOMDocument documentNode = ((IDOMModel) sModel).getDocument();
-
- return (IDOMNode)documentNode.getModel().getIndexedRegion(documentRegion.getStartOffset(textRegion));
- }
-
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/util/XMLContentType.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/util/XMLContentType.java
deleted file mode 100644
index e8c46c4..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/util/XMLContentType.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Carver (bug 264788) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.core.internal.util;
-
-import java.util.*;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.content.*;
-
-/**
- * XMLContetType handles the gathering of XML content type related information
- * between the platforms xml content type and WTP's specific version.
- *
- * @author David Carver
- * @since 1.0
- *
- */
-public class XMLContentType {
- private static final String XMLSOURCE_CONTENTTYPE = "org.eclipse.wst.xml.core.xmlsource"; //$NON-NLS-1$
- private static final String PLATFORM_XMLSOURCE_CONTENTTYPE = "org.eclipse.core.runtime.xml"; //$NON-NLS-1$
-
- private IContentTypeManager contentTypeManager = null;
-
- public XMLContentType() {
- contentTypeManager = Platform.getContentTypeManager();
- IContentType contentType;
- }
-
- /**
- * Returns all the extensions associated with an XML Content Type.
- * @return The array of file extensions
- * @since 1.0
- */
- public String[] getFileExtensions() {
- IContentType[] contentTypes = getAllXMLContentTypes();
- ArrayList<String> xmlFileExtensions = new ArrayList<String>();
- if (contentTypes.length > 0) {
- for (int cnt = 0; cnt < contentTypes.length; cnt++) {
- String[] exts = getFileSpecs(contentTypes[cnt]);
- if (exts != null) {
- for (int sub = 0; sub < exts.length; sub++) {
- if (!xmlFileExtensions.contains(exts[sub])) {
- xmlFileExtensions.add(exts[sub]);
- }
- }
- }
- }
- }
-
- String[] fileExtensions = new String[xmlFileExtensions.size()];
- xmlFileExtensions.toArray(fileExtensions);
- return fileExtensions;
- }
-
- private IContentType[] getAllXMLContentTypes() {
- ArrayList<IContentType> arrayList = new ArrayList<IContentType>(Arrays.asList(contentTypeManager.getAllContentTypes()));
- ArrayList<IContentType> copyContents = (ArrayList)arrayList.clone();
-
- for(IContentType contentType : arrayList) {
- if (!isXMLContentType(contentType)) {
- copyContents.remove(contentType);
- }
- }
- IContentType[] contentTypes = new IContentType[copyContents.size()];
- copyContents.toArray(contentTypes);
- return contentTypes;
- }
-
- private boolean isXMLContentType(IContentType contentType) {
- return contentType.getId().equals(PLATFORM_XMLSOURCE_CONTENTTYPE) ||
- contentType.getId().equals(XMLSOURCE_CONTENTTYPE) ||
- isKindOfWTPXML(contentType) ||
- isKindOfXMLSource(contentType);
- }
-
- private boolean isKindOfXMLSource(IContentType contentType) {
- IContentType platformContentType = contentTypeManager.getContentType(PLATFORM_XMLSOURCE_CONTENTTYPE);
- boolean returnValue = false;
- if (platformContentType != null) {
- returnValue = contentType.isKindOf(platformContentType);
- }
- return returnValue;
- }
-
- private boolean isKindOfWTPXML(IContentType contentType) {
- IContentType wtpContentType = contentTypeManager.getContentType(XMLSOURCE_CONTENTTYPE);
- boolean returnValue = false;
- if (wtpContentType != null) {
- returnValue = contentType.isKindOf(wtpContentType);
- }
- return returnValue;
- }
-
- private String[] getFileSpecs(IContentType contentType) {
- return contentType.getFileSpecs(IContentType.FILE_EXTENSION_SPEC);
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/MaxErrorsExceededException.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/MaxErrorsExceededException.java
deleted file mode 100644
index d60bc8b..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/MaxErrorsExceededException.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.core.internal.validation;
-
-/**
- * An exception used to indicate whether the maximum number of errors has been reached
- * for a given Stylesheet validation.
- *
- * @author Doug Satchwell
- */
-public class MaxErrorsExceededException extends Exception
-{
- private static final long serialVersionUID = 1L;
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/XSLValidationMessage.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/XSLValidationMessage.java
deleted file mode 100644
index aead840..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/XSLValidationMessage.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.core.internal.validation;
-
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.xml.core.internal.validation.core.ValidationMessage;
-import org.eclipse.wst.xsl.core.model.XSLNode;
-
-/**
- * A validation message specific to the XSL validator which adds the ability
- * to specify the XSL node.
- *
- * @author Doug Satchwell
- * @see org.eclipse.wst.xml.core.internal.validation.core.ValidationMessage
- */
-public class XSLValidationMessage extends ValidationMessage
-{
- private XSLNode node;
- private int realSeverity;
-
- /**
- * Create a new instance of this.
- *
- * @param message
- * The message for the validation message.
- * @param lineNumber
- * The line location of the message.
- * @param columnNumber
- * The column location of the message.
- * @param uri
- * The uri of the file the message is for.
- */
- public XSLValidationMessage(String message, int lineNumber, int columnNumber, String uri)
- {
- super(message, lineNumber, columnNumber, uri);
- }
-
- /**
- * Set the node that this message applies to.
- *
- * @param node the node
- */
- public void setNode(XSLNode node)
- {
- this.node = node;
- }
-
- /**
- * Get the node that this message applies to.
- * @return the node
- */
- public XSLNode getNode()
- {
- return node;
- }
-
- /**
- * The severity set here should be the org.eclipse.wst.validation.internal.provisional.core.IMessage severity.
- */
- @Override
- public void setSeverity(int sev)
- {
- this.realSeverity = sev;
- // the superclass only understands high and low.
- int severity;
- switch(sev)
- {
- case IMessage.HIGH_SEVERITY:
- severity = ValidationMessage.SEV_HIGH;
- break;
- default:
- severity = ValidationMessage.SEV_LOW;
- }
- super.setSeverity(severity);
- }
-
- /**
- * Workaround for superclass's bizarre handling of severity
- *
- * @return
- */
- public int getRealSeverity()
- {
- return realSeverity;
- }
-
- @Override
- public String toString()
- {
- return node.toString();
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/XSLValidationReport.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/XSLValidationReport.java
deleted file mode 100644
index f8b0aff..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/XSLValidationReport.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.core.internal.validation;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.xml.core.internal.validation.core.ValidationMessage;
-import org.eclipse.wst.xml.core.internal.validation.core.ValidationReport;
-import org.eclipse.wst.xsl.core.model.XSLNode;
-
-
-/**
- * A validation report for the XSL validator.
- *
- * @author Doug Satchwell
- * @see org.eclipse.wst.xml.core.internal.validation.core.ValidationReport
- */
-public class XSLValidationReport implements ValidationReport
-{
- private boolean valid = true;
- private String uri;
- private List<XSLValidationMessage> errors = new ArrayList<XSLValidationMessage>();
- private List<XSLValidationMessage> warnings = new ArrayList<XSLValidationMessage>();
- private List<XSLValidationMessage> infos = new ArrayList<XSLValidationMessage>();
-
- /**
- * Create a new instance of this.
- *
- * @param uri
- * the URI of the entity that this report applies to
- */
- public XSLValidationReport(String uri)
- {
- this.uri = uri;
- }
-
- /**
- * Get the validation messages.
- *
- * @return validation messages
- */
- public List<XSLValidationMessage> getErrors()
- {
- return errors;
- }
-
- /**
- * Get the validation messages.
- *
- * @return validation messages
- */
- public List<XSLValidationMessage> getWarnings()
- {
- return warnings;
- }
-
- /**
- * Get the validation messages.
- *
- * @return validation messages
- */
- public List<XSLValidationMessage> getInfos()
- {
- return infos;
- }
-
- /**
- * Add an error message for the given XSL node.
- *
- * @param node
- * the node the warning applies to
- * @param message
- * the message to associate with the node
- * @return the validation message created
- */
- public ValidationMessage addError(XSLNode node, String message)
- {
- valid = false;
- XSLValidationMessage msg = new XSLValidationMessage(message, node.getLineNumber() + 1, node.getColumnNumber() + 1, getFileURI());
- msg.setSeverity(IMessage.HIGH_SEVERITY);
- msg.setNode(node);
- errors.add(msg);
- return msg;
- }
-
- /**
- * Add an warning message for the given XSL node.
- *
- * @param node
- * the node the warning applies to
- * @param message
- * the message to associate with the node
- * @return the validation message created
- */
- public ValidationMessage addWarning(XSLNode node, String message)
- {
- XSLValidationMessage msg = new XSLValidationMessage(message, node.getLineNumber() + 1, node.getColumnNumber() + 1, getFileURI());
- msg.setSeverity(IMessage.NORMAL_SEVERITY);
- msg.setNode(node);
- warnings.add(msg);
- return msg;
- }
-
- /**
- * Add an info message for the given XSL node.
- *
- * @param node
- * the node the warning applies to
- * @param message
- * the message to associate with the node
- * @return the validation message created
- */
- public ValidationMessage addInfo(XSLNode node, String message)
- {
- XSLValidationMessage msg = new XSLValidationMessage(message, node.getLineNumber() + 1, node.getColumnNumber() + 1, getFileURI());
- msg.setSeverity(IMessage.LOW_SEVERITY);
- msg.setNode(node);
- infos.add(msg);
- return msg;
- }
-
- /**
- * Get the URI that this report applies to.
- *
- * @return the URI
- */
- public String getFileURI()
- {
- return uri;
- }
-
- /**
- * @see org.eclipse.wst.xml.core.internal.validation.core.getNestedMessages
- *
- * @return null
- */
- @SuppressWarnings("unchecked")
- public HashMap getNestedMessages()
- {
- return null;
- }
-
- /**
- * Returns an array of validation messages.
- *
- * @return An array of validation messages.
- */
- public ValidationMessage[] getValidationMessages()
- {
- List<ValidationMessage> messages = new ArrayList<ValidationMessage>();
- messages.addAll(errors);
- messages.addAll(warnings);
- messages.addAll(infos);
- return messages.toArray(new ValidationMessage[0]);
- }
-
- /**
- * Returns whether the file is valid. The file may have warnings associated with it.
- *
- * @return True if the file is valid, false otherwise.
- */
- public boolean isValid()
- {
- return valid;
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/XSLValidator.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/XSLValidator.java
deleted file mode 100644
index c8d552b..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/XSLValidator.java
+++ /dev/null
@@ -1,400 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- * David Carver (STAR) - bug 230072 - Project level specific validation
- * - bug 226245 - XPath 2.0 validation for XSLT
- *******************************************************************************/
-package org.eclipse.wst.xsl.core.internal.validation;
-
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import javax.xml.xpath.XPathExpressionException;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ProjectScope;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.wst.sse.core.internal.validate.ValidationMessage;
-import org.eclipse.wst.xml.core.internal.validation.core.ValidationReport;
-import org.eclipse.wst.xml.xpath.core.util.XPath20Helper;
-import org.eclipse.wst.xml.xpath.core.util.XSLTXPathHelper;
-import org.eclipse.wst.xsl.core.ValidationPreferences;
-import org.eclipse.wst.xsl.core.XSLCore;
-import org.eclipse.wst.xsl.core.internal.Messages;
-import org.eclipse.wst.xsl.core.internal.XSLCorePlugin;
-import org.eclipse.wst.xsl.core.internal.util.Debug;
-import org.eclipse.wst.xsl.core.model.CallTemplate;
-import org.eclipse.wst.xsl.core.model.Include;
-import org.eclipse.wst.xsl.core.model.Parameter;
-import org.eclipse.wst.xsl.core.model.StylesheetModel;
-import org.eclipse.wst.xsl.core.model.Template;
-import org.eclipse.wst.xsl.core.model.XSLAttribute;
-import org.eclipse.wst.xsl.core.model.XSLElement;
-import org.eclipse.wst.xsl.core.model.XSLNode;
-
-
-/**
- * The XSL validator for workspace XSL files.
- *
- * @author Doug Satchwell
- */
-public class XSLValidator
-{
- private static final String XSLT2_Version = "2.0"; //$NON-NLS-1$
- private static XSLValidator instance;
- private IProject project;
-
- private XSLValidator()
- {
- }
-
- /**
- * Validate the given XSL file. Same as <code>validate(xslFile,report,forceBuild)</code> except a new report is created and returned.
- *
- * @param xslFile the XSL file
- * @param forceBuild true if build should always be forced
- * @return the validation report
- * @throws CoreException if any exception occurs while validating
- */
- public ValidationReport validate(IFile xslFile, boolean forceBuild) throws CoreException
- {
- XSLValidationReport report = new XSLValidationReport(xslFile.getLocationURI().toString());
- project = xslFile.getProject();
- validate(xslFile, report, forceBuild);
- return report;
- }
-
- /**
- * Validate the given XSL file using the specified report.
- *
- * @param xslFile the XSL file
- * @param report the report to use for reporting validation errors
- * @param forceBuild true if build should always be forced
- * @return the validation report
- * @throws CoreException if any exception occurs while validating
- */
- public void validate(IFile xslFile, XSLValidationReport report, boolean forceBuild) throws CoreException
- {
- StylesheetModel stylesheet;
- if (forceBuild)
- stylesheet = XSLCore.getInstance().buildStylesheet(xslFile);
- else
- stylesheet = XSLCore.getInstance().getStylesheet(xslFile);
-
- project = xslFile.getProject();
-
- long start;
- if (Debug.debugXSLModel) {
- start = System.currentTimeMillis();
- }
- if (stylesheet!=null)
- {
- try
- {
- calculateProblems(stylesheet, report);
- }
- catch (MaxErrorsExceededException e)
- {
- // do nothing
- }
- }
- if (Debug.debugXSLModel) {
- long end = System.currentTimeMillis();
- System.out.println("VALIDATE "+xslFile+" in "+(end-start)+"ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
-
- private void calculateProblems(StylesheetModel stylesheetComposed, XSLValidationReport report) throws MaxErrorsExceededException
- {
- // circular reference check
- checkCircularRef(stylesheetComposed, report);
- // include checks
- checkIncludes(stylesheetComposed, report);
- // template checks
- checkTemplates(stylesheetComposed, report);
- // call-template checks
- checkCallTemplates(stylesheetComposed, report);
- // call-template checks
- if (getPreference(ValidationPreferences.XPATHS) > IMarker.SEVERITY_INFO)
- checkXPaths(stylesheetComposed.getStylesheet(), report);
-
- // TODO a) check globals and b) apply-templates where mode does not exist
- }
-
- private int getPreference(String key)
- {
- if (project == null) {
- return XSLCorePlugin.getDefault().getPluginPreferences().getInt(key);
- }
-
- IEclipsePreferences prefs = new ProjectScope(project).getNode(XSLCorePlugin.getDefault().getBundle().getSymbolicName());
- boolean useProject = prefs.getBoolean(XSLCorePlugin.USE_PROJECT_SETTINGS, false);
-
- int valPref;
- if (useProject) {
- valPref = prefs.getInt(key, ValidationMessage.WARNING);
- } else {
- valPref = XSLCorePlugin.getDefault().getPluginPreferences().getInt(key);
- }
- return valPref;
- }
-
- private void checkXPaths(XSLElement xslEl, XSLValidationReport report) throws MaxErrorsExceededException
- {
- validateXPath(xslEl, report, "select"); //$NON-NLS-1$
- validateXPath(xslEl, report, "test"); //$NON-NLS-1$
- validateXPath(xslEl, report, "match"); //$NON-NLS-1$
- for (XSLElement childEl : xslEl.getChildElements())
- {
- checkXPaths(childEl, report);
- }
- }
-
- private void validateXPath(XSLElement xslEl, XSLValidationReport report, String attName) throws MaxErrorsExceededException
- {
- XSLAttribute att = xslEl.getAttribute(attName);
- if (att != null && att.getValue() != null)
- {
- try
- {
- String xslVersion = xslEl.getStylesheet().getVersion();
- String xpathExp = att.getValue();
- if (xslVersion.equals(XSLT2_Version)) {
- XPath20Helper.compile(xpathExp);
- } else {
- XSLTXPathHelper.compile(att.getValue());
- }
- }
- catch (XPathExpressionException e)
- {
- createMarker(report, att, getPreference(ValidationPreferences.XPATHS), Messages.XSLValidator_1);
- }
- catch (NullPointerException e)
- {
- // not sure why NPE is being thrown here
- }
- }
- }
-
- private void checkCircularRef(StylesheetModel stylesheetComposed, XSLValidationReport report) throws MaxErrorsExceededException
- {
- if (stylesheetComposed.hasCircularReference())
- createMarker(report, stylesheetComposed.getStylesheet(), getPreference(ValidationPreferences.CIRCULAR_REF), Messages.XSLValidator_2);
- }
-
- private void checkIncludes(StylesheetModel stylesheetComposed, XSLValidationReport report) throws MaxErrorsExceededException
- {
- // includes
- for (Include include : stylesheetComposed.getStylesheet().getIncludes())
- {
- IFile includedFile = include.getHrefAsFile();
- if (includedFile == null || !includedFile.exists())
- { // included file does not exist
- XSLAttribute att = include.getAttribute("href"); //$NON-NLS-1$
- if (att != null)
- createMarker(report, att, getPreference(ValidationPreferences.MISSING_INCLUDE), Messages.XSLValidator_4 + include.getHref());
- else
- createMarker(report, include, getPreference(ValidationPreferences.NAME_ATTRIBUTE_EMPTY), Messages.XSLValidator_23 );
- }
- else if (includedFile.equals(include.getStylesheet().getFile()))
- { // stylesheet including itself!
- createMarker(report, include.getAttribute("href"), getPreference(ValidationPreferences.CIRCULAR_REF), Messages.XSLValidator_6); //$NON-NLS-1$
- }
- }
- //imports
- for (Include include : stylesheetComposed.getStylesheet().getImports())
- {
- IFile includedFile = include.getHrefAsFile();
- if (includedFile == null || !includedFile.exists())
- { // included file does not exist
- createMarker(report, include.getAttribute("href"), getPreference(ValidationPreferences.MISSING_INCLUDE), Messages.XSLValidator_8 + include.getHref()); //$NON-NLS-1$
- }
- else if (includedFile.equals(include.getStylesheet().getFile()))
- { // stylesheet including itself!
- createMarker(report, include.getAttribute("href"), getPreference(ValidationPreferences.CIRCULAR_REF), Messages.XSLValidator_10); //$NON-NLS-1$
- }
- }
- }
-
- private void checkTemplates(StylesheetModel stylesheetComposed, XSLValidationReport report) throws MaxErrorsExceededException
- {
- for (Template template : stylesheetComposed.getStylesheet().getTemplates())
- {
- // check attributes are correct
- if (template.getName() != null)
- {// named template
-// if (template.getMatch() != null)
-// createMarker(report, template, IMarker.SEVERITY_ERROR, "Template cannot specify both name and match attributes");
-// if (template.getMode() != null)
-// createMarker(report, template, IMarker.SEVERITY_ERROR, "Named templates cannot specify a mode");
- checkParameters(report, template);
- }
-
- for (Template checkTemplate : stylesheetComposed.getTemplates())
- {
- if (checkTemplate != template && checkTemplate.equals(template))
- {
- if (template.getStylesheet() == stylesheetComposed.getStylesheet() && checkTemplate.getStylesheet() == stylesheetComposed.getStylesheet())
- {// templates in this stylesheet conflict with each other
- createMarker(report, template, getPreference(ValidationPreferences.TEMPLATE_CONFLICT), Messages.XSLValidator_11);
- }
- else if (template.getStylesheet() == stylesheetComposed.getStylesheet())
- {// template in included stylesheet conflicts with this
- createMarker(report, template, getPreference(ValidationPreferences.TEMPLATE_CONFLICT), Messages.XSLValidator_12);
- }
- else
- {// templates in included stylesheets conflict with each other
- createMarker(report, template.getStylesheet(), getPreference(ValidationPreferences.TEMPLATE_CONFLICT), Messages.XSLValidator_13);
- }
- }
- }
- }
- }
-
- private void checkParameters(XSLValidationReport report, Template template) throws MaxErrorsExceededException
- {
- List<Parameter> parameters = new ArrayList<Parameter>(template.getParameters());
- // reverse the parameters order for checking - for duplicate parameters
- // the first one is valid
- Collections.reverse(parameters);
- Set<Parameter> duplicateParameters = new HashSet<Parameter>();
- // check parameters
- for (Parameter param : parameters)
- {
- if (param.getName() == null)
- {// name is required
- createMarker(report, param, getPreference(ValidationPreferences.NAME_ATTRIBUTE_MISSING), Messages.XSLValidator_14);
- }
- else if (param.getName().trim().length() == 0)
- {// name value is required
- createMarker(report, param, getPreference(ValidationPreferences.NAME_ATTRIBUTE_EMPTY), Messages.XSLValidator_15);
- }
- else if (duplicateParameters.contains(param))
- {// don't recheck the parameter
- continue;
- }
- else
- {// check a parameter with the same name does not exist
- for (Parameter checkParam : parameters)
- {
- if (param != checkParam)
- {
- if (param.getName().equals(checkParam.getName()))
- {
- duplicateParameters.add(checkParam);
- createMarker(report, param, getPreference(ValidationPreferences.DUPLICATE_PARAMETER), Messages.XSLValidator_16);
- }
- }
- }
- }
- }
- }
-
- private void checkCallTemplates(StylesheetModel stylesheetComposed, XSLValidationReport report) throws MaxErrorsExceededException
- {
- for (CallTemplate calledTemplate : stylesheetComposed.getStylesheet().getCalledTemplates())
- {
- if (calledTemplate.getName() != null)
- {
- // get the list of templates that might be being called by this
- // template call
- List<Template> templateList = stylesheetComposed.getTemplatesByName(calledTemplate.getName());
- if (templateList.size() == 0)
- {
- Object[] messageArgs = { calledTemplate.getName() };
- createMarker(report, calledTemplate.getAttribute("name"), getPreference(ValidationPreferences.CALL_TEMPLATES), MessageFormat.format(Messages.XSLValidator_18, messageArgs)); //$NON-NLS-1$
- }
- else
- {
- Template namedTemplate = templateList.get(0);
- for (Parameter calledTemplateParam : calledTemplate.getParameters())
- {
- boolean found = false;
- for (Parameter namedTemplateParam : namedTemplate.getParameters())
- {
- if (calledTemplateParam.getName().equals(namedTemplateParam.getName()))
- {
- found = true;
- if (!namedTemplateParam.isValue() && !calledTemplateParam.isValue()) {
- Object[] messageArgs = { calledTemplateParam.getName() };
- createMarker(report, calledTemplateParam, getPreference(ValidationPreferences.EMPTY_PARAM), MessageFormat.format(Messages.XSLValidator_20, messageArgs));
- }
- break;
-
- }
- }
- if (!found) {
- Object[] messageArgs = { calledTemplateParam.getName() };
- createMarker(report, calledTemplateParam.getAttribute("name"), getPreference(ValidationPreferences.MISSING_PARAM), MessageFormat.format(Messages.XSLValidator_22, messageArgs)); //$NON-NLS-1$
- }
- }
- if (getPreference(ValidationPreferences.MISSING_PARAM) > IMarker.SEVERITY_INFO)
- {
- for (Parameter namedTemplateParam : namedTemplate.getParameters())
- {
- if (!namedTemplateParam.isValue())
- {
- boolean found = false;
- for (Parameter calledTemplateParam : calledTemplate.getParameters())
- {
- if (calledTemplateParam.getName().equals(namedTemplateParam.getName()))
- {
- found = true;
- break;
- }
- }
- if (!found) {
- Object[] messageArgs = { namedTemplateParam.getName() };
- createMarker(report, calledTemplate, getPreference(ValidationPreferences.MISSING_PARAM), MessageFormat.format(Messages.XSLValidator_3, messageArgs));
- }
- }
- }
- }
- }
- }
- }
- }
-
- private void createMarker(XSLValidationReport report, XSLNode xslNode, int severity, String message) throws MaxErrorsExceededException
- {
- if (severity > IMarker.SEVERITY_INFO)
- {
- if (report.getErrors().size() + report.getWarnings().size() > getPreference(ValidationPreferences.MAX_ERRORS))
- throw new MaxErrorsExceededException();
- switch (severity)
- {
- case IMarker.SEVERITY_ERROR:
- report.addError(xslNode, message);
- break;
- case IMarker.SEVERITY_WARNING:
- report.addWarning(xslNode, message);
- break;
- }
- }
- }
-
- /**
- * Get the singleton XSLValidator instance.
- *
- * @return the singleton XSLValidator instance
- */
- public static XSLValidator getInstance()
- {
- if (instance == null)
- instance = new XSLValidator();
- return instance;
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/eclipse/Validator.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/eclipse/Validator.java
deleted file mode 100644
index 3db07ad..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/eclipse/Validator.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- * David Carver - STAR - bug 224777 - fix spaces in path names in URIs.
- * bug 226578 - remove extraneous @override statements
- * this was causing compilation problems
- *
- *******************************************************************************/
-package org.eclipse.wst.xsl.core.internal.validation.eclipse;
-
-import java.io.InputStream;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.HashMap;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.wst.common.uriresolver.internal.util.URIEncoder;
-import org.eclipse.wst.validation.ValidationResult;
-import org.eclipse.wst.validation.ValidationState;
-import org.eclipse.wst.validation.internal.core.ValidationException;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
-import org.eclipse.wst.xml.core.internal.validation.core.AbstractNestedValidator;
-import org.eclipse.wst.xml.core.internal.validation.core.NestedValidatorContext;
-import org.eclipse.wst.xml.core.internal.validation.core.ValidationMessage;
-import org.eclipse.wst.xml.core.internal.validation.core.ValidationReport;
-import org.eclipse.wst.xsl.core.XSLCore;
-import org.eclipse.wst.xsl.core.internal.XSLCorePlugin;
-import org.eclipse.wst.xsl.core.internal.validation.XSLValidationMessage;
-import org.eclipse.wst.xsl.core.internal.validation.XSLValidator;
-import org.eclipse.wst.xsl.core.model.StylesheetModel;
-import org.eclipse.wst.xsl.core.model.XSLAttribute;
-import org.eclipse.wst.xsl.core.model.XSLNode;
-
-/**
- * The XSL validator extends the XML <code>AbstractNestedValidator</code>.
- *
- * @author Doug Satchwell
- */
-public class Validator extends AbstractNestedValidator
-{
- // ////////////////////////////////////////////////////////////////////////////////////////////////
- // BUILD VALIDATION METHODS
- // ////////////////////////////////////////////////////////////////////////////////////////////////
-
- private boolean asYouTypeValidation;
-
- @Override
- public void clean(IProject project, ValidationState state, IProgressMonitor monitor)
- {
- super.clean(project, state, monitor);
- XSLCore.getInstance().clean(project,monitor);
- }
-
- @Override
- public ValidationResult validate(IResource resource, int kind, ValidationState state, IProgressMonitor monitor)
- {
- ValidationResult res = super.validate(resource, kind, state, monitor);
- if (resource.getType() == IResource.FILE)
- {
- StylesheetModel stylesheet = XSLCore.getInstance().getStylesheet((IFile) resource);
- IFile[] dependencies = stylesheet.getFileDependencies().toArray(new IFile[0]);
- res.setDependsOn(dependencies);
- }
- return res;
- }
-
-
- // ////////////////////////////////////////////////////////////////////////////////////////////////
- // AS YOU TYPE VALIDATION METHODS
- // ////////////////////////////////////////////////////////////////////////////////////////////////
-
- @Override
- public IStatus validateInJob(IValidationContext context, IReporter reporter) throws ValidationException
- {
- asYouTypeValidation = true;
- return super.validateInJob(context, reporter);
- }
-
- // ////////////////////////////////////////////////////////////////////////////////////////////////
- // COMMON METHODS
- // ////////////////////////////////////////////////////////////////////////////////////////////////
-
- @Override
- public ValidationReport validate(final String uri, InputStream inputstream, NestedValidatorContext context)
- {
- ValidationReport valreport = new ValidationReport(){
-
- public String getFileURI()
- {
- return uri;
- }
-
- @SuppressWarnings("unchecked")
- public HashMap getNestedMessages()
- {
- return new HashMap();
- }
-
- public ValidationMessage[] getValidationMessages()
- {
- return new ValidationMessage[0];
- }
-
- public boolean isValid()
- {
- return true;
- }};
- try
- {
- String encUri = URIEncoder.encode(uri);
- IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocationURI(new URI(encUri));
- if (files.length > 0)
- {
- IFile xslFile = files[0];
- valreport = XSLValidator.getInstance().validate(xslFile,asYouTypeValidation);
- }
- }
- catch (URISyntaxException e)
- {
- XSLCorePlugin.log(e);
- }
- catch (CoreException e)
- {
- XSLCorePlugin.log(e);
- }
- return valreport;
- }
-
- @Override
- protected void addInfoToMessage(ValidationMessage validationMessage, IMessage message)
- {
- XSLValidationMessage msg = (XSLValidationMessage) validationMessage;
- XSLNode node = msg.getNode();
- // set this here as it gets set to the wrong value by the superclass
- message.setSeverity(msg.getRealSeverity());
- // constants are defined in org.eclipse.wst.xml.ui.internal.validation.DelegatingSourceValidator
- if (node.getNodeType() == XSLNode.ATTRIBUTE_NODE)
- {
- message.setAttribute("ERROR_SIDE", "ERROR_SIDE_RIGHT"); //$NON-NLS-1$//$NON-NLS-2$
- message.setAttribute(COLUMN_NUMBER_ATTRIBUTE, Integer.valueOf(validationMessage.getColumnNumber()));
- message.setAttribute(SQUIGGLE_SELECTION_STRATEGY_ATTRIBUTE, "ATTRIBUTE_VALUE"); // whether to squiggle the element, attribute or text //$NON-NLS-1$
- message.setAttribute(SQUIGGLE_NAME_OR_VALUE_ATTRIBUTE, ((XSLAttribute) node).getName());
- }
- else if (node.getNodeType() == XSLNode.ELEMENT_NODE)
- {
- message.setAttribute("ERROR_SIDE", "ERROR_SIDE_RIGHT"); //$NON-NLS-1$//$NON-NLS-2$
- message.setAttribute(COLUMN_NUMBER_ATTRIBUTE, Integer.valueOf(validationMessage.getColumnNumber()));
- message.setAttribute(SQUIGGLE_SELECTION_STRATEGY_ATTRIBUTE, "START_TAG"); // whether to squiggle the element, attribute or text //$NON-NLS-1$
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/eclipse/Validator2.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/eclipse/Validator2.java
deleted file mode 100644
index 4b7f84c..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/eclipse/Validator2.java
+++ /dev/null
@@ -1,112 +0,0 @@
-package org.eclipse.wst.xsl.core.internal.validation.eclipse;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.wst.validation.AbstractValidator;
-import org.eclipse.wst.validation.ValidationResult;
-import org.eclipse.wst.validation.ValidationState;
-import org.eclipse.wst.validation.ValidatorMessage;
-import org.eclipse.wst.validation.internal.core.ValidationException;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
-import org.eclipse.wst.validation.internal.provisional.core.IValidatorJob;
-import org.eclipse.wst.xml.core.internal.validation.core.ValidationMessage;
-import org.eclipse.wst.xml.core.internal.validation.core.ValidationReport;
-import org.eclipse.wst.xsl.core.XSLCore;
-import org.eclipse.wst.xsl.core.internal.XSLCorePlugin;
-import org.eclipse.wst.xsl.core.internal.validation.XSLValidationMessage;
-import org.eclipse.wst.xsl.core.internal.validation.XSLValidator;
-import org.eclipse.wst.xsl.core.model.StylesheetModel;
-
-/**
- * Validator for both build validation (AbstractValidator) and as-you-type validation (IValidatorJob).
- *
- * @author Doug
- */
-public class Validator2 extends AbstractValidator implements IValidatorJob
-{
- // ////////////////////////////////////////////////////////////////////////////////////////////////
- // BUILD VALIDATION METHODS
- // ////////////////////////////////////////////////////////////////////////////////////////////////
-
- @Override
- public void clean(IProject project, ValidationState state, IProgressMonitor monitor)
- {
- XSLCore.getInstance().clean(project, monitor);
- super.clean(project, state, monitor);
- }
-
- @Override
- public ValidationResult validate(IResource resource, int kind, ValidationState state, IProgressMonitor monitor)
- {
- /*
- * String s; switch(kind) { case IResourceDelta.ADDED: s = "added"; break; case IResourceDelta.CHANGED: s = "CHANGED"; break; case IResourceDelta.CONTENT: s = "CONTENT"; break; case
- * IResourceDelta.REMOVED: s = "REMOVED"; break; default: s = "other"; } System.out.println(s);
- */
- ValidationResult result = new ValidationResult();
- if (resource.getType() == IResource.FILE)
- {
- IFile file = (IFile)resource;
- ValidationReport report = doValidation(file, kind, state, monitor);
- StylesheetModel stylesheet = XSLCore.getInstance().getStylesheet(file);
- IFile[] dependencies = stylesheet.getFileDependencies().toArray(new IFile[0]);
- result.setDependsOn(dependencies);
-
- for (ValidationMessage message : report.getValidationMessages())
- {
- XSLValidationMessage xslMsg = (XSLValidationMessage)message;
- ValidatorMessage msg = ValidatorMessage.create(message.getMessage(), resource);
- msg.setAttribute("lineNumber", xslMsg.getLineNumber()); //$NON-NLS-1$
- msg.setAttribute("severity", xslMsg.getSeverity()); //$NON-NLS-1$
- result.add(msg);
- }
- }
- return result;
- }
-
- private ValidationReport doValidation(IFile file, int kind, ValidationState state, IProgressMonitor monitor)
- {
- ValidationReport valreport = null;
- try
- {
- valreport = XSLValidator.getInstance().validate(file,true);
- }
- catch (CoreException e)
- {
- XSLCorePlugin.log(e);
- }
- return valreport;
- }
-
- // ////////////////////////////////////////////////////////////////////////////////////////////////
- // AS YOU TYPE VALIDATION METHODS
- // ////////////////////////////////////////////////////////////////////////////////////////////////
-
- public ISchedulingRule getSchedulingRule(IValidationContext helper)
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public IStatus validateInJob(IValidationContext helper, IReporter reporter) throws ValidationException
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void cleanup(IReporter reporter)
- {
- // TODO Auto-generated method stub
-
- }
-
- public void validate(IValidationContext helper, IReporter reporter) throws ValidationException
- {
- validateInJob(helper,reporter);
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/xinclude/XIncluder.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/xinclude/XIncluder.java
deleted file mode 100644
index c2d83ce..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/xinclude/XIncluder.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/******************************************************************************
-* Copyright (c) 2008 Lars Vogel
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-* http://www.eclipse.org/legal/eplv10.html
-*
-* Contributors:
-* Lars Vogel - Lars.Vogel@gmail.com - initial API and implementation
-* David Carver - STAR - bug 217919 - renamed to XIncluder from MyXIncluder
-* Added feature call to make sure we get
-* an XInclude aware configuration. Also
-* removed Docbook DTD hard coding.
-*******************************************************************************/
-
-package org.eclipse.wst.xsl.core.internal.xinclude;
-
-import java.io.File;
-import java.io.FileOutputStream;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-
-import org.w3c.dom.Document;
-
-/**
- * XIncluder will read an XML file, that has elements from the XInclude
- * namespace and follows the W3C XInclude specification (http://www.w3.org/TR/xinclude/).
- * It will output a merged file.
- * @author Lars Vogel
- *
- */
-public class XIncluder {
-
- /**
- * extracXMLFile merges the files referenced by xinclude include elements.
- * @param in The full path to the input XML file
- * @param out The full path to the merged XML file
- * @throws Exception
- */
- public void extractXMLFile(String in, String out) throws Exception {
- Document document = null;
- File file;
-
- file = new File(in);
- file.getAbsolutePath();
- file.lastModified();
-
- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
-
- // Make sure we are getting a configuration that is XInclude Aware
- dbf.setAttribute("http://apache.org/xml/features/xinclude", true); //$NON-NLS-1$
- dbf.setXIncludeAware(true);
- dbf.setNamespaceAware(true);
-
-
- DocumentBuilder dom = dbf.newDocumentBuilder();
- document = dom.parse(file);
-
- // ---- Use a XSLT transformer for writing the new XML file ----
- Transformer transformer = TransformerFactory.newInstance()
- .newTransformer();
-
- DOMSource source = new DOMSource(document);
- FileOutputStream os = new FileOutputStream(new File(out));
- StreamResult result = new StreamResult(os);
- transformer.transform(source, result);
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/CallTemplate.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/CallTemplate.java
deleted file mode 100644
index ee75093..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/CallTemplate.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.core.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * The <code>xsl:call-template</code> model element.
- *
- * @author Doug Satchwell
- * @since 1.0
- */
-public class CallTemplate extends XSLElement
-{
- final List<Parameter> parameters = new ArrayList<Parameter>();
-
- /**
- * Create a new instance of this.
- *
- * @param stylesheet the stylesheet that this belongs to
- */
- public CallTemplate(Stylesheet stylesheet)
- {
- super(stylesheet);
- }
-
- /**
- * Add a parameter to this.
- *
- * @param parameter the parameter to add
- */
- public void addParameter(Parameter parameter)
- {
- parameters.add(parameter);
- }
-
- /**
- * Get the value of the <code>name</code> attribute if one exists.
- *
- * @return the template name, or null
- */
- @Override
- public String getName()
- {
- return getAttributeValue("name"); //$NON-NLS-1$
- }
-
- /**
- * Get the list of parameters associated with this.
- *
- * @return a list of parameters
- */
- public List<Parameter> getParameters()
- {
- return parameters;
- }
-
- @Override
- public Type getModelType()
- {
- return Type.CALL_TEMPLATE;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/Import.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/Import.java
deleted file mode 100644
index 9369dde..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/Import.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.core.model;
-
-/**
- * The <code>xsl:import</code> model element.
- *
- * @author Doug Satchwell
- * @since 1.0
- */
-public class Import extends Include
-{
- /**
- * Create a new instance of this.
- *
- * @param stylesheet the stylesheet that this belongs to
- */
- public Import(Stylesheet stylesheet)
- {
- super(stylesheet,IMPORT);
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/Include.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/Include.java
deleted file mode 100644
index 2ad0c8e..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/Include.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.core.model;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.wst.xsl.core.XSLCore;
-
-/**
- * The <code>xsl:include</code> model element.
- *
- * @author Doug Satchwell
- * @since 1.0
- */
-public class Include extends XSLElement
-{
- /**
- * Constant indicating that this is an <code>Include</code>.
- */
- public static final int INCLUDE = 1;
-
- /**
- * Constant indicating that this is an <code>Import</code>.
- */
- public static final int IMPORT = 2;
-
- private final int type;
-
- /**
- * Create a new instance of this.
- *
- * @param stylesheet the stylesheet that this belongs to
- */
- public Include(Stylesheet stylesheet)
- {
- this(stylesheet,INCLUDE);
- }
-
- /**
- * Create a new instance of this, specifying whether an <code>Include</code> or an <code>Import</code>.
- *
- * @param stylesheet the stylesheet that this belongs to
- * @param type one of the constants <code>INCLUDE</code> or <code>IMPORT</code>
- */
- protected Include(Stylesheet stylesheet, int type)
- {
- super(stylesheet);
- this.type = type;
- }
-
- /**
- * Get the type of include, whether an <code>Include</code> or an <code>Import</code>.
- *
- * @return one of the constants <code>INCLUDE</code> or <code>IMPORT</code>
- */
- public int getIncludeType()
- {
- return type;
- }
-
- /**
- * Get the value of the <code>href</code> attribute if one exists.
- *
- * @return the <code>href</code> value, or null
- */
- public String getHref() {
- return getAttributeValue("href"); //$NON-NLS-1$
- }
-
-
- /**
- * Gets the included file as a source file, if possible (returned file may be null and need not exist).
- *
- * @return the included file, or null
- */
- public IFile getHrefAsFile()
- {
- return XSLCore.resolveFile(getStylesheet().getFile(), getHref());
- }
-
- @Override
- public Type getModelType()
- {
- return Type.INCLUDE;
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/Parameter.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/Parameter.java
deleted file mode 100644
index a8d92a9..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/Parameter.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.core.model;
-
-/**
- * The <code>xsl:parameter</code> or <code>xsl:with-param</code> model element.
- *
- * @author Doug Satchwell
- * @since 1.0
- */
-public class Parameter extends Variable
-{
- private boolean valueSet;
-
- /**
- * Create a new instance of this.
- *
- * @param stylesheet the stylesheet that this belongs to
- */
- public Parameter(Stylesheet stylesheet)
- {
- super(stylesheet);
- }
-
- /**
- * Set whether this has a value.
- *
- * @param valueSet <code>true</code> if this has a value
- */
- public void setValue(boolean valueSet)
- {
- this.valueSet = valueSet;
- }
-
- /**
- * Get whether this has a value.
- *
- * @return <code>true</code> if this has a value
- */
- public boolean isValue()
- {
- if (valueSet)
- return true;
- if (getAttributeValue("select") != null) //$NON-NLS-1$
- return true;
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/Stylesheet.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/Stylesheet.java
deleted file mode 100644
index 8b58e30..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/Stylesheet.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.core.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-
-/**
- * The <code>xsl:stylesheet</code> model element.
- *
- * @author Doug Satchwell
- * @since 1.0
- */
-public class Stylesheet extends XSLElement
-{
- final IFile file;
- final List<Include> includes = new ArrayList<Include>();
- final List<Import> imports = new ArrayList<Import>();
- final List<Template> templates = new ArrayList<Template>();
- final List<CallTemplate> calledTemplates = new ArrayList<CallTemplate>();
- final List<Variable> globalVariables = new ArrayList<Variable>();
- final List<XSLElement> elements = new ArrayList<XSLElement>();
- String version;
-
- /**
- * Create an instance of this.
- *
- * @param file the file that this represents
- */
- public Stylesheet(IFile file)
- {
- super(null);
- this.file = file;
- }
-
- @Override
- public Stylesheet getStylesheet()
- {
- return this;
- }
-
- /**
- * Add an <code>Include</code> to this.
- *
- * @param include the include to add
- */
- public void addInclude(Include include)
- {
- includes.add(include);
- }
-
- /**
- * Add an <code>Import</code> to this.
- *
- * @param include the import to add
- */
- public void addImport(Import include)
- {
- imports.add(include);
- }
-
- /**
- * Add a <code>Template</code> to this.
- *
- * @param template the template to add
- */
- public void addTemplate(Template template)
- {
- templates.add(template);
- }
-
- /**
- * Add a <code>CallTemplate</code> to this.
- *
- * @param template the template to add
- */
- public void addCalledTemplate(CallTemplate template)
- {
- calledTemplates.add(template);
- }
-
- /**
- * Get the file that this represents.
- *
- * @return the file that this represents
- */
- public IFile getFile()
- {
- return file;
- }
-
- /**
- * Get the list of includes for this.
- *
- * @return the list of includes
- */
- public List<Include> getIncludes()
- {
- return includes;
- }
-
- /**
- * Get the list of imports for this.
- *
- * @return the list of imports
- */
- public List<Import> getImports()
- {
- return imports;
- }
-
- /**
- * Get the list of templates for this.
- *
- * @return the list of templates
- */
- public List<Template> getTemplates()
- {
- return templates;
- }
-
- /**
- * Get the list of called templates for this.
- *
- * @return the list of called templates
- */
- public List<CallTemplate> getCalledTemplates()
- {
- return calledTemplates;
- }
-
- /**
- * Add a global variable to this.
- *
- * @param var the variable to add
- */
- public void addGlobalVariable(Variable var)
- {
- globalVariables.add(var);
- }
-
- @Override
- public Type getModelType()
- {
- return Type.STYLESHEET;
- }
-
- /**
- * Set the stylesheet version.
- *
- * @param version the version to set
- */
- public void setVersion(String version)
- {
- this.version = version;
- }
-
- /**
- * Get the stylesheet version.
- * @return
- */
- public String getVersion()
- {
- return version;
- }
-
- public List<Variable> getGlobalVariables()
- {
- return globalVariables;
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/StylesheetModel.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/StylesheetModel.java
deleted file mode 100644
index ee0b80f..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/StylesheetModel.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- * David Carver (STAR) - bug 243577 - Added retrieving all called-templates.
- *******************************************************************************/
-package org.eclipse.wst.xsl.core.model;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.wst.xsl.core.XSLCore;
-import org.eclipse.wst.xsl.core.internal.util.Debug;
-
-/**
- * The composed stylesheet, consisting of all templates and variables available via imports and includes.
- *
- * <p>
- * The <code>fix()</code> method does the actual work of populating the fields of this, so it must be called before calling any of the other methods.
- * </p>
- *
- * <p>
- * Note that this model may not be valid - for instance there may be more than one named template for a given name or more than one global variable with a given name.
- * </p>
- *
- * @author Doug Satchwell
- * @since 1.0
- */
-public class StylesheetModel extends XSLModelObject
-{
- private final Stylesheet stylesheet;
- boolean circularReference;
- final Set<IFile> files = new HashSet<IFile>();
- final Set<Stylesheet> stylesheets = new HashSet<Stylesheet>();
- final List<Include> includeModel = new ArrayList<Include>();
- final List<Import> importModel = new ArrayList<Import>();
- final Set<Template> templateSet = new HashSet<Template>();
- final List<Template> templates = new ArrayList<Template>();
- final List<Variable> globalVariables = new ArrayList<Variable>();
- final List<CallTemplate> callTemplates = new ArrayList<CallTemplate>();
-
-
-
- /**
- * Create a new instance of this.
- *
- * @param stylesheet
- * the stylesheet that this is the model for
- */
- public StylesheetModel(Stylesheet stylesheet)
- {
- this.stylesheet = stylesheet;
- }
-
- /**
- * Get all stylesheets that are included in this stylesheet anywhere in the hierarchy via either import or include.
- *
- * @return the set of stylesheets in the entire hierarchy
- */
- public List<Include> getIncludes()
- {
- return includeModel;
- }
-
- /**
- * Get all files that are included in this stylesheet anywhere in the hierarchy via either import or include.
- *
- * @return the set of files in the entire hierarchy
- */
- public Set<IFile> getFileDependencies()
- {
- return files;
- }
-
- /**
- * Get the stylesheet that this is the model for.
- *
- * @return the stylesheet that this is the model for
- */
- public Stylesheet getStylesheet()
- {
- return this.stylesheet;
- }
-
- /**
- * Get all global variables that are included in this stylesheet anywhere in the hierarchy via either import or include.
- *
- * @return the set of files in the entire hierarchy
- */
- public List<Variable> getGlobalVariables()
- {
- return globalVariables;
- }
-
- /**
- * Get all templates that are included in this stylesheet anywhere in the hierarchy via either import or include.
- *
- * @return the set of templates in the entire hierarchy
- */
- public List<Template> getTemplates()
- {
- return templates;
- }
-
- /**
- * A utility method that traverses all stylesheet in the hierarchy of stylesheets (not including the current stylesheet), and adds all their templates to the returned list.
- * Therefore the returned list has no regard for whether a template is 'visible' (i.e. whether it might be overridden since it
- * was included via an import). The order of the templates in the list is arbitrary.
- *
- * @return an unordered list of all templates from all stylesheets.
- */
- public List<Template> findAllNestedTemplates()
- {
- List<Template> allTemplates = new ArrayList<Template>();
- for (Stylesheet stylesheet : stylesheets)
- {
- allTemplates.addAll(stylesheet.getTemplates());
- }
- return allTemplates;
- }
-
- /**
- * Get all named templates that are included in this stylesheet anywhere in the hierarchy via either import or include which have the given name.
- *
- * @param name
- * the template name
- * @return the set of named templates with the given name
- */
- public List<Template> getTemplatesByName(String name)
- {
- List<Template> matching = new ArrayList<Template>(templates.size());
- for (Template template : templates)
- {
- if (name.equals(template.getName()))
- matching.add(template);
- }
- return matching;
- }
-
- /**
- * Get all templates that match the given template (determined from <code>Template.equals()</code>).
- *
- * @param toMatch
- * the template to match
- * @return the set of templates that match
- */
- public List<Template> findMatching(Template toMatch)
- {
- List<Template> matching = new ArrayList<Template>(templates.size());
- for (Template template : templates)
- {
- if (template.equals(toMatch))
- matching.add(template);
- }
- return matching;
- }
-
- /**
- * Get whether this has a circular reference anywhere in its import/included hierarchy.
- *
- * @return <code>true</code> if this has a circular reference
- */
- public boolean hasCircularReference()
- {
- return circularReference;
- }
-
- /**
- * Perform the process of traversing the hierarchy to determine all of the properties of this. Note that this method may force other <code>StylesheetModel</code>'s to be built during the process
- * of fixing.
- */
- public void fix()
- {
- long start = System.currentTimeMillis();
-
- if (Debug.debugXSLModel)
- {
- System.out.println("Fixing " + stylesheet.getFile() + "..."); //$NON-NLS-1$ //$NON-NLS-2$
- }
- templates.addAll(stylesheet.getTemplates());
- templateSet.addAll(stylesheet.getTemplates());
- globalVariables.addAll(stylesheet.globalVariables);
- callTemplates.addAll(stylesheet.getCalledTemplates());
- for (Include inc : stylesheet.getIncludes())
- {
- handleInclude(inc);
- }
- for (Import inc : stylesheet.getImports())
- {
- handleInclude(inc);
- }
- if (Debug.debugXSLModel)
- {
- long end = System.currentTimeMillis();
- System.out.println("FIX " + stylesheet.getFile() + " in " + (end - start) + "ms"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
- }
- }
-
- private void handleInclude(Include include)
- {
- IFile file = include.getHrefAsFile();
-
- if (file == null || !file.exists())
- {
- return;
- }
- else if (stylesheet.getFile().equals(file) || files.contains(file))
- {
- circularReference = true;
- return;
- }
- files.add(file);
-
- StylesheetModel includedModel = XSLCore.getInstance().getStylesheet(file);
- if (includedModel == null)
- return;
- stylesheets.add(includedModel.getStylesheet());
- globalVariables.addAll(includedModel.globalVariables);
- callTemplates.addAll(includedModel.getCallTemplates());
-
- if (include.getIncludeType() == Include.INCLUDE)
- {
- includeModel.add(include);
- templates.addAll(includedModel.getTemplates());
- templateSet.addAll(includedModel.getTemplates());
- }
- else
- {
- importModel.add((Import)include);
- for (Template includedTemplate : includedModel.getTemplates())
- {
- if (!templateSet.contains(includedTemplate))
- {
- templates.add(includedTemplate);
- templateSet.add(includedTemplate);
- }
- }
- }
- }
-
- @Override
- public Type getModelType()
- {
- return Type.STYLESHEET_MODEL;
- }
-
- public List<CallTemplate> getCallTemplates() {
- return callTemplates;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/Template.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/Template.java
deleted file mode 100644
index 8fab5de..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/Template.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.core.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * The <code>xsl:template</code> model element.
- *
- * @author Doug Satchwell
- * @since 1.0
- */
-public class Template extends XSLElement
-{
- final List<Variable> variables = new ArrayList<Variable>();
- final List<Parameter> parameters = new ArrayList<Parameter>();
-
- /**
- * Create a new instance of this.
- *
- * @param stylesheet the stylesheet that this belongs to
- */
- public Template(Stylesheet stylesheet)
- {
- super(stylesheet);
- }
-
- /**
- * Add a parameter to this.
- *
- * @param parameter the parameter to add
- */
- public void addParameter(Parameter parameter)
- {
- parameters.add(parameter);
- }
-
- /**
- * Add a variable to this.
- *
- * @param var the variable to add
- */
- public void addVariable(Variable var)
- {
- variables.add(var);
- }
-
- /**
- * Get the value of the <code>name</code> attribute if one exists.
- *
- * @return the template name, or null
- */
- @Override
- public String getName()
- {
- return getAttributeValue("name"); //$NON-NLS-1$
- }
-
- /**
- * Get the value of the <code>match</code> attribute if one exists.
- *
- * @return the match value, or null
- */
- public String getMatch()
- {
- return getAttributeValue("match"); //$NON-NLS-1$
- }
-
- /**
- * Get the value of the <code>mode</code> attribute if one exists.
- *
- * @return the mode value, or null
- */
- public String getMode()
- {
- return getAttributeValue("mode"); //$NON-NLS-1$
- }
-
- /**
- * Get the value of the <code>priority</code> attribute if one exists.
- *
- * @return the priority value, or null
- */
- public String getPriority()
- {
- return getAttributeValue("priority"); //$NON-NLS-1$
- }
-
- /**
- * Get the list of parameters of this.
- *
- * @return the list of parameters
- */
- public List<Parameter> getParameters()
- {
- return parameters;
- }
-
- @Override
- public int hashCode()
- {
- String name = getName();
- if (name != null)
- {
- return 3 + name.hashCode();
- }
- String match = getMatch();
- String mode = getMode();
- String priority = getPriority();
- if (match != null)
- {
- int hash = 3*match.hashCode();
- if (priority != null)
- hash += 5*priority.hashCode();
- if (mode != null)
- hash += 7*mode.hashCode();
- return 5 + hash;
- }
- return super.hashCode();
- }
-
- @Override
- public boolean equals(Object obj)
- {
- if (obj == null)
- return false;
- if (obj == this)
- return true;
- if (obj instanceof Template)
- {
- Template includedTemplate = (Template)obj;
- if (!matchesByMatchOrName(includedTemplate))
- return false;
- // only possibility is that priority is different
- String priority1 = getPriority();
- String priority2 = includedTemplate.getPriority();
- if (priority1 == null && priority2 == null || priority1 != null && priority1.equals(priority2))
- return true;
- }
- return false;
- }
-
- public boolean matchesByMatchOrName(Template includedTemplate)
- {
- String name1 = getName();
- String match1 = getMatch();
- String mode1 = getMode();
- String name2 = includedTemplate.getName();
- String match2 = includedTemplate.getMatch();
- String mode2 = includedTemplate.getMode();
- if (name1 != null && name1.equals(name2))
- return true;
- if (match1 != null && match1.equals(match2) && (mode1 == null && mode2 == null || mode1 != null && mode1.equals(mode2)))
- return true;
- return false;
- }
-
-
- @Override
- public String toString()
- {
- String name = getName();
- String match = getMatch();
- return "file="+getStylesheet().getFile()+", name="+name+", match="+match; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- @Override
- public Type getModelType()
- {
- return Type.TEMPLATE;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/Variable.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/Variable.java
deleted file mode 100644
index 2a24c84..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/Variable.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.core.model;
-
-/**
- * The <code>xsl:variable</code> model element.
- *
- * @author Doug Satchwell
- * @since 1.0
- */
-public class Variable extends XSLElement
-{
- /**
- * Create a new instance of this.
- *
- * @param stylesheet the stylesheet that this belongs to
- */
- public Variable(Stylesheet stylesheet)
- {
- super(stylesheet);
- }
-
- /**
- * Get the value of the <code>name</code> attribute if one exists.
- *
- * @return the variable name, or null
- */
- @Override
- public String getName()
- {
- return getAttributeValue("name"); //$NON-NLS-1$
- }
-
- /**
- * Get the value of the <code>select</code> attribute if one exists.
- *
- * @return the select value, or null
- */
- public String getSelect()
- {
- return getAttributeValue("select"); //$NON-NLS-1$
- }
-
- @Override
- public Type getModelType()
- {
- return Type.VARIABLE;
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/XSLAttribute.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/XSLAttribute.java
deleted file mode 100644
index 7ce4c24..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/XSLAttribute.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.core.model;
-
-/**
- * An attribute of an element in the XSL namespace.
- *
- * @author Doug Satchwell
- * @since 1.0
- */
-public class XSLAttribute extends XSLNode
-{
- final String name;
- final String value;
-
- /**
- * Create a new instance of this.
- *
- * @param element the element this belongs to
- * @param name the name of the attribute
- * @param value the value of the attribute
- */
- public XSLAttribute(XSLElement element, String name, String value)
- {
- super(element.getStylesheet(), XSLNode.ATTRIBUTE_NODE);
- this.name = name;
- this.value = value;
- }
-
- /**
- * Get the name of this.
- *
- * @return the attribute's name
- */
- @Override
- public String getName()
- {
- return name;
- }
-
- /**
- * Get the value of this.
- *
- * @return the attribute's value
- */
- public String getValue()
- {
- return value;
- }
-
- @Override
- public Type getModelType()
- {
- return Type.ATTRIBUTE;
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/XSLElement.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/XSLElement.java
deleted file mode 100644
index cd386b0..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/XSLElement.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.core.model;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * An element in the XSL namespace.
- *
- * @author Doug Satchwell
- * @since 1.0
- */
-public class XSLElement extends XSLNode
-{
- final Map<String, XSLAttribute> attributes = new HashMap<String, XSLAttribute>();
- final List<XSLElement> childElements = new ArrayList<XSLElement>();
-
- /**
- * Create a new instance of this.
- *
- * @param stylesheet the stylesheet that this belongs to
- */
- public XSLElement(Stylesheet stylesheet)
- {
- super(stylesheet, XSLNode.ELEMENT_NODE);
- }
-
- /**
- * Add an attribute of this
- *
- * @param attribute the attribute to add
- */
- public void setAttribute(XSLAttribute attribute)
- {
- attributes.put(attribute.name, attribute);
- }
-
- /**
- * Get the attribute with the given name.
- *
- * @param name the name of the attribute
- * @return the attribute
- */
- public XSLAttribute getAttribute(String name)
- {
- return attributes.get(name);
- }
-
- /**
- * Get the attributes keyed by their names.
- *
- * @return the map of attribute names and instances
- */
- public Map<String, XSLAttribute> getAttributes()
- {
- return attributes;
- }
-
- /**
- * Get the value of the attribute with the given name.
- *
- * @param name the name of the attribute
- * @return the attribute value
- */
- public String getAttributeValue(String name)
- {
- XSLAttribute attribute = attributes.get(name);
- return attribute == null ? null : attribute.getValue();
- }
-
- /**
- * Add a child element of this.
- *
- * @param element the chold element
- */
- public void addChild(XSLElement element)
- {
- childElements.add(element);
- }
-
- /**
- * Get the list of child elements
- *
- * @return the list of children
- */
- public List<XSLElement> getChildElements()
- {
- return childElements;
- }
-
- @Override
- public Type getModelType()
- {
- return Type.OTHER_ELEMENT;
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/XSLModelObject.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/XSLModelObject.java
deleted file mode 100644
index 8f7b2a5..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/XSLModelObject.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.eclipse.wst.xsl.core.model;
-
-import org.eclipse.core.runtime.PlatformObject;
-
-/**
- * @author dcarver
- * @since 1.0
- *
- */
-public abstract class XSLModelObject extends PlatformObject
-{
- public enum Type {STYLESHEET_MODEL,IMPORT,INCLUDE,TEMPLATE,VARIABLE, CALL_TEMPLATE, STYLESHEET, ATTRIBUTE, OTHER_ELEMENT};
-
- public abstract Type getModelType();
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/XSLNode.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/XSLNode.java
deleted file mode 100644
index 88e3ebd..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/model/XSLNode.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.core.model;
-
-import org.w3c.dom.Node;
-
-/**
- * A node in the XSL namespace.
- *
- * @author Doug Satchwell
- * @since 1.0
- */
-public abstract class XSLNode extends XSLModelObject
-{
- /**
- * A constant for the element node (= <code>org.w3c.dom.Node.ELEMENT_NODE</code>)
- */
- public static final short ELEMENT_NODE = Node.ELEMENT_NODE;
-
- /**
- * A constant for the attribute node (= <code>org.w3c.dom.Node.ATTRIBUTE_NODE</code>)
- */
- public static final short ATTRIBUTE_NODE = Node.ATTRIBUTE_NODE;
-
-
- private final Stylesheet stylesheet;
- int lineNumber;
- int columnNumber;
- private int offset;
- private int length;
- private short type;
- private String name;
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- /**
- * Create a new instance of this.
- *
- * @param stylesheet the stylesheet this belongs to
- * @param type one of <code>ELEMENT_NODE</code> or <code>ATTRIBUTE_NODE</code>
- */
- public XSLNode(Stylesheet stylesheet, short type)
- {
- this.stylesheet = stylesheet;
- this.type = type;
- }
-
- /**
- * Set the line number where this node occurs in the XSL file.
- *
- * @param lineNumber the line number
- */
- public void setLineNumber(int lineNumber)
- {
- this.lineNumber = lineNumber;
- }
-
- /**
- * Set the columns number where this node occurs in the XSL file.
- *
- * @param columnNumber the column number
- */
- public void setColumnNumber(int columnNumber)
- {
- this.columnNumber = columnNumber;
- }
-
- /**
- * Get the stylesheet that this belongs to.
- *
- * @return the stylesheet
- */
- public Stylesheet getStylesheet()
- {
- return stylesheet;
- }
-
- /**
- * Set the line number where this node occurs in the XSL file.
- * @return the line number where this node occurs in the XSL file.
- */
- public int getLineNumber()
- {
- return lineNumber;
- }
-
- /**
- * Set the column number where this node occurs in the XSL file.
- * @return the column number where this node occurs in the XSL file.
- */
- public int getColumnNumber()
- {
- return columnNumber;
- }
-
- /**
- * Set the document offset where this node occurs.
- * @param offset the document offset
- */
- public void setOffset(int offset)
- {
- this.offset = offset;
- }
-
- /**
- * Get the document offset where this node occurs.
- * @return the document offset
- */
- public int getOffset()
- {
- return offset;
- }
-
- /**
- * Set the length of this node.
- * @param length the node length
- */
- public void setLength(int length)
- {
- this.length = length;
- }
-
- /**
- * Get the length of this node.
- * @return the node length
- */
- public int getLength()
- {
- return length;
- }
-
- /**
- * Get the type of node.
- *
- * @return one of <code>ELEMENT_NODE</code> or <code>ATTRIBUTE_NODE</code>
- */
- public short getNodeType()
- {
- return type;
- }
-
- @Override
- public String toString() {
- return "file="+stylesheet+", line="+lineNumber+", col="+columnNumber; //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/resolver/ResolverExtension.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/resolver/ResolverExtension.java
deleted file mode 100644
index 85ef5e6..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/resolver/ResolverExtension.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Jesper Steen Moeller and others
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jesper Steen Moeller - XSL core plugin
- * Doug Satchwell - bug 225304
- *******************************************************************************/
-
-package org.eclipse.wst.xsl.core.resolver;
-
-import java.io.IOException;
-import java.net.URL;
-
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolverExtension;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.eclipse.wst.xsl.core.XSLCore;
-import org.eclipse.wst.xsl.core.internal.Messages;
-import org.eclipse.wst.xsl.core.internal.XSLCorePlugin;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-/**
- * TODO: Javadoc
- *
- * @author Jesper Steen Moeller
- *
- */
-public class ResolverExtension implements URIResolverExtension
-{
- private static final Double DEFAULT_XSLT_VERSION = 1.0;
- private static final String XSLT_STYLESHEET = "stylesheet"; //$NON-NLS-1$
- private static final String XSLT_TEMPLATE = "template"; //$NON-NLS-1$
- private static final String XSLT_VERSION = "version"; //$NON-NLS-1$
-
- private boolean initialised;
- private String xslt_1_0_fileURL;
- private String xslt_2_0_fileURL;
-
- public String resolve(IFile file, String baseLocation, String publicId, String systemId)
- {
-
- // Is someone looking for "our" schema?
- if (!XSLCore.XSL_NAMESPACE_URI.equals(publicId))
- {
- // Not this time, return right away
- return null;
- }
-
- String version = null;
-
- if (file != null)
- version = peekVersionAttributeFromSSE(file);
- if (version == null)
- version = peekVersionFromFile(file, baseLocation);
-
- if (version == null)
- return null;
-
- Double versionNumber = null;
- try
- {
- versionNumber = Double.valueOf(version);
- }
- catch (Throwable t)
- {
- // Not interested
- }
-
- if (versionNumber == null)
- {
- versionNumber = DEFAULT_XSLT_VERSION;
- }
-
- // We carelessly ditch the fraction part
- int intVersion = versionNumber.intValue();
- checkInitialised();
- if (intVersion == 1)
- {
- return xslt_1_0_fileURL;
- }
- else if (intVersion == 2)
- {
- return xslt_2_0_fileURL;
- }
- else
- return null;
- }
-
- private void checkInitialised()
- {
- if (!initialised)
- {
- initialised = true;
- try
- {
- URL pluginURL = FileLocator.find(XSLCorePlugin.getDefault().getBundle(), new Path("/xslt-schemas/xslt-1.0.xsd"), null); //$NON-NLS-1$
- xslt_1_0_fileURL = FileLocator.toFileURL(pluginURL).toExternalForm();
- pluginURL = FileLocator.find(XSLCorePlugin.getDefault().getBundle(), new Path("/xslt-schemas/xslt-2.0.xsd"), null); //$NON-NLS-1$
- xslt_2_0_fileURL = FileLocator.toFileURL(pluginURL).toExternalForm();
- }
- catch (IOException e)
- {
- XSLCorePlugin.log(e);
- }
- }
- }
-
- private String peekVersionFromFile(IFile file, String baseLocation)
- {
- XSLVersionHandler handler = new XSLVersionHandler();
- try
- {
- handler.parseContents(file != null ? createInputSource(file) : createInputSource(baseLocation));
- }
- catch (SAXException se)
- {
- XSLCorePlugin.log(se);
- // drop through, since this is almost to be expected
- }
- catch (IOException ioe)
- {
- XSLCorePlugin.log(new CoreException(XSLCorePlugin.newErrorStatus("Can't parse XSL document", ioe))); //$NON-NLS-1$
- // drop through, since this is not really a show-stopper
- }
- catch (ParserConfigurationException pce)
- {
- // some bad thing happened - force this describer to be disabled
- String message = Messages.XSLCorePlugin_parserConfiguration;
- XSLCorePlugin.log(new Status(IStatus.ERROR, XSLCorePlugin.PLUGIN_ID, 0, message, pce));
- throw new RuntimeException(message);
- // drop through, since this is not really a show-stopper
- }
- catch (CoreException ce)
- {
- XSLCorePlugin.log(ce);
- // drop through, since this is not really a show-stopper
- }
-
- String versionX = handler.getVersionAttribute();
- return versionX;
- }
-
- private String peekVersionAttributeFromSSE(IFile file)
- {
- IModelManager manager = StructuredModelManager.getModelManager();
-
- if (manager != null)
- {
- String id = manager.calculateId(file);
- IStructuredModel model = manager.getExistingModelForRead(id);
- try
- {
- if (model instanceof IDOMModel)
- {
- Document doc = ((IDOMModel) model).getDocument();
- if (doc != null && doc.getDocumentElement() != null)
- {
- Element documentElement = doc.getDocumentElement();
- if (XSLT_STYLESHEET.equals(documentElement.getLocalName()) || XSLT_TEMPLATE.equals(documentElement.getLocalName()))
- {
- return documentElement.getAttribute(XSLT_VERSION);
- }
- else
- return ""; //$NON-NLS-1$
- }
- }
- }
- finally
- {
- // bug 225304
- if (model != null)
- model.releaseFromRead();
- }
- }
- return null;
- }
-
- private InputSource createInputSource(String systemId) throws CoreException
- {
- return new InputSource(systemId);
- }
-
- private InputSource createInputSource(IFile file) throws CoreException
- {
- InputSource src = new InputSource(file.getContents());
- src.setSystemId(file.getLocationURI().toString());
- return src;
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/resolver/StopParsingException.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/resolver/StopParsingException.java
deleted file mode 100644
index 43d07ee..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/resolver/StopParsingException.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.eclipse.wst.xsl.core.resolver;
-
-import org.xml.sax.SAXException;
-
-/**
- * An exception indicating that the parsing should stop. This is usually
- * triggered when the top-level element has been found.
- *
- * @since 1.0
- */
-
-class StopParsingException extends SAXException {
- /**
- * All serializable objects should have a stable serialVersionUID
- */
- private static final long serialVersionUID = 1L;
-
- /**
- * Constructs an instance of <code>StopParsingException</code> with a
- * <code>null</code> detail message.
- */
- public StopParsingException() {
- super((String) null);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/resolver/XSLVersionHandler.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/resolver/XSLVersionHandler.java
deleted file mode 100644
index db10106..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/resolver/XSLVersionHandler.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- * Jesper Steen M�ller - adapted from org.eclipse.core.internal.content
- **********************************************************************/
-
-package org.eclipse.wst.xsl.core.resolver;
-
-import java.io.IOException;
-import java.io.StringReader;
-import javax.xml.parsers.*;
-
-import org.eclipse.wst.xsl.core.XSLCore;
-import org.eclipse.wst.xsl.core.internal.XSLCorePlugin;
-import org.xml.sax.*;
-import org.xml.sax.ext.LexicalHandler;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * A simple XML parser to find the XSL version of a given XML file, expectedly a XSLT stylesheet.
- */
-public final class XSLVersionHandler extends DefaultHandler implements LexicalHandler, ErrorHandler {
-
- private static final String XSLT_STYLESHEET = "stylesheet"; //$NON-NLS-1$
-
- private static final String XSLT_TEMPLATE = "template"; //$NON-NLS-1$
-
- private static final String XSLT_VERSION = "version"; //$NON-NLS-1$
-
- /**
- * This is the value of the version attribute in the XSLT file.
- * This member variable is <code>null</code> unless the file has been
- * parsed successful to the point of finding the top-level element,
- * and locating the 'version' attribute there.
- */
- private String versionAttribute = null;
-
- /**
- * TODO: Add Javadoc
- */
- public XSLVersionHandler() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ext.LexicalHandler#comment(char[], int, int)
- */
- public final void comment(final char[] ch, final int start, final int length) {
- // Not interested.
- }
-
- /**
- * Creates a new SAX parser for use within this instance.
- *
- * @return The newly created parser.
- *
- * @throws ParserConfigurationException
- * If a parser of the given configuration cannot be created.
- * @throws SAXException
- * If something in general goes wrong when creating the parser.
- * @throws SAXNotRecognizedException
- * If the <code>XMLReader</code> does not recognize the
- * lexical handler configuration option.
- * @throws SAXNotSupportedException
- * If the <code>XMLReader</code> does not support the lexical
- * handler configuration option.
- */
- private final SAXParser createParser(SAXParserFactory parserFactory) throws ParserConfigurationException, SAXException, SAXNotRecognizedException, SAXNotSupportedException {
- // Initialize the parser.
- final SAXParser parser = parserFactory.newSAXParser();
- final XMLReader reader = parser.getXMLReader();
- reader.setProperty("http://xml.org/sax/properties/lexical-handler", this); //$NON-NLS-1$
- reader.setErrorHandler(this); // This helps to ignore errors
- // disable DTD validation
- try {
- // be sure validation is "off" or the feature to ignore DTD's will not apply
- reader.setFeature("http://xml.org/sax/features/validation", false); //$NON-NLS-1$
- reader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); //$NON-NLS-1$
- } catch (SAXNotRecognizedException e) {
- // not a big deal if the parser does not recognize the features
- } catch (SAXNotSupportedException e) {
- // not a big deal if the parser does not support the features
- }
- return parser;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ext.LexicalHandler#endCDATA()
- */
- public final void endCDATA() {
- // Not interested.
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ext.LexicalHandler#endDTD()
- */
- public final void endDTD() {
- // Not interested.
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ext.LexicalHandler#endEntity(java.lang.String)
- */
- public final void endEntity(final String name) {
- // Not interested.
- }
-
- /**
- * TODO: Add Javadoc
- * @return
- */
- public String getVersionAttribute() {
- return versionAttribute;
- }
-
- /**
- * TODO: Add Javadoc
- * @param contents
- * @return
- * @throws IOException
- * @throws ParserConfigurationException
- * @throws SAXException
- */
- public boolean parseContents(InputSource contents) throws IOException, ParserConfigurationException, SAXException {
- // Parse the file into we have what we need (or an error occurs).
- try {
- SAXParserFactory factory = XSLCorePlugin.getDefault().getFactory();
- if (factory == null)
- return false;
- final SAXParser parser = createParser(factory);
- // to support external entities specified as relative URIs (see bug 63298)
- parser.parse(contents, this);
- } catch (StopParsingException e) {
- // Abort the parsing normally. Fall through...
- }
- return true;
- }
-
- /*
- * Resolve external entity definitions to an empty string. This is to speed
- * up processing of files with external DTDs. Not resolving the contents
- * of the DTD is ok, as only the System ID of the DTD declaration is used.
- * @see org.xml.sax.helpers.DefaultHandler#resolveEntity(java.lang.String, java.lang.String)
- */
- @Override
- public InputSource resolveEntity(String publicId, String systemId) throws SAXException {
- return new InputSource(new StringReader("")); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ext.LexicalHandler#startCDATA()
- */
- public final void startCDATA() {
- // Not interested.
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ext.LexicalHandler#startDTD(java.lang.String,
- * java.lang.String, java.lang.String)
- */
- public final void startDTD(final String name, final String publicId, final String systemId) throws SAXException {
- // Not interested.
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ContentHandler#startElement(java.lang.String,
- * java.lang.String, java.lang.String, org.xml.sax.Attributes)
- */
- @Override
- public final void startElement(final String uri, final String elementName, final String qualifiedName, final Attributes attributes) throws SAXException {
- if (uri.equals(XSLCore.XSL_NAMESPACE_URI) && (XSLT_TEMPLATE.equals(elementName) || XSLT_STYLESHEET.equals(elementName))) {
- versionAttribute = attributes.getValue(XSLT_VERSION);
- } else {
- versionAttribute = ""; //$NON-NLS-1$
- }
- throw new StopParsingException();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ext.LexicalHandler#startEntity(java.lang.String)
- */
- public final void startEntity(final String name) {
- // Not interested.
- }
-
- @Override
- public void warning(SAXParseException e) throws SAXException {
- // Not interested.
- }
-
- @Override
- public void error(SAXParseException e) throws SAXException {
- // Not interested.
- }
-
- @Override
- public void fatalError(SAXParseException e) throws SAXException {
- // Not interested.
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/encoding/XSLDocumentLoader.java b/bundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/encoding/XSLDocumentLoader.java
deleted file mode 100755
index eb8da74..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/encoding/XSLDocumentLoader.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Carver - initial API and implementation
- *
- *******************************************************************************/
-package org.eclipse.wst.xsl.core.internal.encoding;
-
-import org.eclipse.jface.text.IDocumentPartitioner;
-import org.eclipse.wst.sse.core.internal.document.AbstractDocumentLoader;
-import org.eclipse.wst.sse.core.internal.document.IDocumentCharsetDetector;
-import org.eclipse.wst.sse.core.internal.document.IDocumentLoader;
-import org.eclipse.wst.sse.core.internal.document.StructuredDocumentFactory;
-import org.eclipse.wst.sse.core.internal.ltk.parser.RegionParser;
-import org.eclipse.wst.sse.core.internal.provisional.document.IEncodedDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument;
-import org.eclipse.wst.xml.core.internal.encoding.XMLDocumentCharsetDetector;
-import org.eclipse.wst.xml.core.internal.parser.XMLStructuredDocumentReParser;
-import org.eclipse.wst.xsl.core.internal.parser.XSLSourceParser;
-import org.eclipse.wst.xsl.core.internal.text.rules.StructuredTextPartitionerForXSL;
-
-
-/**
- * This class reads an XSL file and creates an XML Structured Model.
- *
- */
-public class XSLDocumentLoader extends AbstractDocumentLoader {
-
- public XSLDocumentLoader() {
- super();
- }
-
- @Override
- public IDocumentPartitioner getDefaultDocumentPartitioner() {
- return new StructuredTextPartitionerForXSL();
- }
-
- public IDocumentCharsetDetector getDocumentEncodingDetector() {
- if (fDocumentEncodingDetector == null) {
- fDocumentEncodingDetector = new XMLDocumentCharsetDetector();
- }
- return fDocumentEncodingDetector;
- }
-
- public RegionParser getParser() {
- return new XSLSourceParser();
- }
-
- protected String getSpecDefaultEncoding() {
- // by default, UTF-8 as per XML spec
- final String enc = "UTF-8"; //$NON-NLS-1$
- return enc;
- }
-
- @Override
- protected IEncodedDocument newEncodedDocument() {
- IStructuredDocument structuredDocument = StructuredDocumentFactory.getNewStructuredDocumentInstance(getParser());
- if (structuredDocument instanceof BasicStructuredDocument) {
- ((BasicStructuredDocument) structuredDocument).setReParser(new XMLStructuredDocumentReParser());
- }
- return structuredDocument;
- }
-
- public IDocumentLoader newInstance() {
- return new XSLDocumentLoader();
- }
-
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/modelhandler/ModelHandlerForXSL.java b/bundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/modelhandler/ModelHandlerForXSL.java
deleted file mode 100755
index a4d4b97..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/modelhandler/ModelHandlerForXSL.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Carver - initial API and implementation
- *
- *******************************************************************************/
-
-package org.eclipse.wst.xsl.core.internal.modelhandler;
-
-import org.eclipse.wst.sse.core.internal.document.IDocumentCharsetDetector;
-import org.eclipse.wst.sse.core.internal.document.IDocumentLoader;
-import org.eclipse.wst.sse.core.internal.ltk.modelhandler.IModelHandler;
-import org.eclipse.wst.sse.core.internal.provisional.IModelLoader;
-import org.eclipse.wst.xml.core.internal.encoding.XMLDocumentCharsetDetector;
-import org.eclipse.wst.xml.core.internal.modelhandler.ModelHandlerForXML;
-import org.eclipse.wst.xsl.core.XSLCore;
-import org.eclipse.wst.xsl.core.internal.encoding.XSLDocumentLoader;
-
-
-/**
- * Provides generic XML model handling. It is also marked as the default
- * content type handler. There should be only one implementation of the
- * default.
- */
-public class ModelHandlerForXSL extends ModelHandlerForXML implements IModelHandler {
- /**
- * Needs to match what's in plugin registry. In fact, can be overwritten
- * at run time with what's in registry! (so should never be 'final')
- */
- static String AssociatedContentTypeID = XSLCore.XSL_CONTENT_TYPE;
- /**
- * Needs to match what's in plugin registry. In fact, can be overwritten
- * at run time with what's in registry! (so should never be 'final')
- */
- private static String ModelHandlerID = "org.eclipse.wst.xsl.core.modelhandler"; //$NON-NLS-1$
-
- public ModelHandlerForXSL() {
- super();
- setId(ModelHandlerID);
- setAssociatedContentTypeId(AssociatedContentTypeID);
- }
-
- @Override
- public IDocumentLoader getDocumentLoader() {
- return new XSLDocumentLoader();
- }
-
- @Override
- public IDocumentCharsetDetector getEncodingDetector() {
- return new XMLDocumentCharsetDetector();
- }
-
- @Override
- public IModelLoader getModelLoader() {
- return new XSLModelLoader();
- }
-
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/modelhandler/XSLModelLoader.java b/bundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/modelhandler/XSLModelLoader.java
deleted file mode 100755
index 88f7a79..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/modelhandler/XSLModelLoader.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Carver - initial API and implementation
- *
- *******************************************************************************/
-
-package org.eclipse.wst.xsl.core.internal.modelhandler;
-
-import org.eclipse.wst.sse.core.internal.PropagatingAdapter;
-import org.eclipse.wst.sse.core.internal.document.IDocumentLoader;
-import org.eclipse.wst.sse.core.internal.provisional.IModelLoader;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.util.Debug;
-import org.eclipse.wst.xml.core.internal.DebugAdapterFactory;
-import org.eclipse.wst.xml.core.internal.document.DOMModelImpl;
-import org.eclipse.wst.xml.core.internal.modelhandler.XMLModelLoader;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.eclipse.wst.xsl.core.internal.encoding.XSLDocumentLoader;
-
-
-/**
- * This class reads an XML file and creates an XML Structured Model.
- *
- */
-public class XSLModelLoader extends XMLModelLoader {
-
- // private static final String STR_ENCODING = "encoding"; //$NON-NLS-1$
-
- /**
- * XMLLoader constructor comment.
- */
- public XSLModelLoader() {
- super();
- }
-
-// @Override
-// public List getAdapterFactories() {
-// List result = new ArrayList();
-// INodeAdapterFactory factory = null;
-// factory = new ModelQueryAdapterFactoryForXML();
-// result.add(factory);
-// // Does XML need propagating adapter? Or just JSP?
-// factory = new PropagatingAdapterFactoryImpl();
-// result.add(factory);
-// return result;
-// }
-
- @Override
- public IDocumentLoader getDocumentLoader() {
- if (documentLoaderInstance == null) {
- documentLoaderInstance = new XSLDocumentLoader();
- }
- return documentLoaderInstance;
- }
-
- @Override
- public IModelLoader newInstance() {
- return new XSLModelLoader();
- }
-
- @Override
- public IStructuredModel newModel() {
- return new DOMModelImpl();
- }
-
- @Override
- protected void preLoadAdapt(IStructuredModel structuredModel) {
- super.preLoadAdapt(structuredModel);
- IDOMModel domModel = (IDOMModel) structuredModel;
- // if there is a model in the adapter, this will adapt it to
- // first node. After that the PropagatingAdater spreads over the
- // children being
- // created. Each time that happends, a side effect is to
- // also "spread" sprecific registered adapters,
- // they two can propigate is needed.
- ((INodeNotifier) domModel.getDocument()).getAdapterFor(PropagatingAdapter.class);
-
- if (Debug.debugNotificationAndEvents) {
- PropagatingAdapter propagatingAdapter = (PropagatingAdapter) ((INodeNotifier) domModel.getDocument()).getAdapterFor(PropagatingAdapter.class);
- propagatingAdapter.addAdaptOnCreateFactory(new DebugAdapterFactory());
- }
-
- }
-
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/parser/XSLSourceParser.java b/bundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/parser/XSLSourceParser.java
deleted file mode 100644
index 69caa2d..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/parser/XSLSourceParser.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Carver - initial API and implementation
- *
- *******************************************************************************/
-
-package org.eclipse.wst.xsl.core.internal.parser;
-
-import org.eclipse.wst.sse.core.internal.ltk.parser.BlockTokenizer;
-import org.eclipse.wst.sse.core.internal.ltk.parser.RegionParser;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionContainer;
-import org.eclipse.wst.sse.core.internal.util.Debug;
-import org.eclipse.wst.xml.core.internal.parser.XMLSourceParser;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-
-public class XSLSourceParser extends XMLSourceParser {
-
-
- public XSLSourceParser() {
- super();
- }
-
- @Override
- public RegionParser newInstance() {
- XSLSourceParser newInstance = new XSLSourceParser();
- newInstance.setTokenizer(getTokenizer().newInstance());
- return newInstance;
- }
- @Override
- protected void setTokenizer(BlockTokenizer newTokenizer) {
- // TODO Auto-generated method stub
- super.setTokenizer(newTokenizer);
- }
-
- @Override
- protected IStructuredDocumentRegion parseNodes() {
- // regions are initially reported as complete offsets within the
- // scanned input
- // they are adjusted here to be indexes from the currentNode's start
- // offset
- IStructuredDocumentRegion headNode = null;
- IStructuredDocumentRegion lastNode = null;
- ITextRegion region = null;
- IStructuredDocumentRegion currentNode = null;
- String type = null;
-
- while ((region = getNextRegion()) != null) {
- type = region.getType();
- // these types (might) demand a IStructuredDocumentRegion for each
- // of them
-
- if (type == DOMRegionContext.BLOCK_TEXT) {
- if (currentNode != null && currentNode.getLastRegion().getType() == DOMRegionContext.BLOCK_TEXT) {
- // multiple block texts indicated embedded containers; no
- // new IStructuredDocumentRegion
- currentNode.addRegion(region);
- currentNode.setLength(region.getStart() + region.getLength() - currentNode.getStart());
- region.adjustStart(-currentNode.getStart());
- // DW 4/16/2003 regions no longer have parents
- // region.setParent(currentNode);
- }
- else {
- // not continuing a IStructuredDocumentRegion
- if (currentNode != null) {
- // ensure that any existing node is at least
- // terminated
- if (!currentNode.isEnded()) {
- currentNode.setLength(region.getStart() - currentNode.getStart());
- // fCurrentNode.setTextLength(region.getStart() -
- // fCurrentNode.getStart());
- }
- lastNode = currentNode;
- }
- fireNodeParsed(currentNode);
- currentNode = createStructuredDocumentRegion(type);
- if (lastNode != null) {
- lastNode.setNext(currentNode);
- }
- currentNode.setPrevious(lastNode);
- currentNode.setStart(region.getStart());
- currentNode.setLength(region.getStart() + region.getLength() - currentNode.getStart());
- currentNode.setEnded(true);
- region.adjustStart(-currentNode.getStart());
- currentNode.addRegion(region);
- // DW 4/16/2003 regions no longer have parents
- // region.setParent(currentNode);
- }
- }
- // the following contexts OPEN new StructuredDocumentRegions
- else if ((currentNode != null && currentNode.isEnded()) || (type == DOMRegionContext.XML_CONTENT) || (type == DOMRegionContext.XML_CHAR_REFERENCE) || (type == DOMRegionContext.XML_ENTITY_REFERENCE) || (type == DOMRegionContext.XML_PI_OPEN) || (type == DOMRegionContext.XML_TAG_OPEN) || (type == DOMRegionContext.XML_END_TAG_OPEN) || (type == DOMRegionContext.XML_COMMENT_OPEN) || (type == DOMRegionContext.XML_CDATA_OPEN) || (type == DOMRegionContext.XML_DECLARATION_OPEN)) {
- if (currentNode != null) {
- // ensure that any existing node is at least terminated
- if (!currentNode.isEnded()) {
- currentNode.setLength(region.getStart() - currentNode.getStart());
- // fCurrentNode.setTextLength(region.getStart() -
- // fCurrentNode.getStart());
- }
- lastNode = currentNode;
- }
- fireNodeParsed(currentNode);
- currentNode = createStructuredDocumentRegion(type);
- if (lastNode != null) {
- lastNode.setNext(currentNode);
- }
- currentNode.setPrevious(lastNode);
- currentNode.setStart(region.getStart());
- currentNode.addRegion(region);
- currentNode.setLength(region.getStart() + region.getLength() - currentNode.getStart());
- region.adjustStart(-currentNode.getStart());
- // DW 4/16/2003 regions no longer have parents
- // region.setParent(currentNode);
- }
- // the following contexts neither open nor close
- // StructuredDocumentRegions; just add to them
- else if ((type == DOMRegionContext.XML_TAG_NAME) || (type == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) || (type == DOMRegionContext.XML_TAG_ATTRIBUTE_EQUALS) || (type == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) || (type == DOMRegionContext.XML_COMMENT_TEXT) || (type == DOMRegionContext.XML_PI_CONTENT) || (type == DOMRegionContext.XML_DOCTYPE_INTERNAL_SUBSET)) {
- currentNode.addRegion(region);
- currentNode.setLength(region.getStart() + region.getLength() - currentNode.getStart());
- region.adjustStart(-currentNode.getStart());
- // DW 4/16/2003 regions no longer have parents
- // region.setParent(currentNode);
- }
- // the following contexts close off StructuredDocumentRegions
- // cleanly
- else if ((type == DOMRegionContext.XML_PI_CLOSE) || (type == DOMRegionContext.XML_TAG_CLOSE) || (type == DOMRegionContext.XML_EMPTY_TAG_CLOSE) || (type == DOMRegionContext.XML_COMMENT_CLOSE) || (type == DOMRegionContext.XML_DECLARATION_CLOSE) || (type == DOMRegionContext.XML_CDATA_CLOSE)) {
- currentNode.setEnded(true);
- currentNode.setLength(region.getStart() + region.getLength() - currentNode.getStart());
- currentNode.addRegion(region);
- region.adjustStart(-currentNode.getStart());
- // DW 4/16/2003 regions no longer have parents
- // region.setParent(currentNode);
- }
- // this is extremely rare, but valid
- else if (type == DOMRegionContext.WHITE_SPACE) {
- ITextRegion lastRegion = currentNode.getLastRegion();
- // pack the embedded container with this region
- if (lastRegion instanceof ITextRegionContainer) {
- ITextRegionContainer container = (ITextRegionContainer) lastRegion;
- container.getRegions().add(region);
- // containers must have parent set ...
- // setting for EACH subregion is redundent, but not sure
- // where else to do, so will do here for now.
- container.setParent(currentNode);
- // DW 4/16/2003 regions no longer have parents
- // region.setParent(container);
- region.adjustStart(container.getLength() - region.getStart());
- }
- currentNode.getLastRegion().adjustLength(region.getLength());
- currentNode.adjustLength(region.getLength());
- }
- else if (type == DOMRegionContext.UNDEFINED && currentNode != null) {
- // skip on a very-first region situation as the default
- // behavior is good enough
- // combine with previous if also undefined
- if (currentNode.getLastRegion() != null && currentNode.getLastRegion().getType() == DOMRegionContext.UNDEFINED) {
- currentNode.getLastRegion().adjustLength(region.getLength());
- currentNode.adjustLength(region.getLength());
- }
- // previous wasn't undefined
- else {
- currentNode.addRegion(region);
- currentNode.setLength(region.getStart() + region.getLength() - currentNode.getStart());
- region.adjustStart(-currentNode.getStart());
- }
- }
- else {
- // if an unknown type is the first region in the document,
- // ensure that a node exists
- if (currentNode == null) {
- currentNode = createStructuredDocumentRegion(type);
- currentNode.setStart(region.getStart());
- }
- currentNode.addRegion(region);
- currentNode.setLength(region.getStart() + region.getLength() - currentNode.getStart());
- region.adjustStart(-currentNode.getStart());
- // DW 4/16/2003 regions no longer have parents
- // region.setParent(currentNode);
- if (Debug.debugTokenizer)
- System.out.println(getClass().getName() + " found region of not specifically handled type " + region.getType() + " @ " + region.getStart() + "[" + region.getLength() + "]"); //$NON-NLS-4$//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
- //$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
- }
-
- // these regions also get their own node, so close them cleanly
- // NOTE: these regions have new StructuredDocumentRegions created
- // for them above; it may
- // be more readable if that is handled here as well, but the
- // current layout
- // ensures that they open StructuredDocumentRegions the same way
- if ((type == DOMRegionContext.XML_CONTENT) || (type == DOMRegionContext.XML_CHAR_REFERENCE) || (type == DOMRegionContext.XML_ENTITY_REFERENCE)) {
- currentNode.setEnded(true);
- }
- if (headNode == null && currentNode != null) {
- headNode = currentNode;
- }
- }
- if (currentNode != null) {
- fireNodeParsed(currentNode);
- currentNode.setPrevious(lastNode);
- }
- // fStringInput = null;
- primReset();
- return headNode;
- }
-
-}
-
diff --git a/bundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/parser/regions/XPathSeparatorRegion.java b/bundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/parser/regions/XPathSeparatorRegion.java
deleted file mode 100755
index 2d563cf..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/parser/regions/XPathSeparatorRegion.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Carver - initial API and implementation
- *
- *******************************************************************************/
-package org.eclipse.wst.xsl.core.internal.parser.regions;
-
-import org.eclipse.wst.sse.core.internal.provisional.events.StructuredDocumentEvent;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.xml.core.internal.parser.regions.RegionToStringUtil;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-
-
-
-public class XPathSeparatorRegion implements ITextRegion {
- static private final byte fTextLength = 1;
- static private final String fType = DOMRegionContext.XML_TAG_ATTRIBUTE_EQUALS;
- private short fLength;
- private int fStart;
-
-
- public XPathSeparatorRegion() {
- super();
- }
-
- public XPathSeparatorRegion(int start, int textLength, int length) {
- this();
- fStart = start;
- fLength = (short) length;
- }
-
-
- public void adjustLength(int i) {
- fLength += i;
-
- }
-
- public void adjustStart(int i) {
- fStart += i;
-
- }
-
- public void adjustTextLength(int i) {
- // not supported
-
- }
-
- public void equatePositions(ITextRegion region) {
- fStart = region.getStart();
- fLength = (short) region.getLength();
- }
-
- public int getEnd() {
- return fStart + fLength;
- }
-
- public int getLength() {
- return fLength;
- }
-
- public int getStart() {
- return fStart;
- }
-
- public int getTextEnd() {
- return fStart + fTextLength;
- }
-
- public int getTextLength() {
- return fTextLength;
- }
-
- public String getType() {
- return fType;
- }
-
- @Override
- public String toString() {
- return RegionToStringUtil.toString(this);
- }
-
- public StructuredDocumentEvent updateRegion(Object requester, IStructuredDocumentRegion parent, String changes, int requestStart, int lengthToReplace) {
- // can never be updated
- return null;
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/regions/XPathRegionContext.java b/bundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/regions/XPathRegionContext.java
deleted file mode 100755
index f46db8a..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/regions/XPathRegionContext.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Carver - initial API and implementation
- *
- *******************************************************************************/
-package org.eclipse.wst.xsl.core.internal.regions;
-
-public interface XPathRegionContext {
-
- public static final String BLOCK_TEXT = "BLOCK_TEXT"; //$NON-NLS-1$
-
- public static final String UNDEFINED = "UNDEFINED"; //$NON-NLS-1$
-
- public static final String WHITE_SPACE = "WHITE_SPACE"; //$NON-NLS-1$
-
- public static final String XPATH_CONTENT = "XPATH_CONTENT"; //$NON-NLS-1$
- public static final String XPATH_SEPARATOR_DIV = "XPATH_SEPARATOR_DIV"; //$NON-NLS-1$
- public static final String XPATH_FUNCTION_PARAMETERS_OPEN = "XPATH_FUNCTION_PARAMETERS_OPEN"; //$NON-NLS-1$
- public static final String XPATH_FUNCTION_PARAMETERS_CLOSE = "XPATH_FUNCTION_PARAMETERS_CLOSE"; //$NON-NLS-1$
- public static final String XPATH_FUNCTION_NAME = "XPATH_FUNCTION_NAME"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/regions/XSLParserRegionFactory.java b/bundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/regions/XSLParserRegionFactory.java
deleted file mode 100644
index 45c11df..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/regions/XSLParserRegionFactory.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Carver - initial API and implementation
- *
- *******************************************************************************/
-
-package org.eclipse.wst.xsl.core.internal.regions;
-
-import org.eclipse.wst.xml.core.internal.parser.regions.XMLParserRegionFactory;
-
-public class XSLParserRegionFactory extends XMLParserRegionFactory {
-
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/text/IXSLPartitions.java b/bundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/text/IXSLPartitions.java
deleted file mode 100755
index 48b1c42..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/text/IXSLPartitions.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Carver - initial API and implementation
- *
- *******************************************************************************/
-package org.eclipse.wst.xsl.core.internal.text;
-
-
-
-/**
- * This interface is not intended to be implemented.
- * It defines the partition types for XSL.
- * Clients should reference the partition type Strings defined here directly.
- *
- * @since 0.5M7
- */
-public interface IXSLPartitions {
-
- String XSL_XPATH = "org.eclipse.wst.xsl.XSL_XPATH"; //$NON-NLS-1$
-
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/text/rules/StructuredTextPartitionerForXSL.java b/bundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/text/rules/StructuredTextPartitionerForXSL.java
deleted file mode 100755
index af73748..0000000
--- a/bundles/org.eclipse.wst.xsl.core/src_sse/org/eclipse/wst/xsl/core/internal/text/rules/StructuredTextPartitionerForXSL.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Carver - initial API and implementation
- *
- *******************************************************************************/
-package org.eclipse.wst.xsl.core.internal.text.rules;
-
-import org.eclipse.jface.text.IDocumentPartitioner;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredTextPartitioner;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.eclipse.wst.xml.core.internal.text.rules.StructuredTextPartitionerForXML;
-import org.eclipse.wst.xml.core.text.IXMLPartitions;
-import org.eclipse.wst.xsl.core.internal.text.IXSLPartitions;
-
-/**
- * Contains information specific to setting up Structured Document Partions
- * in XSL documents.
- * @author dcarver
- *
- */
-public class StructuredTextPartitionerForXSL extends StructuredTextPartitionerForXML implements IStructuredTextPartitioner {
-
- private final static String[] configuredContentTypes = new String[]{IXMLPartitions.XML_DEFAULT, IXMLPartitions.XML_CDATA, IXMLPartitions.XML_PI, IXMLPartitions.XML_DECLARATION, IXMLPartitions.XML_COMMENT, IXMLPartitions.DTD_SUBSET, IXSLPartitions.XSL_XPATH};
-
- /**
- * The StructuredTextPartitionerForXSL adds the necessary
- * Partition types to help Identify potential XPath areas.
- * This is also used for Line Styling and Content Assistance.
- */
- public StructuredTextPartitionerForXSL() {
- super();
- }
-
- @Override
- public String getPartitionType(ITextRegion region, int offset) {
- String result = null;
- if (region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
- result = IXSLPartitions.XSL_XPATH;
- } else {
- result = super.getPartitionType(region, offset);
- }
- return result;
- }
-
- public static String[] getConfiguredContentTypes() {
- return configuredContentTypes.clone();
- }
-
- @Override
- public IDocumentPartitioner newInstance() {
- StructuredTextPartitionerForXSL instance = new StructuredTextPartitionerForXSL();
- return instance;
- }
-
-
-
-}
diff --git a/bundles/org.eclipse.wst.xsl.core/xslt-schemas/xinclude.xsd b/bundles/org.eclipse.wst.xsl.core/xslt-schemas/xinclude.xsd
deleted file mode 100644
index 4b1cb30..0000000
--- a/bundles/org.eclipse.wst.xsl.core/xslt-schemas/xinclude.xsd
+++ /dev/null
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-*******************************************************************************
- * W3C® SOFTWARE NOTICE AND LICENSE
- * http://www.w3.org/Consortium/Legal/copyright-software-19980720
- *
- * Copyright © 1994-2002 World Wide Web Consortium, (Massachusetts Institute of
- * Technology, Institut National de Recherche en Informatique et en Automatique,
- * Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/
- *
- * This W3C work (including software, documents, or other related items) is being
- * provided by the copyright holders under the following license. By obtaining,
- * using and/or copying this work, you (the licensee) agree that you have read,
- * understood, and will comply with the following terms and conditions:
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation, with or without modification, for any purpose and without fee
- * or royalty is hereby granted, provided that you include the following on ALL copies
- * of the software and documentation or portions thereof, including modifications, that
- * you make:
- *
- * 1. The full text of this NOTICE in a location viewable to users of the redistributed
- * or derivative work.
- * 2. Any pre-existing intellectual property disclaimers, notices, or terms and
- * conditions. If none exist, a short notice of the following form (hypertext is preferred, text is permitted) should be used within the body of any redistributed or derivative code: "Copyright © [$date-of-software] World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/"
- * 3. Notice of any changes or modifications to the W3C files, including the date changes
- * were made. (We recommend you provide URIs to the location from which the code is
- * derived.)
- *
- * THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO
- * REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO,
- * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF
- * THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
- * TRADEMARKS OR OTHER RIGHTS.
- *
- * COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL
- * DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
- *
- * The name and trademarks of copyright holders may NOT be used in advertising or publicity
- * pertaining to the software without specific, written prior permission. Title to copyright
- * in this software and any associated documentation will at all times remain with copyright
- * holders.
- ********************************************************************************************
- -->
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:xi="http://www.w3.org/2001/XInclude"
- targetNamespace="http://www.w3.org/2001/XInclude"
- finalDefault="extension">
-
- <xs:element name="include" type="xi:includeType" />
-
- <xs:complexType name="includeType" mixed="true">
- <xs:choice minOccurs='0' maxOccurs='unbounded' >
- <xs:element ref='xi:fallback' />
- <xs:any namespace='##other' processContents='lax' />
- <xs:any namespace='##local' processContents='lax' />
- </xs:choice>
- <xs:attribute name="href" use="optional" type="xs:anyURI"/>
- <xs:attribute name="parse" use="optional" default="xml"
- type="xi:parseType" />
- <xs:attribute name="xpointer" use="optional" type="xs:string"/>
- <xs:attribute name="encoding" use="optional" type="xs:string"/>
- <xs:attribute name="accept" use="optional" type="xs:string"/>
- <xs:attribute name="accept-language" use="optional" type="xs:string"/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:complexType>
-
- <xs:simpleType name="parseType">
- <xs:restriction base="xs:token">
- <xs:enumeration value="xml"/>
- <xs:enumeration value="text"/>
- </xs:restriction>
- </xs:simpleType>
-
- <xs:element name="fallback" type="xi:fallbackType" />
-
- <xs:complexType name="fallbackType" mixed="true">
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element ref="xi:include"/>
- <xs:any namespace="##other" processContents="lax"/>
- <xs:any namespace="##local" processContents="lax"/>
- </xs:choice>
- <xs:anyAttribute namespace="##other" processContents="lax" />
- </xs:complexType>
-
-</xs:schema>
diff --git a/bundles/org.eclipse.wst.xsl.core/xslt-schemas/xslt-1.0.xsd b/bundles/org.eclipse.wst.xsl.core/xslt-schemas/xslt-1.0.xsd
deleted file mode 100644
index c922450..0000000
--- a/bundles/org.eclipse.wst.xsl.core/xslt-schemas/xslt-1.0.xsd
+++ /dev/null
@@ -1,1708 +0,0 @@
-<?xml version="1.0"?>
-<!--
- *******************************************************************************
- * Copyright (c) 2001, 2007 - W3C, Standards for Technology in Automotive Retail,
- * and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Carver - 20071228 - STAR - Updated to XML Schemas 2001 1.0
- * Note this schemas is a modified version of the schema for XSLT 2.0, it has
- * been stripped of all XSLT 2.0 additions, to bring it in line with the XSLT 1.0
- * specification.
- * The original version may be found at http://www.w3.org/2007/schema-for-xslt20.xsd
- * The original W3C copyright notice is included:
- * David Carver - 20080330 - STAR - bug 224819 - changed procesContents from lax to skip
- *******************************************************************************
- *******************************************************************************
- * W3C® SOFTWARE NOTICE AND LICENSE
- * http://www.w3.org/Consortium/Legal/copyright-software-19980720
- *
- * Copyright © 1994-2002 World Wide Web Consortium, (Massachusetts Institute of
- * Technology, Institut National de Recherche en Informatique et en Automatique,
- * Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/
- *
- * This W3C work (including software, documents, or other related items) is being
- * provided by the copyright holders under the following license. By obtaining,
- * using and/or copying this work, you (the licensee) agree that you have read,
- * understood, and will comply with the following terms and conditions:
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation, with or without modification, for any purpose and without fee
- * or royalty is hereby granted, provided that you include the following on ALL copies
- * of the software and documentation or portions thereof, including modifications, that
- * you make:
- *
- * 1. The full text of this NOTICE in a location viewable to users of the redistributed
- * or derivative work.
- * 2. Any pre-existing intellectual property disclaimers, notices, or terms and
- * conditions. If none exist, a short notice of the following form (hypertext is preferred, text is permitted) should be used within the body of any redistributed or derivative code: "Copyright © [$date-of-software] World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/"
- * 3. Notice of any changes or modifications to the W3C files, including the date changes
- * were made. (We recommend you provide URIs to the location from which the code is
- * derived.)
- *
- * THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO
- * REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO,
- * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF
- * THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
- * TRADEMARKS OR OTHER RIGHTS.
- *
- * COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL
- * DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
- *
- * The name and trademarks of copyright holders may NOT be used in advertising or publicity
- * pertaining to the software without specific, written prior permission. Title to copyright
- * in this software and any associated documentation will at all times remain with copyright
- * holders.
- ********************************************************************************************
- -->
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- targetNamespace="http://www.w3.org/1999/XSL/Transform"
- elementFormDefault="qualified" >
-
-<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
-<xs:annotation>
- <xs:documentation>
-
- </xs:documentation>
-</xs:annotation>
-<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
-
-<!--
-The declaration of xml:space and xml:lang may need to be commented out because
-of problems processing the schema using various tools
--->
-
-<xs:import namespace="http://www.w3.org/XML/1998/namespace"
- schemaLocation="http://www.w3.org/2001/xml.xsd"/>
-
-<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
-<xs:annotation>
- <xs:documentation>
- PART A: definitions of complex types and model groups used as the basis
- for element definitions
- </xs:documentation>
-</xs:annotation>
-<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
-
-<xs:complexType name="generic-element-type" mixed="true">
- <xs:anyAttribute namespace="##other" processContents="skip"/>
-</xs:complexType>
-
-<!-- <xs:complexType name="versioned-element-type" mixed="true">
- <xs:complexContent>
- <xs:extension base="xsl:generic-element-type">
- <xs:attribute name="version" type="xs:decimal" use="optional"/>
-
- </xs:extension>
- </xs:complexContent>
-</xs:complexType>
--->
-
-<xs:complexType name="element-only-versioned-element-type" mixed="false">
- <xs:complexContent>
- <xs:restriction base="xsl:generic-element-type">
- <xs:anyAttribute namespace="##other" processContents="skip"/>
- </xs:restriction>
- </xs:complexContent>
-
-</xs:complexType>
-
-<xs:complexType name="sequence-constructor">
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:generic-element-type">
- <xs:group ref="xsl:sequence-constructor-group" minOccurs="0" maxOccurs="unbounded"/>
- </xs:extension>
- </xs:complexContent>
-</xs:complexType>
-
-<xs:group name="sequence-constructor-group">
- <xs:choice>
-
- <xs:element ref="xsl:variable"/>
- <xs:element ref="xsl:instruction"/>
- <xs:group ref="xsl:result-elements"/>
- </xs:choice>
-</xs:group>
-
-<xs:element name="declaration" type="xsl:generic-element-type" abstract="true"/>
-
-<xs:element name="instruction" type="xsl:generic-element-type" abstract="true"/>
-
-<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
-<xs:annotation>
- <xs:documentation>
-
- PART B: definitions of individual XSLT elements
- Elements are listed in alphabetical order.
- </xs:documentation>
-</xs:annotation>
-<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
-
-<xs:element name="apply-imports" substitutionGroup="xsl:instruction">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- This command applies template rule from an imported style sheet.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xsl:element-only-versioned-element-type"/>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="apply-templates" substitutionGroup="xsl:instruction">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Applies template rules based on a given XPath selection criteria. If no template
- is found the built in templates are used.
- </xs:documentation>
- </xs:annotation>
-
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xsl:element-only-versioned-element-type">
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element ref="xsl:sort"/>
- <xs:element ref="xsl:with-param"/>
- </xs:choice>
- <xs:attribute name="select" type="xsl:expression" default="child::node()">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. Specifies the XPath criteria to be used to apply the templates.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="mode" type="xsl:mode">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. Specifies the type of template to be used if there is more than
- one way in which to process the given criteria.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="attribute" substitutionGroup="xsl:instruction">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Defines an attribute that will be put in the result set.
- </xs:documentation>
- </xs:annotation>
-
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:sequence-constructor">
- <xs:attribute name="name" type="xsl:avt" use="required">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Required. The name of the attribute to be created.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="namespace" type="xsl:avt">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. The namespace for the attribute.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="attribute-set" substitutionGroup="xsl:declaration">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Defines a group of attributes that will be created and can be reused
- by other portions of the stylesheet during processing. These attributes
- will appear on the resulting document when used.
- </xs:documentation>
- </xs:annotation>
-
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xsl:element-only-versioned-element-type">
- <xs:sequence minOccurs="0" maxOccurs="unbounded">
- <xs:element ref="xsl:attribute"/>
- </xs:sequence>
- <xs:attribute name="name" type="xsl:QName" use="required">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Required. Name of the attribute set.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="use-attribute-sets" type="xsl:QNames" default="">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- A list of attributes-sets separated by spaces to be used in this
- attribute set.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="call-template" substitutionGroup="xsl:instruction">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Specifies the name of a template to be called. A called template
- is only executed when it is called. It is not executed directly by
- an apply-templates command.
- </xs:documentation>
- </xs:annotation>
-
- <xs:complexType>
-
- <xs:complexContent>
- <xs:extension base="xsl:element-only-versioned-element-type">
- <xs:sequence>
- <xs:element ref="xsl:with-param" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:attribute name="name" type="xsl:QName" use="required">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Required. The name of the template to be called.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="choose" substitutionGroup="xsl:instruction">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Choose is the beginning of a When/Otherwise combination. It is
- the way to implement case selection of If/Then/ElseIf type logical
- processing.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xsl:element-only-versioned-element-type">
- <xs:sequence>
- <xs:element ref="xsl:when" maxOccurs="unbounded"/>
- <xs:element ref="xsl:otherwise" minOccurs="0"/>
- </xs:sequence>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="comment" substitutionGroup="xsl:instruction">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Creates a comment node in the result document.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:sequence-constructor"/>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="copy" substitutionGroup="xsl:instruction">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Copy creates a duplicate of the current node being processed. It
- does not copy the attributes or children nodes. See copy-of for
- copying attributes and children nodes.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:sequence-constructor">
- <xs:attribute name="use-attribute-sets" type="xsl:QNames" default="">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. A space separated list of attributes sets to apply to the
- result document.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="copy-of" substitutionGroup="xsl:instruction">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Creates a copy-of the current node and all attributes, and children nodes.
- It copies the nodes specified by the XPath selection criteria.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:generic-element-type">
- <xs:attribute name="select" type="xsl:expression" use="required">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Required. XPath expressions that select the nodes to be copied.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="decimal-format" substitutionGroup="xsl:declaration">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Defines the output format to be used when converting numbers into strings when
- used with the XPath function format-number().
- </xs:documentation>
- </xs:annotation>
-
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xsl:element-only-versioned-element-type">
- <xs:attribute name="name" type="xsl:QName">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. The unique name for this format.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="decimal-separator" type="xsl:char" default=".">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. The character to use to represent a decimal point.
- The default value is a period.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="grouping-separator" type="xsl:char" default=",">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. The character to be used to seperate thousands. The
- default is a comma.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="infinity" type="xs:string" default="Infinity">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. The string to be used to represent infinity. The default
- is Infinity.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="minus-sign" type="xsl:char" default="-">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. The character to be used to represent negative numbers.
- The default is the minus sign.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="NaN" type="xs:string" default="NaN">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. The string to be used when the input is Not a Number.
- The default is NaN.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="percent" type="xsl:char" default="%">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. The character to be used to represent a percent.
- The default is a percent sign.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="per-mille" type="xsl:char" default="&#x2030;">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. The character to be used to represet per thousand.
- The default is &#x2030;
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="zero-digit" type="xsl:char" default="0">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. The character to be used to represent the digit zero.
- The default is the number zero.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="digit" type="xsl:char" default="#">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. The character to be used to indicated where a digit
- is required. The default values is # character.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="pattern-separator" type="xsl:char" default=";">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. The character to be used to separate positive and
- negative sub-patterns in a pattern. The default is a semi-colon.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="element" substitutionGroup="xsl:instruction">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Creates an element in the result document.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType mixed="true">
- <xs:complexContent>
- <xs:extension base="xsl:sequence-constructor">
- <xs:attribute name="name" type="xsl:avt" use="required">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Required. The name of the element to be created.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="namespace" type="xsl:avt">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. The namespace the element belongs.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="use-attribute-sets" type="xsl:QNames" default="">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. A space separated list of attribute-set names to
- be included on the element.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="fallback" substitutionGroup="xsl:instruction" type="xsl:sequence-constructor">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Specifies alternate code to be run if the XSLT processor doesn't understand
- a particular xsl element.
- </xs:documentation>
- </xs:annotation>
-</xs:element>
-
-<xs:element name="for-each" substitutionGroup="xsl:instruction">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- A looping command that processes each node returned from the
- XPath selection criteria.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:generic-element-type">
- <xs:sequence>
- <xs:element ref="xsl:sort" minOccurs="0" maxOccurs="unbounded"/>
- <xs:group ref="xsl:sequence-constructor-group" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:attribute name="select" type="xsl:expression" use="required">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Required. The XPath selection criteria to be used to retrieve the
- node set to be processed by the loop.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="if" substitutionGroup="xsl:instruction">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- A logical construct, that will only be applied when the XPath expression
- test returns true. It does not support a Else statement, see Choose
- for implementing If/Then/ElseIf logic.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:sequence-constructor">
- <xs:attribute name="test" type="xsl:expression" use="required">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Required. The XPath expression to test the variable or node against.
- The statements nested will only be executed if the test returns
- true.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="import">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Allows the inclusion of one stylesheet into another. If there are
- templates that are the same in the parent stylesheet that are in the
- stylesheet being imported, the parent stylesheet's templates will
- take precedence.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xsl:element-only-versioned-element-type">
- <xs:attribute name="href" type="xs:anyURI" use="required">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Required. The URI for the stylesheet. This is either a relative
- or physical URI. If it is relative, it is relative to the location
- of the stylesheet.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-
-<xs:element name="include" substitutionGroup="xsl:declaration">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Include brings in another stylesheet into the current one. Unlike
- the Import statement, the stylesheet templates have the same precedence
- as the one being included in to.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xsl:element-only-versioned-element-type">
- <xs:attribute name="href" type="xs:anyURI" use="required">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Required. The URI for the stylesheet. This is either a relative
- or physical URI. If it is relative, it is relative to the location
- of the stylesheet.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="key" substitutionGroup="xsl:declaration">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- A key is a way to index a set of nodes to be retrieved later by the XPath
- key() function. It allows faster access to a series of nodes based off of a
- unique key with in a list of nodes.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType>
-
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:sequence-constructor">
- <xs:attribute name="name" type="xsl:QName" use="required">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Required. The name of the key to be created.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="match" type="xsl:pattern" use="required">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. Defines the XPath expression to which the nodes will
- be applied.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="use" type="xsl:expression" use="required">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Required. The value of the key for each of the nodes.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-
-</xs:element>
-
-<xs:element name="message" substitutionGroup="xsl:instruction">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Writes a message to the output, usually stdout or stderro. Typically
- used to report errors during processing.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:sequence-constructor">
- <xs:attribute name="terminate" type="xsl:avt" default="no">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. Indicates whether processing should be ended after
- producing the message. The default value is no.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="namespace-alias" substitutionGroup="xsl:declaration">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Allows replacing of a particular namespace from the style sheet to a different
- namespace when writing the result document.
- </xs:documentation>
- </xs:annotation>
-
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xsl:element-only-versioned-element-type">
- <xs:attribute name="stylesheet-prefix" type="xsl:prefix-or-default" use="required">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Required. Specifies the name of the prefix you want to change.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="result-prefix" type="xsl:prefix-or-default" use="required">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Required. Specifies the name of the prefix the result is to use.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="number" substitutionGroup="xsl:instruction">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Used to determine the integer position of the current node. Also used
- in formatting a number.
- </xs:documentation>
- </xs:annotation>
-
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:generic-element-type">
- <xs:attribute name="value" type="xsl:expression">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. A number provided by the implementor instead of
- a system generated number. The position() xpath function can
- be used as well.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="level" type="xsl:level" default="single">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. Specifies how the sequence number is assigned. Valid values
- are single (default), multiple, and any.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="count" type="xsl:pattern">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. An XPath expression that indicates what nodes are to be
- counted.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="from" type="xsl:pattern">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. An XPath expression that indicates where counting will start.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="format" type="xsl:avt" default="1">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. The format string in which the number is to be formatted.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="lang" type="xsl:avt">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. The language code used to indicate what spoken language is
- to be used for the format string.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="letter-value" type="xsl:avt">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. Specifies whether the number is alphabetical or traditional.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="grouping-separator" type="xsl:avt">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. The character to be used to seperate a group of numbers.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="grouping-size" type="xsl:avt">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. A number indicating the number of digits in a group. The
- default is 3.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="otherwise" type="xsl:sequence-constructor">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Otherwise is used to indicate the default action when none of the
- When tests are true, in a Choose statement.
- </xs:documentation>
- </xs:annotation>
-</xs:element>
-
-<xs:element name="output" substitutionGroup="xsl:declaration">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Specifies the format for the result document.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:generic-element-type">
- <xs:attribute name="method" type="xsl:method">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. Valid values are xml, html, and text.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="cdata-section-elements" type="xsl:QNames">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. A space separated list of elements whose content should
- be wrapped with CDATA.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="doctype-public" type="xs:string">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. Sets the value of the Public doctype attribute.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="doctype-system" type="xs:string">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. Sets the value of the System doctype attribute.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="encoding" type="xs:string">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. Specifies the type of encoding to use. i.e. UTF-8, UTF-16, etc.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="indent" type="xsl:yes-or-no">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. Should the result document be pretty-printed.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="media-type" type="xs:string">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. The mime type of the result document. i.e. text/xml
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="omit-xml-declaration" type="xsl:yes-or-no">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. Whether the xml declation should be created in the
- result document.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="standalone" type="xsl:yes-or-no-or-omit">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. Indicates if a standalone declartion should occcur in the
- result document.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="version" type="xs:NMTOKEN">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. Sets the W3C version number to be used with the
- result document. Only used for HTML or XML output.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="param">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Used to declare a local or global parameter.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:sequence-constructor">
- <xs:attribute name="name" type="xsl:QName" use="required">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Required. The name of the parameter to be created.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="select" type="xsl:expression">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. An XPath expression to be used to populate the parameter
- if nothing is passed to it.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-
-<xs:element name="preserve-space" substitutionGroup="xsl:declaration">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Indicates the elements that are to have white space preserved when
- creating the result document.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xsl:element-only-versioned-element-type">
- <xs:attribute name="elements" type="xsl:nametests" use="required">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. A space seperated list of elements in which
- white space is significant and should be preserved when
- creating the result document.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="processing-instruction" substitutionGroup="xsl:instruction">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Creates a processing instruction in the result document.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:sequence-constructor">
- <xs:attribute name="name" type="xsl:avt" use="required">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Required. The name of the processing instruction to be created.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="sort">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Sorts the output of the node set.
- </xs:documentation>
- </xs:annotation>
-
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:sequence-constructor">
- <xs:attribute name="select" type="xsl:expression">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. Specifies the XPath expression to be used to create the nodeset
- to be sorted.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="lang" type="xsl:avt">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. The language code to be used for sorting.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="data-type" type="xsl:avt" default="text">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. The type of data that is being sorted. The default
- is text.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="order" type="xsl:avt" default="ascending">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. The order in which the data is to be sorted. The
- default is ascending.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="case-order" type="xsl:avt">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. Specifies if upper or lowercase letters are to
- be sorted first.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="strip-space" substitutionGroup="xsl:declaration">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Defines which elements are to have white space stripped when
- writing the result document.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xsl:element-only-versioned-element-type">
- <xs:attribute name="elements" type="xsl:nametests" use="required">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Required. A space separeated list of elements are to have
- white space removed when writing the result document.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="stylesheet" substitutionGroup="xsl:transform">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- The root element of a style sheet. Also see the transform element.
- Either stylesheet or transform can be used. Typically stylsheet is
- used.
- </xs:documentation>
- </xs:annotation>
-</xs:element>
-
-<xs:element name="template" substitutionGroup="xsl:declaration">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- A template contains processing instructions and commands for nodes in the
- input document that match the specified XPath expression.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:generic-element-type">
- <xs:sequence>
- <xs:element ref="xsl:param" minOccurs="0" maxOccurs="unbounded"/>
- <xs:group ref="xsl:sequence-constructor-group" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:attribute name="match" type="xsl:pattern">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. An XPath expression or expressions that this template will
- be applied to. Note if this is omitted, then a name attribute must
- be used. Either a namoe or a match are to be used, but not both.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="priority" type="xs:decimal">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. Indicates the numeric priortity for processing the
- template.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="mode" type="xsl:modes">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. The name of the mode for this template. Used to match
- up with the apply-templates mode attribute.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="name" type="xsl:QName">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. The name of a called template. Note that if name is
- not used, then match must be used. You can have one or the other
- but not both.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:complexType name="text-element-base-type">
- <xs:simpleContent>
- <xs:restriction base="xsl:generic-element-type">
-
- <xs:simpleType>
- <xs:restriction base="xs:string"/>
- </xs:simpleType>
- <xs:anyAttribute namespace="##other" processContents="skip"/>
- </xs:restriction>
- </xs:simpleContent>
-</xs:complexType>
-
-<xs:element name="text" substitutionGroup="xsl:instruction">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Writes text data to the output. i.e. #PCData
- </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:simpleContent>
- <xs:extension base="xsl:text-element-base-type">
- <xs:attribute name="disable-output-escaping" type="xsl:yes-or-no" default="no">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. Indicates if non friendly html and xml content should be converted
- to their entity types.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-</xs:element>
-
-<xs:complexType name="transform-element-base-type">
- <xs:complexContent>
- <xs:extension base="xsl:element-only-versioned-element-type">
- <xs:attribute name="version" type="xs:decimal" use="required">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Required. The version number corresponding the the
- XSLT specification being used. For XSLT 1.0, this will
- be 1.0.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="exclude-result-prefixes" type="xsl:prefixes" use="optional">
- <xs:annotation>
- <xs:documentation source="http:/www.w3.org/TR/xslt">
- Optional. A list of namespace prefixes to exclude from the result document.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="extension-element-prefixes" type="xsl:prefixes" use="optional">
- <xs:annotation>
- <xs:documentation source="http:/www.w3.org/TR/xslt">
- Optional. A list of extension namespace prefixes. This is used to identify namespaces that
- contain XSLT processor extensions.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:anyAttribute namespace="##other" processContents="skip"/>
- </xs:extension>
- </xs:complexContent>
-</xs:complexType>
-
-<xs:element name="transform">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- The root element of a style sheet. Also see the stylesheet element.
- Either stylesheet or transform can be used. Typically stylsheet is
- used.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xsl:transform-element-base-type">
- <xs:sequence>
- <xs:element ref="xsl:import" minOccurs="0" maxOccurs="unbounded"/>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element ref="xsl:declaration"/>
- <xs:element ref="xsl:variable"/>
- <xs:element ref="xsl:param"/>
- <xs:any namespace="##other" processContents="skip"/> <!-- weaker than XSLT 1.0 -->
- </xs:choice>
- </xs:sequence>
- <xs:attribute name="id" type="xs:ID">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. A unique ID for the stylesheet.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="value-of" substitutionGroup="xsl:instruction">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Used to pull the data value from the selected node or XPath expression.
- </xs:documentation>
- </xs:annotation>
-
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:sequence-constructor">
- <xs:attribute name="select" type="xsl:expression" use="required">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Required. The XPath expression or current node to be used
- to pull the data from.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="disable-output-escaping" type="xsl:yes-or-no" default="no">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. Whether non-xml friendly data should be entity escaped.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="variable">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Declares a local or global variable to be used during processing.
- The contents of variable can be populated by either a series of
- XSLT commands or XPath expressions.
- </xs:documentation>
- </xs:annotation>
-
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:sequence-constructor">
- <xs:attribute name="name" type="xsl:QName" use="required">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Required. The name of the variable. This is how the
- variable is accessed later in the stylesheet.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="select" type="xsl:expression" use="optional">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. The XPath expression in which the variable is
- populated from. This specifies where the variable is to get
- it's data value from.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="when">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- A conditional statement similiar to an if statement, used to test
- if a particular expression is true or false. Use with the Choose and
- Other wise elements.
- </xs:documentation>
- </xs:annotation>
-
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:sequence-constructor">
- <xs:attribute name="test" type="xsl:expression" use="required">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- An XPath expression that tests to true or false. If true
- the statements within are executed.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="with-param">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Defines the value of a parameter to be passed to a called template.
- </xs:documentation>
- </xs:annotation>
-
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:sequence-constructor">
- <xs:attribute name="name" type="xsl:QName" use="required">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Required. The name of the parameter to be set. This
- must exist in the template that is being called.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="select" type="xsl:expression">
- <xs:annotation>
- <xs:documentation source="http://www.w3.org/TR/xslt">
- Optional. An XPath expression that is used to set
- the value for the parameter being passed to a template.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
-<xs:annotation>
- <xs:documentation>
- PART C: definition of literal result elements
-
- There are three ways to define the literal result elements
- permissible in a stylesheet.
-
- (a) do nothing. This allows any element to be used as a literal
- result element, provided it is not in the XSLT namespace
-
- (b) declare all permitted literal result elements as members
- of the xsl:literal-result-element substitution group
-
- (c) redefine the model group xsl:result-elements to accommodate
- all permitted literal result elements.
-
- Literal result elements are allowed to take certain attributes
- in the XSLT namespace. These are defined in the attribute group
- literal-result-element-attributes, which can be included in the
- definition of any literal result element.
-
- </xs:documentation>
-
-</xs:annotation>
-<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
-
-<xs:element name="literal-result-element" abstract="true" type="xs:anyType"/>
-
-<xs:attributeGroup name="literal-result-element-attributes">
- <xs:attribute name="default-collation" form="qualified" type="xsl:uri-list"/>
- <xs:attribute name="extension-element-prefixes" form="qualified" type="xsl:prefixes"/>
- <xs:attribute name="exclude-result-prefixes" form="qualified" type="xsl:prefixes"/>
- <xs:attribute name="xpath-default-namespace" form="qualified" type="xs:anyURI"/>
- <xs:attribute name="inherit-namespaces" form="qualified" type="xsl:yes-or-no" default="yes"/>
- <xs:attribute name="use-attribute-sets" form="qualified" type="xsl:QNames" default=""/>
-
- <xs:attribute name="use-when" form="qualified" type="xsl:expression"/>
- <xs:attribute name="version" form="qualified" type="xs:decimal"/>
- <xs:attribute name="type" form="qualified" type="xsl:QName"/>
- <xs:attribute name="validation" form="qualified" type="xsl:validation-type"/>
-</xs:attributeGroup>
-
-<xs:group name="result-elements">
- <xs:choice>
- <xs:element ref="xsl:literal-result-element"/>
- <xs:any namespace="##other" processContents="skip"/>
-
- <xs:any namespace="##local" processContents="skip"/>
- </xs:choice>
-</xs:group>
-
-
-<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
-<xs:annotation>
- <xs:documentation>
- PART D: definitions of simple types used in stylesheet attributes
- </xs:documentation>
-</xs:annotation>
-<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
-
-<xs:simpleType name="avt">
- <xs:annotation>
- <xs:documentation>
- This type is used for all attributes that allow an attribute value template.
- The general rules for the syntax of attribute value templates, and the specific
- rules for each such attribute, are described in the XSLT 2.0 Recommendation.
- </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:string"/>
-</xs:simpleType>
-
-<xs:simpleType name="char">
- <xs:annotation>
-
- <xs:documentation>
- A string containing exactly one character.
- </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:string">
- <xs:length value="1"/>
- </xs:restriction>
-</xs:simpleType>
-
-<xs:simpleType name="expression">
- <xs:annotation>
-
- <xs:documentation>
- An XPath 2.0 expression.
- </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:token">
- <xs:pattern value=".+"/>
- </xs:restriction>
-</xs:simpleType>
-
-<xs:simpleType name="input-type-annotations-type">
- <xs:annotation>
-
- <xs:documentation>
- Describes how type annotations in source documents are handled.
- </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:token">
- <xs:enumeration value="preserve"/>
- <xs:enumeration value="strip"/>
- <xs:enumeration value="unspecified"/>
- </xs:restriction>
-</xs:simpleType>
-
-<xs:simpleType name="level">
- <xs:annotation>
- <xs:documentation>
- The level attribute of xsl:number:
- one of single, multiple, or any.
- </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:NCName">
- <xs:enumeration value="single"/>
- <xs:enumeration value="multiple"/>
- <xs:enumeration value="any"/>
-
- </xs:restriction>
-</xs:simpleType>
-
-<xs:simpleType name="mode">
- <xs:annotation>
- <xs:documentation>
- The mode attribute of xsl:apply-templates:
- either a QName, or #current, or #default.
- </xs:documentation>
- </xs:annotation>
- <xs:union memberTypes="xsl:QName">
- <xs:simpleType>
-
- <xs:restriction base="xs:token">
- <xs:enumeration value="#default"/>
- <xs:enumeration value="#current"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:union>
-</xs:simpleType>
-
-<xs:simpleType name="modes">
- <xs:annotation>
-
- <xs:documentation>
- The mode attribute of xsl:template:
- either a list, each member being either a QName or #default;
- or the value #all
- </xs:documentation>
- </xs:annotation>
- <xs:union>
- <xs:simpleType>
- <xs:list>
- <xs:simpleType>
- <xs:union memberTypes="xsl:QName">
-
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="#default"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:union>
- </xs:simpleType>
- </xs:list>
- </xs:simpleType>
-
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="#all"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:union>
-</xs:simpleType>
-
-<xs:simpleType name="nametests">
- <xs:annotation>
-
- <xs:documentation>
- A list of NameTests, as defined in the XPath 2.0 Recommendation.
- Each NameTest is either a QName, or "*", or "prefix:*", or "*:localname"
- </xs:documentation>
- </xs:annotation>
- <xs:list>
- <xs:simpleType>
- <xs:union memberTypes="xsl:QName">
- <xs:simpleType>
- <xs:restriction base="xs:token">
-
- <xs:enumeration value="*"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:pattern value="\i\c*:\*"/>
- <xs:pattern value="\*:\i\c*"/>
- </xs:restriction>
- </xs:simpleType>
-
- </xs:union>
- </xs:simpleType>
- </xs:list>
-</xs:simpleType>
-
-<xs:simpleType name="prefixes">
- <xs:list itemType="xs:NCName"/>
-</xs:simpleType>
-
-<xs:simpleType name="prefix-list-or-all">
- <xs:union memberTypes="xsl:prefix-list">
- <xs:simpleType>
-
- <xs:restriction base="xs:token">
- <xs:enumeration value="#all"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:union>
-</xs:simpleType>
-
-<xs:simpleType name="prefix-list">
- <xs:list itemType="xsl:prefix-or-default"/>
-</xs:simpleType>
-
-<xs:simpleType name="method">
- <xs:annotation>
- <xs:documentation>
- The method attribute of xsl:output:
- Either one of the recognized names "xml", "xhtml", "html", "text",
- or a QName that must include a prefix.
- </xs:documentation>
- </xs:annotation>
- <xs:union>
- <xs:simpleType>
- <xs:restriction base="xs:NCName">
- <xs:enumeration value="xml"/>
-
- <xs:enumeration value="xhtml"/>
- <xs:enumeration value="html"/>
- <xs:enumeration value="text"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType>
- <xs:restriction base="xsl:QName">
- <xs:pattern value="\c*:\c*"/>
- </xs:restriction>
-
- </xs:simpleType>
- </xs:union>
-</xs:simpleType>
-
-<xs:simpleType name="pattern">
- <xs:annotation>
- <xs:documentation>
- A match pattern as defined in the XSLT 2.0 Recommendation.
- The syntax for patterns is a restricted form of the syntax for
- XPath 2.0 expressions.
- </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xsl:expression"/>
-
-</xs:simpleType>
-
-<xs:simpleType name="prefix-or-default">
- <xs:annotation>
- <xs:documentation>
- Either a namespace prefix, or #default.
- Used in the xsl:namespace-alias element.
- </xs:documentation>
- </xs:annotation>
- <xs:union memberTypes="xs:NCName">
- <xs:simpleType>
- <xs:restriction base="xs:token">
-
- <xs:enumeration value="#default"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:union>
-</xs:simpleType>
-
-<xs:simpleType name="QNames">
- <xs:annotation>
- <xs:documentation>
- A list of QNames.
- Used in the [xsl:]use-attribute-sets attribute of various elements,
- and in the cdata-section-elements attribute of xsl:output
- </xs:documentation>
-
- </xs:annotation>
- <xs:list itemType="xsl:QName"/>
-</xs:simpleType>
-
-<xs:simpleType name="QName">
- <xs:annotation>
- <xs:documentation>
- A QName.
- This schema does not use the built-in type xs:QName, but rather defines its own
- QName type. Although xs:QName would define the correct validation on these attributes,
- a schema processor would expand unprefixed QNames incorrectly when constructing the PSVI,
- because (as defined in XML Schema errata) an unprefixed xs:QName is assumed to be in
- the default namespace, which is not the correct assumption for XSLT.
- The data type is defined as a restriction of the built-in type Name, restricted
- so that it can only contain one colon which must not be the first or last character.
- </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:Name">
-
- <xs:pattern value="([^:]+:)?[^:]+"/>
- </xs:restriction>
-</xs:simpleType>
-
-<xs:simpleType name="sequence-type">
- <xs:annotation>
- <xs:documentation>
- The description of a data type, conforming to the
- SequenceType production defined in the XPath 2.0 Recommendation
- </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:token">
-
- <xs:pattern value=".+"/>
- </xs:restriction>
-</xs:simpleType>
-
-<xs:simpleType name="uri-list">
- <xs:list itemType="xs:anyURI"/>
-</xs:simpleType>
-
-<xs:simpleType name="validation-strip-or-preserve">
- <xs:annotation>
- <xs:documentation>
- Describes different ways of type-annotating an element or attribute.
- </xs:documentation>
-
- </xs:annotation>
- <xs:restriction base="xsl:validation-type">
- <xs:enumeration value="preserve"/>
- <xs:enumeration value="strip"/>
- </xs:restriction>
-</xs:simpleType>
-
-<xs:simpleType name="validation-type">
- <xs:annotation>
- <xs:documentation>
- Describes different ways of type-annotating an element or attribute.
- </xs:documentation>
-
- </xs:annotation>
- <xs:restriction base="xs:token">
- <xs:enumeration value="strict"/>
- <xs:enumeration value="lax"/>
- <xs:enumeration value="preserve"/>
- <xs:enumeration value="strip"/>
- </xs:restriction>
-</xs:simpleType>
-
-<xs:simpleType name="yes-or-no">
- <xs:annotation>
-
- <xs:documentation>
- One of the values "yes" or "no".
- </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:token">
- <xs:enumeration value="yes"/>
- <xs:enumeration value="no"/>
- </xs:restriction>
-</xs:simpleType>
-
-<xs:simpleType name="yes-or-no-or-omit">
- <xs:annotation>
- <xs:documentation>
- One of the values "yes" or "no" or "omit".
- </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:token">
- <xs:enumeration value="yes"/>
- <xs:enumeration value="no"/>
- <xs:enumeration value="omit"/>
-
- </xs:restriction>
-</xs:simpleType>
-
-</xs:schema>
diff --git a/bundles/org.eclipse.wst.xsl.core/xslt-schemas/xslt-2.0.xsd b/bundles/org.eclipse.wst.xsl.core/xslt-schemas/xslt-2.0.xsd
deleted file mode 100644
index 91fd200..0000000
--- a/bundles/org.eclipse.wst.xsl.core/xslt-schemas/xslt-2.0.xsd
+++ /dev/null
@@ -1,1173 +0,0 @@
-<?xml version="1.0"?>
-<!--
- *******************************************************************************
- * Copyright (c) 2001, 2007 - W3C, Standards for Technology in Automotive Retail,
- * and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Carver - 20080330 - STAR - bug 224819 - changed procesContents from lax to skip
- *******************************************************************************
-*******************************************************************************
- * W3C® SOFTWARE NOTICE AND LICENSE
- * http://www.w3.org/Consortium/Legal/copyright-software-19980720
- *
- * Copyright © 1994-2002 World Wide Web Consortium, (Massachusetts Institute of
- * Technology, Institut National de Recherche en Informatique et en Automatique,
- * Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/
- *
- * This W3C work (including software, documents, or other related items) is being
- * provided by the copyright holders under the following license. By obtaining,
- * using and/or copying this work, you (the licensee) agree that you have read,
- * understood, and will comply with the following terms and conditions:
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation, with or without modification, for any purpose and without fee
- * or royalty is hereby granted, provided that you include the following on ALL copies
- * of the software and documentation or portions thereof, including modifications, that
- * you make:
- *
- * 1. The full text of this NOTICE in a location viewable to users of the redistributed
- * or derivative work.
- * 2. Any pre-existing intellectual property disclaimers, notices, or terms and
- * conditions. If none exist, a short notice of the following form (hypertext is preferred, text is permitted) should be used within the body of any redistributed or derivative code: "Copyright © [$date-of-software] World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/"
- * 3. Notice of any changes or modifications to the W3C files, including the date changes
- * were made. (We recommend you provide URIs to the location from which the code is
- * derived.)
- *
- * THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO
- * REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO,
- * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF
- * THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
- * TRADEMARKS OR OTHER RIGHTS.
- *
- * COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL
- * DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
- *
- * The name and trademarks of copyright holders may NOT be used in advertising or publicity
- * pertaining to the software without specific, written prior permission. Title to copyright
- * in this software and any associated documentation will at all times remain with copyright
- * holders.
- ********************************************************************************************
- -->
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3.org/1999/XSL/Transform" elementFormDefault="qualified" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
-<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
-<xs:annotation>
- <xs:documentation>
-
- This is a schema for XSLT 2.0 stylesheets.
-
- It defines all the elements that appear in the XSLT namespace; it also
- provides hooks that allow the inclusion of user-defined literal result elements,
- extension instructions, and top-level data elements.
-
- The schema is derived (with kind permission) from a schema for XSLT 1.0 stylesheets
- produced by Asir S Vedamuthu of WebMethods Inc.
-
- This schema is available for use under the conditions of the W3C Software License
- published at http://www.w3.org/Consortium/Legal/copyright-software-19980720
-
- The schema is organized as follows:
-
- PART A: definitions of complex types and model groups used as the basis
- for element definitions
- PART B: definitions of individual XSLT elements
- PART C: definitions for literal result elements
- PART D: definitions of simple types used in attribute definitions
-
- This schema does not attempt to define all the constraints that apply to a valid
- XSLT 2.0 stylesheet module. It is the intention that all valid stylesheet modules
- should conform to this schema; however, the schema is non-normative and in the event
- of any conflict, the text of the Recommendation takes precedence.
-
- This schema does not implement the special rules that apply when a stylesheet
- has sections that use forwards-compatible-mode. In this mode, setting version="3.0"
- allows elements from the XSLT namespace to be used that are not defined in XSLT 2.0.
-
- Simplified stylesheets (those with a literal result element as the outermost element)
- will validate against this schema only if validation starts in lax mode.
-
- This version is dated 2005-02-11
- Authors: Michael H Kay, Saxonica Limited
- Jeni Tennison, Jeni Tennison Consulting Ltd.
-
- </xs:documentation>
-</xs:annotation>
-<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
-
-<!--
-The declaration of xml:space and xml:lang may need to be commented out because
-of problems processing the schema using various tools
--->
-
-<xs:import namespace="http://www.w3.org/XML/1998/namespace"
- schemaLocation="http://www.w3.org/2001/xml.xsd"/>
-
-<!--
- An XSLT stylesheet may contain an in-line schema within an xsl:import-schema element,
- so the Schema for schemas needs to be imported
--->
-
-<xs:import namespace="http://www.w3.org/2001/XMLSchema"
- schemaLocation="http://www.w3.org/2001/XMLSchema.xsd"/>
-
-<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
-<xs:annotation>
- <xs:documentation>
- PART A: definitions of complex types and model groups used as the basis
- for element definitions
- </xs:documentation>
-</xs:annotation>
-<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
-
-<xs:complexType name="generic-element-type" mixed="true">
- <xs:attribute name="default-collation" type="xsl:uri-list"/>
- <xs:attribute name="exclude-result-prefixes" type="xsl:prefix-list-or-all"/>
- <xs:attribute name="extension-element-prefixes" type="xsl:prefix-list"/>
- <xs:attribute name="use-when" type="xsl:expression"/>
- <xs:attribute name="xpath-default-namespace" type="xs:anyURI"/>
- <xs:anyAttribute namespace="##other" processContents="skip"/>
-</xs:complexType>
-
-<xs:complexType name="versioned-element-type" mixed="true">
- <xs:complexContent>
- <xs:extension base="xsl:generic-element-type">
- <xs:attribute name="version" type="xs:decimal" use="optional"/>
- </xs:extension>
- </xs:complexContent>
-</xs:complexType>
-
-<xs:complexType name="element-only-versioned-element-type" mixed="false">
- <xs:complexContent>
- <xs:restriction base="xsl:versioned-element-type">
- <xs:anyAttribute namespace="##other" processContents="skip"/>
- </xs:restriction>
- </xs:complexContent>
-</xs:complexType>
-
-<xs:complexType name="sequence-constructor">
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:versioned-element-type">
- <xs:group ref="xsl:sequence-constructor-group" minOccurs="0" maxOccurs="unbounded"/>
- </xs:extension>
- </xs:complexContent>
-</xs:complexType>
-
-<xs:group name="sequence-constructor-group">
- <xs:choice>
- <xs:element ref="xsl:variable"/>
- <xs:element ref="xsl:instruction"/>
- <xs:group ref="xsl:result-elements"/>
- </xs:choice>
-</xs:group>
-
-<xs:element name="declaration" type="xsl:generic-element-type" abstract="true"/>
-
-<xs:element name="instruction" type="xsl:versioned-element-type" abstract="true"/>
-
-<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
-<xs:annotation>
- <xs:documentation>
- PART B: definitions of individual XSLT elements
- Elements are listed in alphabetical order.
- </xs:documentation>
-</xs:annotation>
-<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
-
-<xs:element name="analyze-string" substitutionGroup="xsl:instruction">
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xsl:element-only-versioned-element-type">
- <xs:sequence>
- <xs:element ref="xsl:matching-substring" minOccurs="0"/>
- <xs:element ref="xsl:non-matching-substring" minOccurs="0"/>
- <xs:element ref="xsl:fallback" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:attribute name="select" type="xsl:expression" use="required"/>
- <xs:attribute name="regex" type="xsl:avt" use="required"/>
- <xs:attribute name="flags" type="xsl:avt" default=""/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="apply-imports" substitutionGroup="xsl:instruction">
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xsl:element-only-versioned-element-type">
- <xs:sequence>
- <xs:element ref="xsl:with-param" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="apply-templates" substitutionGroup="xsl:instruction">
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xsl:element-only-versioned-element-type">
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element ref="xsl:sort"/>
- <xs:element ref="xsl:with-param"/>
- </xs:choice>
- <xs:attribute name="select" type="xsl:expression" default="child::node()"/>
- <xs:attribute name="mode" type="xsl:mode"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="attribute" substitutionGroup="xsl:instruction">
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:sequence-constructor">
- <xs:attribute name="name" type="xsl:avt" use="required"/>
- <xs:attribute name="namespace" type="xsl:avt"/>
- <xs:attribute name="select" type="xsl:expression"/>
- <xs:attribute name="separator" type="xsl:avt"/>
- <xs:attribute name="type" type="xsl:QName"/>
- <xs:attribute name="validation" type="xsl:validation-type"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="attribute-set" substitutionGroup="xsl:declaration">
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xsl:element-only-versioned-element-type">
- <xs:sequence minOccurs="0" maxOccurs="unbounded">
- <xs:element ref="xsl:attribute"/>
- </xs:sequence>
- <xs:attribute name="name" type="xsl:QName" use="required"/>
- <xs:attribute name="use-attribute-sets" type="xsl:QNames" default=""/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="call-template" substitutionGroup="xsl:instruction">
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xsl:element-only-versioned-element-type">
- <xs:sequence>
- <xs:element ref="xsl:with-param" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:attribute name="name" type="xsl:QName" use="required"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="character-map" substitutionGroup="xsl:declaration">
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xsl:element-only-versioned-element-type">
- <xs:sequence>
- <xs:element ref="xsl:output-character" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:attribute name="name" type="xsl:QName" use="required"/>
- <xs:attribute name="use-character-maps" type="xsl:QNames" default=""/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="choose" substitutionGroup="xsl:instruction">
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xsl:element-only-versioned-element-type">
- <xs:sequence>
- <xs:element ref="xsl:when" maxOccurs="unbounded"/>
- <xs:element ref="xsl:otherwise" minOccurs="0"/>
- </xs:sequence>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="comment" substitutionGroup="xsl:instruction">
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:sequence-constructor">
- <xs:attribute name="select" type="xsl:expression"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="copy" substitutionGroup="xsl:instruction">
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:sequence-constructor">
- <xs:attribute name="copy-namespaces" type="xsl:yes-or-no" default="yes"/>
- <xs:attribute name="inherit-namespaces" type="xsl:yes-or-no" default="yes"/>
- <xs:attribute name="use-attribute-sets" type="xsl:QNames" default=""/>
- <xs:attribute name="type" type="xsl:QName"/>
- <xs:attribute name="validation" type="xsl:validation-type"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="copy-of" substitutionGroup="xsl:instruction">
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:versioned-element-type">
- <xs:attribute name="select" type="xsl:expression" use="required"/>
- <xs:attribute name="copy-namespaces" type="xsl:yes-or-no" default="yes"/>
- <xs:attribute name="type" type="xsl:QName"/>
- <xs:attribute name="validation" type="xsl:validation-type"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="decimal-format" substitutionGroup="xsl:declaration">
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xsl:element-only-versioned-element-type">
- <xs:attribute name="name" type="xsl:QName"/>
- <xs:attribute name="decimal-separator" type="xsl:char" default="."/>
- <xs:attribute name="grouping-separator" type="xsl:char" default=","/>
- <xs:attribute name="infinity" type="xs:string" default="Infinity"/>
- <xs:attribute name="minus-sign" type="xsl:char" default="-"/>
- <xs:attribute name="NaN" type="xs:string" default="NaN"/>
- <xs:attribute name="percent" type="xsl:char" default="%"/>
- <xs:attribute name="per-mille" type="xsl:char" default="&#x2030;"/>
- <xs:attribute name="zero-digit" type="xsl:char" default="0"/>
- <xs:attribute name="digit" type="xsl:char" default="#"/>
- <xs:attribute name="pattern-separator" type="xsl:char" default=";"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="element" substitutionGroup="xsl:instruction">
- <xs:complexType mixed="true">
- <xs:complexContent>
- <xs:extension base="xsl:sequence-constructor">
- <xs:attribute name="name" type="xsl:avt" use="required"/>
- <xs:attribute name="namespace" type="xsl:avt"/>
- <xs:attribute name="inherit-namespaces" type="xsl:yes-or-no" default="yes"/>
- <xs:attribute name="use-attribute-sets" type="xsl:QNames" default=""/>
- <xs:attribute name="type" type="xsl:QName"/>
- <xs:attribute name="validation" type="xsl:validation-type"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="fallback" substitutionGroup="xsl:instruction" type="xsl:sequence-constructor"/>
-
-<xs:element name="for-each" substitutionGroup="xsl:instruction">
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:versioned-element-type">
- <xs:sequence>
- <xs:element ref="xsl:sort" minOccurs="0" maxOccurs="unbounded"/>
- <xs:group ref="xsl:sequence-constructor-group" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:attribute name="select" type="xsl:expression" use="required"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="for-each-group" substitutionGroup="xsl:instruction">
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:versioned-element-type">
- <xs:sequence>
- <xs:element ref="xsl:sort" minOccurs="0" maxOccurs="unbounded"/>
- <xs:group ref="xsl:sequence-constructor-group" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:attribute name="select" type="xsl:expression" use="required"/>
- <xs:attribute name="group-by" type="xsl:expression"/>
- <xs:attribute name="group-adjacent" type="xsl:expression"/>
- <xs:attribute name="group-starting-with" type="xsl:pattern"/>
- <xs:attribute name="group-ending-with" type="xsl:pattern"/>
- <xs:attribute name="collation" type="xs:anyURI"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="function" substitutionGroup="xsl:declaration">
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:versioned-element-type">
- <xs:sequence>
- <xs:element ref="xsl:param" minOccurs="0" maxOccurs="unbounded"/>
- <xs:group ref="xsl:sequence-constructor-group" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:attribute name="name" type="xsl:QName" use="required"/>
- <xs:attribute name="override" type="xsl:yes-or-no" default="yes"/>
- <xs:attribute name="as" type="xsl:sequence-type" default="item()*"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="if" substitutionGroup="xsl:instruction">
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:sequence-constructor">
- <xs:attribute name="test" type="xsl:expression" use="required"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="import">
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xsl:element-only-versioned-element-type">
- <xs:attribute name="href" type="xs:anyURI" use="required"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="import-schema" substitutionGroup="xsl:declaration">
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xsl:element-only-versioned-element-type">
- <xs:sequence>
- <xs:element ref="xs:schema" minOccurs="0" maxOccurs="1"/>
- </xs:sequence>
- <xs:attribute name="namespace" type="xs:anyURI"/>
- <xs:attribute name="schema-location" type="xs:anyURI"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="include" substitutionGroup="xsl:declaration">
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xsl:element-only-versioned-element-type">
- <xs:attribute name="href" type="xs:anyURI" use="required"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="key" substitutionGroup="xsl:declaration">
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:sequence-constructor">
- <xs:attribute name="name" type="xsl:QName" use="required"/>
- <xs:attribute name="match" type="xsl:pattern" use="required"/>
- <xs:attribute name="use" type="xsl:expression"/>
- <xs:attribute name="collation" type="xs:anyURI"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="matching-substring" type="xsl:sequence-constructor"/>
-
-<xs:element name="message" substitutionGroup="xsl:instruction">
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:sequence-constructor">
- <xs:attribute name="select" type="xsl:expression"/>
- <xs:attribute name="terminate" type="xsl:avt" default="no"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="namespace" substitutionGroup="xsl:instruction">
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:sequence-constructor">
- <xs:attribute name="name" type="xsl:avt" use="required"/>
- <xs:attribute name="select" type="xsl:expression"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="namespace-alias" substitutionGroup="xsl:declaration">
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xsl:element-only-versioned-element-type">
- <xs:attribute name="stylesheet-prefix" type="xsl:prefix-or-default" use="required"/>
- <xs:attribute name="result-prefix" type="xsl:prefix-or-default" use="required"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="next-match" substitutionGroup="xsl:instruction">
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xsl:element-only-versioned-element-type">
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element ref="xsl:with-param"/>
- <xs:element ref="xsl:fallback"/>
- </xs:choice>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="non-matching-substring" type="xsl:sequence-constructor"/>
-
-<xs:element name="number" substitutionGroup="xsl:instruction">
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:versioned-element-type">
- <xs:attribute name="value" type="xsl:expression"/>
- <xs:attribute name="select" type="xsl:expression"/>
- <xs:attribute name="level" type="xsl:level" default="single"/>
- <xs:attribute name="count" type="xsl:pattern"/>
- <xs:attribute name="from" type="xsl:pattern"/>
- <xs:attribute name="format" type="xsl:avt" default="1"/>
- <xs:attribute name="lang" type="xsl:avt"/>
- <xs:attribute name="letter-value" type="xsl:avt"/>
- <xs:attribute name="ordinal" type="xsl:avt"/>
- <xs:attribute name="grouping-separator" type="xsl:avt"/>
- <xs:attribute name="grouping-size" type="xsl:avt"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="otherwise" type="xsl:sequence-constructor"/>
-
-<xs:element name="output" substitutionGroup="xsl:declaration">
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:generic-element-type">
- <xs:attribute name="name" type="xsl:QName"/>
- <xs:attribute name="method" type="xsl:method"/>
- <xs:attribute name="byte-order-mark" type="xsl:yes-or-no"/>
- <xs:attribute name="cdata-section-elements" type="xsl:QNames"/>
- <xs:attribute name="doctype-public" type="xs:string"/>
- <xs:attribute name="doctype-system" type="xs:string"/>
- <xs:attribute name="encoding" type="xs:string"/>
- <xs:attribute name="escape-uri-attributes" type="xsl:yes-or-no"/>
- <xs:attribute name="include-content-type" type="xsl:yes-or-no"/>
- <xs:attribute name="indent" type="xsl:yes-or-no"/>
- <xs:attribute name="media-type" type="xs:string"/>
- <xs:attribute name="normalization-form" type="xs:NMTOKEN"/>
- <xs:attribute name="omit-xml-declaration" type="xsl:yes-or-no"/>
- <xs:attribute name="standalone" type="xsl:yes-or-no-or-omit"/>
- <xs:attribute name="undeclare-prefixes" type="xsl:yes-or-no"/>
- <xs:attribute name="use-character-maps" type="xsl:QNames"/>
- <xs:attribute name="version" type="xs:NMTOKEN"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="output-character">
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xsl:element-only-versioned-element-type">
- <xs:attribute name="character" type="xsl:char" use="required"/>
- <xs:attribute name="string" type="xs:string" use="required"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="param">
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:sequence-constructor">
- <xs:attribute name="name" type="xsl:QName" use="required"/>
- <xs:attribute name="select" type="xsl:expression"/>
- <xs:attribute name="as" type="xsl:sequence-type"/>
- <xs:attribute name="required" type="xsl:yes-or-no"/>
- <xs:attribute name="tunnel" type="xsl:yes-or-no"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="perform-sort" substitutionGroup="xsl:instruction">
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:versioned-element-type">
- <xs:sequence>
- <xs:element ref="xsl:sort" minOccurs="1" maxOccurs="unbounded"/>
- <xs:group ref="xsl:sequence-constructor-group" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:attribute name="select" type="xsl:expression"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="preserve-space" substitutionGroup="xsl:declaration">
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xsl:element-only-versioned-element-type">
- <xs:attribute name="elements" type="xsl:nametests" use="required"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="processing-instruction" substitutionGroup="xsl:instruction">
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:sequence-constructor">
- <xs:attribute name="name" type="xsl:avt" use="required"/>
- <xs:attribute name="select" type="xsl:expression"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="result-document" substitutionGroup="xsl:instruction">
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:sequence-constructor">
- <xs:attribute name="format" type="xsl:QName"/>
- <xs:attribute name="href" type="xsl:avt"/>
- <xs:attribute name="type" type="xsl:QName"/>
- <xs:attribute name="validation" type="xsl:validation-type"/>
- <xs:attribute name="method" type="xsl:avt"/>
- <xs:attribute name="byte-order-mark" type="xsl:avt"/>
- <xs:attribute name="cdata-section-elements" type="xsl:avt"/>
- <xs:attribute name="doctype-public" type="xsl:avt"/>
- <xs:attribute name="doctype-system" type="xsl:avt"/>
- <xs:attribute name="encoding" type="xsl:avt"/>
- <xs:attribute name="escape-uri-attributes" type="xsl:avt"/>
- <xs:attribute name="include-content-type" type="xsl:avt"/>
- <xs:attribute name="indent" type="xsl:avt"/>
- <xs:attribute name="media-type" type="xsl:avt"/>
- <xs:attribute name="normalization-form" type="xsl:avt"/>
- <xs:attribute name="omit-xml-declaration" type="xsl:avt"/>
- <xs:attribute name="standalone" type="xsl:avt"/>
- <xs:attribute name="undeclare-prefixes" type="xsl:avt"/>
- <xs:attribute name="use-character-maps" type="xsl:QNames"/>
- <xs:attribute name="output-version" type="xsl:avt"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="sequence" substitutionGroup="xsl:instruction">
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:sequence-constructor">
- <xs:attribute name="select" type="xsl:expression"/>
- <xs:attribute name="as" type="xsl:sequence-type"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="sort">
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:sequence-constructor">
- <xs:attribute name="select" type="xsl:expression"/>
- <xs:attribute name="lang" type="xsl:avt"/>
- <xs:attribute name="data-type" type="xsl:avt" default="text"/>
- <xs:attribute name="order" type="xsl:avt" default="ascending"/>
- <xs:attribute name="case-order" type="xsl:avt"/>
- <xs:attribute name="collation" type="xsl:avt"/>
- <xs:attribute name="stable" type="xsl:yes-or-no"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="strip-space" substitutionGroup="xsl:declaration">
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xsl:element-only-versioned-element-type">
- <xs:attribute name="elements" type="xsl:nametests" use="required"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="stylesheet" substitutionGroup="xsl:transform"/>
-
-<xs:element name="template" substitutionGroup="xsl:declaration">
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:versioned-element-type">
- <xs:sequence>
- <xs:element ref="xsl:param" minOccurs="0" maxOccurs="unbounded"/>
- <xs:group ref="xsl:sequence-constructor-group" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:attribute name="match" type="xsl:pattern"/>
- <xs:attribute name="priority" type="xs:decimal"/>
- <xs:attribute name="mode" type="xsl:modes"/>
- <xs:attribute name="name" type="xsl:QName"/>
- <xs:attribute name="as" type="xsl:sequence-type" default="item()*"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:complexType name="text-element-base-type">
- <xs:simpleContent>
- <xs:restriction base="xsl:versioned-element-type">
- <xs:simpleType>
- <xs:restriction base="xs:string"/>
- </xs:simpleType>
- <xs:anyAttribute namespace="##other" processContents="skip"/>
- </xs:restriction>
- </xs:simpleContent>
-</xs:complexType>
-
-<xs:element name="text" substitutionGroup="xsl:instruction">
- <xs:complexType>
- <xs:simpleContent>
- <xs:extension base="xsl:text-element-base-type">
- <xs:attribute name="disable-output-escaping" type="xsl:yes-or-no" default="no"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-</xs:element>
-
-<xs:complexType name="transform-element-base-type">
- <xs:complexContent>
- <xs:restriction base="xsl:element-only-versioned-element-type">
- <xs:attribute name="version" type="xs:decimal" use="required"/>
- <xs:anyAttribute namespace="##other" processContents="skip"/>
- </xs:restriction>
- </xs:complexContent>
-</xs:complexType>
-
-<xs:element name="transform">
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xsl:transform-element-base-type">
- <xs:sequence>
- <xs:element ref="xsl:import" minOccurs="0" maxOccurs="unbounded"/>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element ref="xsl:declaration"/>
- <xs:element ref="xsl:variable"/>
- <xs:element ref="xsl:param"/>
- <xs:any namespace="##other" processContents="skip"/> <!-- weaker than XSLT 1.0 -->
- </xs:choice>
- </xs:sequence>
- <xs:attribute name="id" type="xs:ID"/>
- <xs:attribute name="default-validation" type="xsl:validation-strip-or-preserve" default="strip"/>
- <xs:attribute name="input-type-annotations" type="xsl:input-type-annotations-type" default="unspecified"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="value-of" substitutionGroup="xsl:instruction">
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:sequence-constructor">
- <xs:attribute name="select" type="xsl:expression"/>
- <xs:attribute name="separator" type="xsl:avt"/>
- <xs:attribute name="disable-output-escaping" type="xsl:yes-or-no" default="no"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="variable">
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:sequence-constructor">
- <xs:attribute name="name" type="xsl:QName" use="required"/>
- <xs:attribute name="select" type="xsl:expression" use="optional"/>
- <xs:attribute name="as" type="xsl:sequence-type" use="optional"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="when">
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:sequence-constructor">
- <xs:attribute name="test" type="xsl:expression" use="required"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<xs:element name="with-param">
- <xs:complexType>
- <xs:complexContent mixed="true">
- <xs:extension base="xsl:sequence-constructor">
- <xs:attribute name="name" type="xsl:QName" use="required"/>
- <xs:attribute name="select" type="xsl:expression"/>
- <xs:attribute name="as" type="xsl:sequence-type"/>
- <xs:attribute name="tunnel" type="xsl:yes-or-no"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-</xs:element>
-
-<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
-<xs:annotation>
- <xs:documentation>
- PART C: definition of literal result elements
-
- There are three ways to define the literal result elements
- permissible in a stylesheet.
-
- (a) do nothing. This allows any element to be used as a literal
- result element, provided it is not in the XSLT namespace
-
- (b) declare all permitted literal result elements as members
- of the xsl:literal-result-element substitution group
-
- (c) redefine the model group xsl:result-elements to accommodate
- all permitted literal result elements.
-
- Literal result elements are allowed to take certain attributes
- in the XSLT namespace. These are defined in the attribute group
- literal-result-element-attributes, which can be included in the
- definition of any literal result element.
-
- </xs:documentation>
-</xs:annotation>
-<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
-
-<xs:element name="literal-result-element" abstract="true" type="xs:anyType"/>
-
-<xs:attributeGroup name="literal-result-element-attributes">
- <xs:attribute name="default-collation" form="qualified" type="xsl:uri-list"/>
- <xs:attribute name="extension-element-prefixes" form="qualified" type="xsl:prefixes"/>
- <xs:attribute name="exclude-result-prefixes" form="qualified" type="xsl:prefixes"/>
- <xs:attribute name="xpath-default-namespace" form="qualified" type="xs:anyURI"/>
- <xs:attribute name="inherit-namespaces" form="qualified" type="xsl:yes-or-no" default="yes"/>
- <xs:attribute name="use-attribute-sets" form="qualified" type="xsl:QNames" default=""/>
- <xs:attribute name="use-when" form="qualified" type="xsl:expression"/>
- <xs:attribute name="version" form="qualified" type="xs:decimal"/>
- <xs:attribute name="type" form="qualified" type="xsl:QName"/>
- <xs:attribute name="validation" form="qualified" type="xsl:validation-type"/>
-</xs:attributeGroup>
-
-<xs:group name="result-elements">
- <xs:choice>
- <xs:element ref="xsl:literal-result-element"/>
- <xs:any namespace="##other" processContents="skip"/>
- <xs:any namespace="##local" processContents="skip"/>
- </xs:choice>
-</xs:group>
-
-
-<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
-<xs:annotation>
- <xs:documentation>
- PART D: definitions of simple types used in stylesheet attributes
- </xs:documentation>
-</xs:annotation>
-<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
-
-<xs:simpleType name="avt">
- <xs:annotation>
- <xs:documentation>
- This type is used for all attributes that allow an attribute value template.
- The general rules for the syntax of attribute value templates, and the specific
- rules for each such attribute, are described in the XSLT 2.0 Recommendation.
- </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:string"/>
-</xs:simpleType>
-
-<xs:simpleType name="char">
- <xs:annotation>
- <xs:documentation>
- A string containing exactly one character.
- </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:string">
- <xs:length value="1"/>
- </xs:restriction>
-</xs:simpleType>
-
-<xs:simpleType name="expression">
- <xs:annotation>
- <xs:documentation>
- An XPath 2.0 expression.
- </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:token">
- <xs:pattern value=".+"/>
- </xs:restriction>
-</xs:simpleType>
-
-<xs:simpleType name="input-type-annotations-type">
- <xs:annotation>
- <xs:documentation>
- Describes how type annotations in source documents are handled.
- </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:token">
- <xs:enumeration value="preserve"/>
- <xs:enumeration value="strip"/>
- <xs:enumeration value="unspecified"/>
- </xs:restriction>
-</xs:simpleType>
-
-<xs:simpleType name="level">
- <xs:annotation>
- <xs:documentation>
- The level attribute of xsl:number:
- one of single, multiple, or any.
- </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:NCName">
- <xs:enumeration value="single"/>
- <xs:enumeration value="multiple"/>
- <xs:enumeration value="any"/>
- </xs:restriction>
-</xs:simpleType>
-
-<xs:simpleType name="mode">
- <xs:annotation>
- <xs:documentation>
- The mode attribute of xsl:apply-templates:
- either a QName, or #current, or #default.
- </xs:documentation>
- </xs:annotation>
- <xs:union memberTypes="xsl:QName">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="#default"/>
- <xs:enumeration value="#current"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:union>
-</xs:simpleType>
-
-<xs:simpleType name="modes">
- <xs:annotation>
- <xs:documentation>
- The mode attribute of xsl:template:
- either a list, each member being either a QName or #default;
- or the value #all
- </xs:documentation>
- </xs:annotation>
- <xs:union>
- <xs:simpleType>
- <xs:list>
- <xs:simpleType>
- <xs:union memberTypes="xsl:QName">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="#default"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:union>
- </xs:simpleType>
- </xs:list>
- </xs:simpleType>
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="#all"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:union>
-</xs:simpleType>
-
-<xs:simpleType name="nametests">
- <xs:annotation>
- <xs:documentation>
- A list of NameTests, as defined in the XPath 2.0 Recommendation.
- Each NameTest is either a QName, or "*", or "prefix:*", or "*:localname"
- </xs:documentation>
- </xs:annotation>
- <xs:list>
- <xs:simpleType>
- <xs:union memberTypes="xsl:QName">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="*"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:pattern value="\i\c*:\*"/>
- <xs:pattern value="\*:\i\c*"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:union>
- </xs:simpleType>
- </xs:list>
-</xs:simpleType>
-
-<xs:simpleType name="prefixes">
- <xs:list itemType="xs:NCName"/>
-</xs:simpleType>
-
-<xs:simpleType name="prefix-list-or-all">
- <xs:union memberTypes="xsl:prefix-list">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="#all"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:union>
-</xs:simpleType>
-
-<xs:simpleType name="prefix-list">
- <xs:list itemType="xsl:prefix-or-default"/>
-</xs:simpleType>
-
-<xs:simpleType name="method">
- <xs:annotation>
- <xs:documentation>
- The method attribute of xsl:output:
- Either one of the recognized names "xml", "xhtml", "html", "text",
- or a QName that must include a prefix.
- </xs:documentation>
- </xs:annotation>
- <xs:union>
- <xs:simpleType>
- <xs:restriction base="xs:NCName">
- <xs:enumeration value="xml"/>
- <xs:enumeration value="xhtml"/>
- <xs:enumeration value="html"/>
- <xs:enumeration value="text"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType>
- <xs:restriction base="xsl:QName">
- <xs:pattern value="\c*:\c*"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:union>
-</xs:simpleType>
-
-<xs:simpleType name="pattern">
- <xs:annotation>
- <xs:documentation>
- A match pattern as defined in the XSLT 2.0 Recommendation.
- The syntax for patterns is a restricted form of the syntax for
- XPath 2.0 expressions.
- </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xsl:expression"/>
-</xs:simpleType>
-
-<xs:simpleType name="prefix-or-default">
- <xs:annotation>
- <xs:documentation>
- Either a namespace prefix, or #default.
- Used in the xsl:namespace-alias element.
- </xs:documentation>
- </xs:annotation>
- <xs:union memberTypes="xs:NCName">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="#default"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:union>
-</xs:simpleType>
-
-<xs:simpleType name="QNames">
- <xs:annotation>
- <xs:documentation>
- A list of QNames.
- Used in the [xsl:]use-attribute-sets attribute of various elements,
- and in the cdata-section-elements attribute of xsl:output
- </xs:documentation>
- </xs:annotation>
- <xs:list itemType="xsl:QName"/>
-</xs:simpleType>
-
-<xs:simpleType name="QName">
- <xs:annotation>
- <xs:documentation>
- A QName.
- This schema does not use the built-in type xs:QName, but rather defines its own
- QName type. Although xs:QName would define the correct validation on these attributes,
- a schema processor would expand unprefixed QNames incorrectly when constructing the PSVI,
- because (as defined in XML Schema errata) an unprefixed xs:QName is assumed to be in
- the default namespace, which is not the correct assumption for XSLT.
- The data type is defined as a restriction of the built-in type Name, restricted
- so that it can only contain one colon which must not be the first or last character.
- </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:Name">
- <xs:pattern value="([^:]+:)?[^:]+"/>
- </xs:restriction>
-</xs:simpleType>
-
-<xs:simpleType name="sequence-type">
- <xs:annotation>
- <xs:documentation>
- The description of a data type, conforming to the
- SequenceType production defined in the XPath 2.0 Recommendation
- </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:token">
- <xs:pattern value=".+"/>
- </xs:restriction>
-</xs:simpleType>
-
-<xs:simpleType name="uri-list">
- <xs:list itemType="xs:anyURI"/>
-</xs:simpleType>
-
-<xs:simpleType name="validation-strip-or-preserve">
- <xs:annotation>
- <xs:documentation>
- Describes different ways of type-annotating an element or attribute.
- </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xsl:validation-type">
- <xs:enumeration value="preserve"/>
- <xs:enumeration value="strip"/>
- </xs:restriction>
-</xs:simpleType>
-
-<xs:simpleType name="validation-type">
- <xs:annotation>
- <xs:documentation>
- Describes different ways of type-annotating an element or attribute.
- </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:token">
- <xs:enumeration value="strict"/>
- <xs:enumeration value="lax"/>
- <xs:enumeration value="preserve"/>
- <xs:enumeration value="strip"/>
- </xs:restriction>
-</xs:simpleType>
-
-<xs:simpleType name="yes-or-no">
- <xs:annotation>
- <xs:documentation>
- One of the values "yes" or "no".
- </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:token">
- <xs:enumeration value="yes"/>
- <xs:enumeration value="no"/>
- </xs:restriction>
-</xs:simpleType>
-
-<xs:simpleType name="yes-or-no-or-omit">
- <xs:annotation>
- <xs:documentation>
- One of the values "yes" or "no" or "omit".
- </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:token">
- <xs:enumeration value="yes"/>
- <xs:enumeration value="no"/>
- <xs:enumeration value="omit"/>
- </xs:restriction>
-</xs:simpleType>
-
-</xs:schema> \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/.classpath b/bundles/org.eclipse.wst.xsl.debug.ui/.classpath
deleted file mode 100644
index 304e861..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/.cvsignore b/bundles/org.eclipse.wst.xsl.debug.ui/.cvsignore
deleted file mode 100644
index ac6029b..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-javaCompiler...args
-build.xml
-@dot
-temp.folder
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/.project b/bundles/org.eclipse.wst.xsl.debug.ui/.project
deleted file mode 100644
index ded342e..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.xsl.debug.ui</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/.settings/org.eclipse.core.resources.prefs b/bundles/org.eclipse.wst.xsl.debug.ui/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index 0a7bb6d..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Thu Jan 03 22:24:01 EST 2008
-eclipse.preferences.version=1
-encoding/<project>=ISO-8859-1
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.wst.xsl.debug.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index c2dd24e..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,25 +0,0 @@
-#Tue Feb 10 05:29:19 GMT 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.wst.xsl.debug.ui/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index bf7b476..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Fri May 09 15:32:34 BST 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/.settings/org.eclipse.pde.prefs b/bundles/org.eclipse.wst.xsl.debug.ui/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index fdd8568..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,16 +0,0 @@
-#Fri Jan 04 09:04:43 EST 2008
-compilers.incompatible-environment=1
-compilers.p.build=0
-compilers.p.deprecated=1
-compilers.p.missing-bundle-classpath-entries=0
-compilers.p.missing-packages=2
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=0
-compilers.p.unknown-attribute=0
-compilers.p.unknown-class=1
-compilers.p.unknown-element=0
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.use-project=true
-eclipse.preferences.version=1
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.xsl.debug.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index ca60b95..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,30 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name.0
-Bundle-SymbolicName: org.eclipse.wst.xsl.debug.ui;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.wst.xsl.internal.debug.ui.XSLDebugUIPlugin
-Require-Bundle: org.eclipse.ui;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.filesystem;bundle-version="[1.2.0,2.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.variables;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.debug.ui;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.jface.text;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.ui.ide;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.ui.workbench.texteditor;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.wst.sse.ui;bundle-version="[1.1.0,2.0.0)",
- org.eclipse.wst.xsl.launching;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.wst.xsl.core;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.wst.xml.ui;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.osgi.util;bundle-version="[3.2.0,4.0.0)"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-Localization: plugin
-Bundle-Vendor: %Bundle-Vendor.0
-Export-Package: org.eclipse.wst.xsl.debug.internal.util;x-friends:="org.eclipse.wst.xsl.jaxp.debug,org.eclipse.wst.jaxp.debug.ui,org.eclipse.wst.xsl.jaxp.launching",
- org.eclipse.wst.xsl.internal.debug.ui;x-friends:="org.eclipse.wst.xsl.jaxp.debug,org.eclipse.wst.jaxp.debug.ui,org.eclipse.wst.xsl.jaxp.launching",
- org.eclipse.wst.xsl.internal.debug.ui.actions;x-friends:="org.eclipse.wst.xsl.jaxp.debug,org.eclipse.wst.jaxp.debug.ui,org.eclipse.wst.xsl.jaxp.launching",
- org.eclipse.wst.xsl.internal.debug.ui.breakpoint;x-friends:="org.eclipse.wst.xsl.jaxp.debug,org.eclipse.wst.jaxp.debug.ui,org.eclipse.wst.xsl.jaxp.launching",
- org.eclipse.wst.xsl.internal.debug.ui.model;x-friends:="org.eclipse.wst.xsl.jaxp.debug,org.eclipse.wst.jaxp.debug.ui,org.eclipse.wst.xsl.jaxp.launching",
- org.eclipse.wst.xsl.internal.debug.ui.tabs.main;x-friends:="org.eclipse.wst.xsl.jaxp.debug,org.eclipse.wst.jaxp.debug.ui,org.eclipse.wst.xsl.jaxp.launching",
- org.eclipse.wst.xsl.internal.debug.ui.tabs.output;x-friends:="org.eclipse.wst.xsl.jaxp.debug,org.eclipse.wst.jaxp.debug.ui,org.eclipse.wst.xsl.jaxp.launching"
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/about.html b/bundles/org.eclipse.wst.xsl.debug.ui/about.html
deleted file mode 100644
index 2199df3..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/about.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<HTML>
-
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-
-<BODY lang="EN-US">
-
-<H3>About This Content</H3>
-
-<P>June, 2008</P>
-
-<H3>License</H3>
-
-<P>The Eclipse Foundation makes available all content in this plug-in
-("Content"). Unless otherwise indicated below, the Content is provided to you
-under the terms and conditions of the Eclipse Public License Version 1.0
-("EPL"). A copy of the EPL is available at
-<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
-For purposes of the EPL, "Program" will mean the Content.</P>
-
-<P>If you did not receive this Content directly from the Eclipse Foundation, the
-Content is being redistributed by another party ("Redistributor") and different
-terms and conditions may apply to your use of any object code in the Content.
-Check the Redistributor’s license that was provided with the Content. If no such
-license exists, contact the Redistributor. Unless otherwise indicated below, the
-terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at
-<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P>
-
-</BODY>
-</HTML>
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/build.properties b/bundles/org.eclipse.wst.xsl.debug.ui/build.properties
deleted file mode 100644
index 878da21..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- about.html,\
- plugin.properties,\
- icons/
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/icons/brkp_obj.gif b/bundles/org.eclipse.wst.xsl.debug.ui/icons/brkp_obj.gif
deleted file mode 100644
index a831fe7..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/icons/brkp_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/icons/localvariable_obj.gif b/bundles/org.eclipse.wst.xsl.debug.ui/icons/localvariable_obj.gif
deleted file mode 100644
index 3244b26..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/icons/localvariable_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/icons/operation.gif b/bundles/org.eclipse.wst.xsl.debug.ui/icons/operation.gif
deleted file mode 100644
index b55d9e3..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/icons/operation.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/icons/sample.gif b/bundles/org.eclipse.wst.xsl.debug.ui/icons/sample.gif
deleted file mode 100644
index 34fb3c9..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/icons/sample.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/icons/xslt_launch.gif b/bundles/org.eclipse.wst.xsl.debug.ui/icons/xslt_launch.gif
deleted file mode 100644
index bfe15f8..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/icons/xslt_launch.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/icons/xslt_output.gif b/bundles/org.eclipse.wst.xsl.debug.ui/icons/xslt_output.gif
deleted file mode 100644
index 45fb08d..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/icons/xslt_output.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/plugin.properties b/bundles/org.eclipse.wst.xsl.debug.ui/plugin.properties
deleted file mode 100644
index 6bb5a1a..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-#Properties file for org.eclipse.wst.xsl.debug.ui
-Bundle-Name.0 = XSL Debugger UI
-launchMode.description.0 = Create a configuration to debug an XSLT transformation
-launchMode.description.1 = Create a configuration to run an XSLT transformation
-context.description.0 = Context for debugging XSLT
-context.name.0 = XSLT Debugging
-shortcut.label.0 = XSL Transformation
-shortcut.label.1 = XSLT Transformation
-Bundle-Vendor.0 = Eclipse.org
-description.description.0 = Run an XSLT transformation using the selected file(s)
-description.description.1 = Debug an XSLT transformation using the selected file(s)
-description.description.2 = Profile an XSLT transformation using the selected file(s) \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/plugin.xml b/bundles/org.eclipse.wst.xsl.debug.ui/plugin.xml
deleted file mode 100644
index 12740ff..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/plugin.xml
+++ /dev/null
@@ -1,116 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
-
- <extension point="org.eclipse.ui.perspectiveExtensions">
- <perspectiveExtension
- targetID="org.eclipse.wst.xml.perspective">
- <actionSet id="org.eclipse.debug.ui.debugActionSet" />
- <actionSet id="org.eclipse.debug.ui.launchActionSet" />
- <actionSet id="org.eclipse.debug.ui.breakpointActionSet" />
- <actionSet id="org.eclipse.debug.ui.profileActionSet" />
- </perspectiveExtension>
- </extension>
-
- <extension
- point="org.eclipse.debug.ui.launchConfigurationTypeImages">
- <launchConfigurationTypeImage icon="icons/xslt_launch.gif"
- configTypeID="org.eclipse.wst.xsl.launching.launchConfigurationType"
- id="org.eclipse.wst.xsl.internal.debug.ui.launchConfigurationTypeImage" />
- </extension>
-
- <extension
- point="org.eclipse.debug.ui.launchConfigurationTabGroups">
- <launchConfigurationTabGroup
- class="org.eclipse.wst.xsl.internal.debug.ui.XSLTTabGroup"
- id="org.eclipse.wst.xsl.internal.debug.ui.launchConfigurationTabGroup.xslt"
- type="org.eclipse.wst.xsl.launching.launchConfigurationType">
- <launchMode description="%launchMode.description.0"
- mode="debug" perspective="org.eclipse.debug.ui.DebugPerspective" />
- <launchMode description="%launchMode.description.1"
- mode="run" perspective="org.eclipse.wst.xml.perspective" />
- </launchConfigurationTabGroup>
- </extension>
-
- <extension point="org.eclipse.ui.contexts">
- <context description="%context.description.0"
- id="org.eclipse.wst.xsl.debug.ui.context" name="%context.name.0"
- parentId="org.eclipse.debug.ui.debugging">
- </context>
- </extension>
-
- <extension point="org.eclipse.debug.ui.debugModelPresentations">
- <debugModelPresentation
- class="org.eclipse.wst.xsl.internal.debug.ui.model.XSLModelPresentation"
- id="org.eclipse.wst.xsl.launching.XSLDebugModel">
- </debugModelPresentation>
- </extension>
-
- <extension point="org.eclipse.debug.ui.launchShortcuts">
- <shortcut
- class="org.eclipse.wst.xsl.internal.debug.ui.XSLLaunchShortcut"
- icon="icons/xslt_launch.gif"
- id="org.eclipse.wst.xsl.debug.ui.launchshortcut"
- label="%shortcut.label.0"
- modes="run, debug, profile">
- <contextualLaunch>
- <enablement>
- <with variable="selection">
- <iterate>
- <adapt
- type="org.eclipse.core.resources.IFile">
- <or>
- <test
- property="org.eclipse.core.resources.contentTypeId"
- value="org.eclipse.core.runtime.xml" />
- <test
- property="org.eclipse.core.resources.contentTypeId"
- value="org.eclipse.wst.xml.core.xmlsource" />
- <test
- property="org.eclipse.core.resources.contentTypeId"
- value="org.eclipse.wst.xml.core.xslsource" />
- <test
- property="org.eclipse.core.resources.contentTypeId"
- value="org.eclipse.wst.xsd.core.xsdsource" />
- </or>
- </adapt>
- </iterate>
- </with>
- </enablement>
- </contextualLaunch>
- <description
- description="%description.description.0"
- mode="run">
- </description>
- <description
- description="%description.description.1"
- mode="debug">
- </description>
- <description
- description="%description.description.2"
- mode="profile">
- </description>
- </shortcut>
- </extension>
-
- <extension point="org.eclipse.debug.ui.debugModelContextBindings">
- <modelContextBinding
- contextId="org.eclipse.wst.xsl.debug.ui.context"
- debugModelId="org.eclipse.wst.xsl.launching.XSLDebugModel">
- </modelContextBinding>
- </extension>
-
- <extension point="org.eclipse.wst.sse.ui.breakpoint">
- <breakpointContribution
- id="org.eclipse.wst.xsl.debug.ui.providers">
- <provider contentTypes="org.eclipse.wst.xml.core.xslsource"
- class="org.eclipse.wst.xsl.internal.debug.ui.breakpoint.XSLBreakpointProvider:*xsl,*xslt"
- id="org.eclipse.wst.xsl.debug.ui.XSLBreakpointProvider" />
- <!-- TODO add this back in when we can do something with breakpoints on XML files
- <provider contentTypes="org.eclipse.wst.xml.core.xslsource,org.eclipse.wst.xml.core.xmlsource,org.eclipse.core.runtime.xml"
- class="org.eclipse.wst.xsl.internal.debug.ui.breakpoint.XSLBreakpointProvider:*xsl,*xslt,*xml"
- id="org.eclipse.wst.xsl.debug.ui.XSLBreakpointProvider" /> -->
- </breakpointContribution>
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/debug/internal/util/XSLDebugPluginImages.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/debug/internal/util/XSLDebugPluginImages.java
deleted file mode 100755
index afc145b..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/debug/internal/util/XSLDebugPluginImages.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Carver - STAR - bug 223557 - initial API and implementation
- * Holger Voormann - Icons for Processor, Output, and Launch tabs
- *******************************************************************************/
-package org.eclipse.wst.xsl.debug.internal.util;
-
-/**
- * Bundle of most images used by the XSL Debug Plugins
- */
-public class XSLDebugPluginImages {
-
- /**
- * Path to the XSLT Processor Images used for launch configurations
- */
- public static final String IMG_PROCESSOR_TAB = "icons/xslt_processor.gif"; //$NON-NLS-1$
-
- /**
- * Path to the XSLT Output Images used for launch configurations
- */
- public static final String IMG_OUTPUT_TAB = "icons/xslt_output.gif"; //$NON-NLS-1$
-
- /**
- * Path to the XSLT Launch Images used for launch configurations
- */
- public static final String IMG_MAIN_TAB = "icons/xslt_launch.gif"; //$NON-NLS-1$
-
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/debug/internal/util/XSLPluginImageHelper.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/debug/internal/util/XSLPluginImageHelper.java
deleted file mode 100755
index 86843b5..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/debug/internal/util/XSLPluginImageHelper.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Carver - STAR - bug 213849 - initial API and implementation
- *
- *******************************************************************************/
-package org.eclipse.wst.xsl.debug.internal.util;
-
-import java.util.HashMap;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.wst.xsl.internal.debug.ui.XSLDebugUIPlugin;
-
-
-/**
- * Helper class to handle images provided by this plug-in.
- *
- * NOTE: For internal use only. For images used externally, please use the
- * Shared***ImageHelper class instead.
- *
- * @author david carver based on work by amywu
- */
-public class XSLPluginImageHelper {
- private static XSLPluginImageHelper instance = null;
-
- /**
- * Gets the instance.
- *
- * @return Returns a XMLEditorPluginImageHelper
- */
- public synchronized static XSLPluginImageHelper getInstance() {
- if (instance == null) {
- instance = new XSLPluginImageHelper();
- }
- return instance;
- }
-
- // save a descriptor for each image
- @SuppressWarnings("unchecked")
- private HashMap fImageDescRegistry = null;
- private final String PLUGINID = XSLDebugUIPlugin.PLUGIN_ID;
-
- /**
- * Creates an image from the given resource and adds the image to the
- * image registry.
- *
- * @param resource
- * @return Image
- */
- private Image createImage(String resource) {
- ImageDescriptor desc = getImageDescriptor(resource);
- Image image = null;
-
- if (desc != null) {
- image = desc.createImage();
- // dont add the missing image descriptor image to the image
- // registry
- if (!desc.equals(ImageDescriptor.getMissingImageDescriptor())) {
- getImageRegistry().put(resource, image);
- }
- }
- return image;
- }
-
- /**
- * Creates an image descriptor from the given imageFilePath and adds the
- * image descriptor to the image descriptor registry. If an image
- * descriptor could not be created, the default "missing" image descriptor
- * is returned but not added to the image descriptor registry.
- *
- * @param imageFilePath
- * @return ImageDescriptor image descriptor for imageFilePath or default
- * "missing" image descriptor if resource could not be found
- */
- @SuppressWarnings("unchecked")
- private ImageDescriptor createImageDescriptor(String imageFilePath) {
- ImageDescriptor imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(PLUGINID, imageFilePath);
- if (imageDescriptor != null) {
- getImageDescriptorRegistry().put(imageFilePath, imageDescriptor);
- }
- else {
- imageDescriptor = ImageDescriptor.getMissingImageDescriptor();
- }
-
- return imageDescriptor;
- }
-
- /**
- * Retrieves the image associated with resource from the image registry.
- * If the image cannot be retrieved, attempt to find and load the image at
- * the location specified in resource.
- *
- * @param resource
- * the image to retrieve
- * @return Image the image associated with resource or null if one could
- * not be found
- */
- public Image getImage(String resource) {
- Image image = getImageRegistry().get(resource);
- if (image == null) {
- // create an image
- image = createImage(resource);
- }
- return image;
- }
-
- /**
- * Retrieves the image descriptor associated with resource from the image
- * descriptor registry. If the image descriptor cannot be retrieved,
- * attempt to find and load the image descriptor at the location specified
- * in resource.
- *
- * @param resource
- * the image descriptor to retrieve
- * @return ImageDescriptor the image descriptor assocated with resource or
- * the default "missing" image descriptor if one could not be
- * found
- */
- public ImageDescriptor getImageDescriptor(String resource) {
- ImageDescriptor imageDescriptor = null;
- Object o = getImageDescriptorRegistry().get(resource);
- if (o == null) {
- // create a descriptor
- imageDescriptor = createImageDescriptor(resource);
- }
- else {
- imageDescriptor = (ImageDescriptor) o;
- }
- return imageDescriptor;
- }
-
- /**
- * Returns the image descriptor registry for this plugin.
- *
- * @return HashMap - image descriptor registry for this plugin
- */
- @SuppressWarnings("unchecked")
- private HashMap getImageDescriptorRegistry() {
- if (fImageDescRegistry == null) {
- fImageDescRegistry = new HashMap();
- }
- return fImageDescRegistry;
- }
-
- /**
- * Returns the image registry for this plugin.
- *
- * @return ImageRegistry - image registry for this plugin
- */
- private ImageRegistry getImageRegistry() {
- return JFaceResources.getImageRegistry();
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/AbstractTableBlock.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/AbstractTableBlock.java
deleted file mode 100644
index 53bc5c1..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/AbstractTableBlock.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui;
-
-import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.swt.widgets.Table;
-
-/**
- * An <code>AbstractLaunchConfigurationTab</code> specialised for blocks that
- * contain a table. This abstract class conveniently saves and restores the table's
- * column settings.
- *
- * @author Doug Satchwell
- * @since 1.0
- */
-public abstract class AbstractTableBlock extends AbstractLaunchConfigurationTab
-{
- private int fSortColumn;
-
- protected abstract Table getTable();
-
- protected abstract IDialogSettings getDialogSettings();
-
- protected abstract String getQualifier();
-
- protected void setSortColumn(int column)
- {
- fSortColumn = column;
- }
-
- /**
- * Persist table settings into the give dialog store, prefixed with the
- * given key.
- */
- public void saveColumnSettings()
- {
- int columnCount = getTable().getColumnCount();
- for (int i = 0; i < columnCount; i++)
- {
- getDialogSettings().put(getQualifier() + ".columnWidth" + i, getTable().getColumn(i).getWidth()); //$NON-NLS-1$
- }
- getDialogSettings().put(getQualifier() + ".sortColumn", fSortColumn); //$NON-NLS-1$
- }
-
- /**
- * Restore table settings from the given dialog store using the given key.
- */
- public void restoreColumnSettings()
- {
- getTable().layout(true);
- restoreColumnWidths(getDialogSettings(), getQualifier());
- int col = 0;
- try
- {
- col = getDialogSettings().getInt(getQualifier() + ".sortColumn"); //$NON-NLS-1$
- }
- catch (NumberFormatException e)
- {
- col = 1;
- }
- setSortColumn(col);
- }
-
- private void restoreColumnWidths(IDialogSettings settings, String qualifier)
- {
- int columnCount = getTable().getColumnCount();
- for (int i = 0; i < columnCount; i++)
- {
- int width = -1;
- try
- {
- width = settings.getInt(qualifier + ".columnWidth" + i); //$NON-NLS-1$
- }
- catch (NumberFormatException e)
- {
- }
-
- if (width > 0)
- getTable().getColumn(i).setWidth(width);
- }
- }
-
- @Override
- public void dispose()
- {
- if (getTable() != null && !getTable().isDisposed())
- saveColumnSettings();
- super.dispose();
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/Messages.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/Messages.java
deleted file mode 100644
index 7833ebf..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/Messages.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- * David Carver (STAR) - updated to meet Galileo requirements
- * Stuart Harper - added "open files" selector
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui;
-
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Messages for the debug.ui package.
- *
- * @author Doug Satchwell
- * @since 1.0
- */
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.wst.xsl.internal.debug.ui.messages"; //$NON-NLS-1$
-
- /**
- * A name for the remove action.
- */
- public static String RemoveAction_Text;
-
- /**
- * A name for the <code>AddWorkspaceFileAction</code> action.
- */
- public static String AddWorkspaceFileAction_Text;
-
- /**
- * A name for the <code>AddExternalFileAction</code> action.
- */
- public static String AddExternalFileAction_Text;
-
- /**
- * A name for the <code>MoveDownAction</code> action.
- */
- public static String MoveDownAction_Text;
-
- /**
- * A name for the <code>MoveUpAction</code> action.
- */
- public static String MoveUpAction_Text;
-
- /**
- * A heading for the <code>AddExternalFileAction</code> dialog.
- */
- public static String AddExternalFileAction_Selection_3;
-
- /**
- * A message for the <code>AddWorkspaceFileAction</code> dialog.
- */
- public static String AddWorkspaceFileAction_DialogMessage;
-
- /**
- * A title for the <code>AddWorkspaceFileAction</code> dialog.
- */
- public static String AddWorkspaceFileAction_DialogTitle;
-
- /**
- * A name for the <code>AddParameterAction</code> action.
- */
- public static String AddParameterAction;
-
- /**
- * A name for the <code>RemoveParameterAction</code> action.
- */
- public static String RemoveParameterAction;
-
- /**
- * A label for the Variables button.
- */
- public static String VariablesFieldButton_Text;
-
- /**
- * A title for the <code>AddParameterAction</code> dialog.
- */
- public static String AddParameterAction_Dialog;
-
- /**
- * A label for the <code>AddParameterAction</code> name text box.
- */
- public static String AddParameterAction_Dialog_Name;
-
- /**
- * A label for the <code>AddParameterAction</code> type combo.
- */
- public static String AddParameterAction_Dialog_Type;
-
- /**
- * A label for the <code>AddParameterAction</code> value text box.
- */
- public static String AddParameterAction_Dialog_Value;
-
- public static String XSLBreakpointProvider_0;
-
- public static String StylesheetEntryLabelProvider_Invalid_path;
-
- public static String TransformsBlock_0;
-
- public static String TransformsBlock_Name;
-
- public static String InputFileBlock_DIRECTORY_NOT_SPECIFIED;
-
- public static String InputFileBlock_DIRECTORY_DOES_NOT_EXIST;
-
- public static String InputFileBlock_GROUP_NAME;
-
- public static String InputFileBlock_DEFAULT_RADIO;
-
- public static String InputFileBlock_OTHER_RADIO;
-
- public static String InputFileBlock_DIALOG_MESSAGE;
-
- public static String InputFileBlock_WORKSPACE_DIALOG_MESSAGE;
-
- public static String InputFileBlock_VARIABLES_BUTTON;
-
- public static String InputFileBlock_FILE_SYSTEM_BUTTON;
-
- public static String InputFileBlock_WORKSPACE_BUTTON;
-
- public static String InputFileBlock_OPENFILES_BUTTON;
-
- public static String InputFileBlock_OPENFILES_DIALOG;
-
- public static String InputFileBlock_Name;
-
- public static String InputFileBlock_Exception_occurred_reading_configuration;
-
- public static String InputFileBlock_WORKSPACE_DIALOG_TITLE;
-
- public static String XSLMainTab_TabName;
-
- public static String TransformsBlock_ParametersLabel;
-
- public static String TransformsBlock_StylesheetsLabel;
-
- public static String ParametersBlock_0;
- public static String ParametersBlock_1;
- public static String ParametersBlock_10;
- public static String ParametersBlock_11;
- public static String ParametersBlock_2;
- public static String ParametersBlock_3;
- public static String ParametersBlock_4;
- public static String ParametersBlock_5;
- public static String ParametersBlock_6;
- public static String ParametersBlock_7;
- public static String ParametersBlock_8;
- public static String ParametersBlock_9;
-
- public static String OutputPropertiesBlock_0;
- public static String OutputPropertiesBlock_1;
- public static String OutputPropertiesBlock_13;
- public static String OutputPropertiesBlock_3;
- public static String OutputPropertiesBlock_4;
- public static String OutputPropertiesBlock_5;
- public static String OutputPropertiesBlock_7;
- public static String OutputPropertiesBlock_8;
- public static String OutputPropertiesBlock_9;
- public static String OutputTab_0;
- public static String OutputTab_1;
-
- public static String OutputTypeBlock_Group_Name;
-
- public static String OutputFileBlock_0;
-
- public static String OutputFileBlock_7;
-
- public static String OutputFileBlock_8;
-
- public static String OutputFileBlock_9;
-
- public static String OutputFileBlock_DIRECTORY_NOT_SPECIFIED;
-
- public static String OutputFileBlock_DIRECTORY_DOES_NOT_EXIST;
-
- public static String OutputFileBlock_GROUP_NAME;
-
- public static String OutputFileBlock_DEFAULT_RADIO;
-
- public static String OutputFileBlock_OTHER_RADIO;
-
- public static String OutputFileBlock_DIALOG_MESSAGE;
-
- public static String OutputFileBlock_WORKSPACE_DIALOG_MESSAGE;
-
- public static String OutputFileBlock_VARIABLES_BUTTON;
-
- public static String OutputFileBlock_FILE_SYSTEM_BUTTON;
-
- public static String OutputFileBlock_WORKSPACE_BUTTON;
-
- public static String OutputFileBlock_Name;
-
- public static String OutputFileBlock_Exception_occurred_reading_configuration;
-
- public static String OutputFileBlock_WORKSPACE_DIALOG_TITLE;
-
- public static String OutputFileBlock_Exception_occurred_saving_configuration;
-
- public static String OutputFOFileBlock_DIRECTORY_NOT_SPECIFIED;
-
- public static String OutputFOFileBlock_DIRECTORY_DOES_NOT_EXIST;
-
- public static String OutputFOFileBlock_GROUP_NAME;
-
- public static String OutputFOFileBlock_DEFAULT_RADIO;
-
- public static String OutputFOFileBlock_OTHER_RADIO;
-
- public static String OutputFOFileBlock_DIALOG_MESSAGE;
-
- public static String OutputFOFileBlock_WORKSPACE_DIALOG_MESSAGE;
-
- public static String OutputFOFileBlock_VARIABLES_BUTTON;
-
- public static String OutputFOFileBlock_FILE_SYSTEM_BUTTON;
-
- public static String OutputFOFileBlock_WORKSPACE_BUTTON;
-
- public static String OutputFOFileBlock_Name;
-
- public static String OutputFOFileBlock_Exception_occurred_reading_configuration;
-
- public static String OutputFOFileBlock_WORKSPACE_DIALOG_TITLE;
-
- public static String OutputFOFileBlock_Exception_occurred_saving_configuration;
-
- public static String ResourceSelectionBlock_0;
- public static String XSLLaunchShortcut_0;
- public static String XSLLaunchShortcut_1;
- public static String XSLLaunchShortcut_2;
- public static String XSLLaunchShortcut_6;
- public static String XSLSelectExisting;
-
-
-
- private Messages() {
- }
-
- static {
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/ResourceSelectionBlock.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/ResourceSelectionBlock.java
deleted file mode 100644
index 5783a61..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/ResourceSelectionBlock.java
+++ /dev/null
@@ -1,654 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- * Stuart Harper - bug 264788 - added "open files" selector
- * David Carver (STAR) - bug 264788 - pulled up getFileExtensions from InputFileBlock
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui;
-
-import java.io.File;
-import java.lang.reflect.Array;
-import java.util.ArrayList;
-import java.util.Arrays;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.core.runtime.content.IContentTypeManager;
-import org.eclipse.core.variables.IStringVariableManager;
-import org.eclipse.core.variables.VariablesPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
-import org.eclipse.debug.ui.StringVariableSelectionDialog;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.ElementListSelectionDialog;
-import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
-import org.eclipse.ui.dialogs.ISelectionStatusValidator;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.ui.views.navigator.ResourceComparator;
-import org.eclipse.wst.xsl.core.internal.util.XMLContentType;
-
-
-/**
- * A block that shows a text box with buttons for browsing workspace or the filesystem
- * in order to populate the text box with a file path.
- *
- * @author Doug Satchwell
- * @since 1.0
- */
-public abstract class ResourceSelectionBlock extends AbstractLaunchConfigurationTab
-{
- protected static final int ERROR_DIRECTORY_NOT_SPECIFIED = 1;
- protected static final int ERROR_DIRECTORY_DOES_NOT_EXIST = 2;
- protected static final int GROUP_NAME = 3;
- protected static final int USE_DEFAULT_RADIO = 4;
- protected static final int USE_OTHER_RADIO = 5;
- protected static final int DIRECTORY_DIALOG_MESSAGE = 6;
- protected static final int WORKSPACE_DIALOG_MESSAGE = 7;
- protected static final int VARIABLES_BUTTON = 8;
- protected static final int FILE_SYSTEM_BUTTON = 9;
- protected static final int WORKSPACE_BUTTON = 10;
- protected static final int WORKSPACE_DIALOG_TITLE = 11;
- protected static final int OPENFILES_BUTTON = 12;
- protected static final int OPENFILES_DIALOG_TITLE = 13;
-
- protected Button fWorkspaceButton;
- protected Button fFileSystemButton;
- protected Button fVariablesButton;
- protected Button fOpenFilesButton;
- protected Button useDefaultCheckButton;
- protected Text resourceText;
- protected WidgetListener widgetListener = new WidgetListener();
- private ILaunchConfiguration fLaunchConfiguration;
- protected final boolean showDefault;
- private final int resourceType;
- private final boolean mustExist;
- protected boolean required;
- protected String defaultResource;
- protected String resource;
- protected String fileLabel = Messages.ResourceSelectionBlock_0;
-
- IContentTypeManager contentTypeManager = Platform.getContentTypeManager();
-
-
- private final ISelectionStatusValidator validator = new ISelectionStatusValidator()
- {
- public IStatus validate(Object[] selection)
- {
- if (selection.length == 0)
- {
- return new Status(IStatus.ERROR, XSLDebugUIPlugin.PLUGIN_ID, 0, "", null); //$NON-NLS-1$
- }
- for (int i = 0; i < selection.length; i++)
- {
- if (resourceType == IResource.FOLDER && !(selection[i] instanceof IContainer))
- return new Status(IStatus.ERROR, XSLDebugUIPlugin.PLUGIN_ID, 0, "", null); //$NON-NLS-1$
- else if (resourceType == IResource.FILE && !(selection[i] instanceof IFile))
- return new Status(IStatus.ERROR, XSLDebugUIPlugin.PLUGIN_ID, 0, "", null); //$NON-NLS-1$
- }
- return new Status(IStatus.OK, XSLDebugUIPlugin.PLUGIN_ID, 0, "", null); //$NON-NLS-1$
- }
- };
-
- class WidgetListener extends SelectionAdapter implements ModifyListener
- {
- public void modifyText(ModifyEvent e)
- {
- textModified();
- updateLaunchConfigurationDialog();
- }
-
- @Override
- public void widgetSelected(SelectionEvent e)
- {
- Object source = e.getSource();
- if (source == fWorkspaceButton)
- {
- handleWorkspaceResourceBrowseButtonSelected();
- }
- else if (source == fFileSystemButton)
- {
- handleExternalResourceBrowseButtonSelected();
- }
- else if (source == fVariablesButton)
- {
- handleResourceVariablesButtonSelected();
- }
- else if (source == useDefaultCheckButton)
- {
- updateResourceText(useDefaultCheckButton.getSelection());
- }
- else if (source == fOpenFilesButton)
- {
- handleOpenFilesResourceBrowseButtonSelected();
- }
- }
- }
-
- /**
- * Same as <code>new ResourceSelectionBlock(true)</code>
- */
- public ResourceSelectionBlock()
- {
- this(true);
- }
-
- /**
- * Same as <code>new ResourceSelectionBlock(IResource.FOLDER,showDefault)</code>
- *
- * @param showDefault true if this should have a 'Show Default' button
- */
- public ResourceSelectionBlock(boolean showDefault)
- {
- this(IResource.FOLDER, showDefault);
- }
-
- /**
- * Same as <code>new ResourceSelectionBlock(resourceType,showDefault,true)</code>
- *
- * @param resourceType the type of resource to select - IResource.FOLDER or IResource.FILE
- * @param showDefault true if this should have a 'Show Default' button
- */
- public ResourceSelectionBlock(int resourceType, boolean showDefault)
- {
- this(resourceType, showDefault, true);
- }
-
- /**
- * Same as <code>new ResourceSelectionBlock(resourceType,showDefault,required,true)</code>
- *
- * @param resourceType the type of resource to select - IResource.FOLDER or IResource.FILE
- * @param showDefault true if this should have a 'Show Default' button
- * @param required true if a blank text box is invalid
- */
- public ResourceSelectionBlock(int resourceType, boolean showDefault, boolean required)
- {
- this(resourceType, showDefault, required, true);
- }
-
- /**
- * Create a new instance of this.
- *
- * @param resourceType the type of resource to select - IResource.FOLDER or IResource.FILE
- * @param showDefault true if this should have a 'Show Default' button
- * @param required true if a blank text box is invalid
- * @param mustExist true of the selected resource must already exist
- */
- public ResourceSelectionBlock(int resourceType, boolean showDefault, boolean required, boolean mustExist)
- {
- super();
- this.showDefault = showDefault;
- this.resourceType = resourceType;
- this.required = required;
- this.mustExist = mustExist;
- }
-
- public void createControl(Composite parent)
- {
- Composite group = createContainer(parent);
- setControl(group);
- createContents(group);
- }
-
- protected Composite createContainer(Composite parent)
- {
- Group group = new Group(parent, SWT.NONE);
- group.setText(getMessage(GROUP_NAME));
- // TODO PlatformUI.getWorkbench().getHelpSystem().setHelp...
- GridLayout groupLayout = new GridLayout();
- groupLayout.numColumns = 2;
- groupLayout.makeColumnsEqualWidth = false;
- group.setLayout(groupLayout);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- group.setLayoutData(gd);
- group.setFont(parent.getFont());
- return group;
- }
-
- protected void createContents(Composite parent)
- {
- createCheckboxAndText(parent);
- createButtons(parent);
- }
-
- protected void createCheckboxAndText(Composite parent)
- {
- if (showDefault)
- {
- useDefaultCheckButton = createCheckButton(parent, getMessage(USE_DEFAULT_RADIO));
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- gd.horizontalSpan = 2;
- useDefaultCheckButton.setLayoutData(gd);
- useDefaultCheckButton.addSelectionListener(widgetListener);
- }
-
- Composite specificFileComp = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout(2, false);
- layout.marginWidth = 0;
- if (showDefault)
- layout.marginLeft = 20;
- else
- layout.marginLeft = 0;
- layout.marginHeight = 0;
- specificFileComp.setLayout(layout);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- specificFileComp.setLayoutData(gd);
-
- if (showDefault)
- {
- Label label = new Label(specificFileComp, SWT.NONE);
- label.setText(fileLabel);
- }
-
- resourceText = new Text(specificFileComp, SWT.SINGLE | SWT.BORDER);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = showDefault ? 1 : 2;
- resourceText.setLayoutData(gd);
- resourceText.setFont(parent.getFont());
- resourceText.addModifyListener(widgetListener);
- }
-
- protected void createButtons(Composite parent)
- {
- // filler
- new Label(parent, SWT.NONE);
-
- Composite buttonComp = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout(4, false);
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- buttonComp.setLayout(layout);
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_END);
- gd.horizontalSpan = 1;
- buttonComp.setLayoutData(gd);
- buttonComp.setFont(parent.getFont());
-
- fWorkspaceButton = createPushButton(buttonComp, getMessage(WORKSPACE_BUTTON), null);
- fWorkspaceButton.addSelectionListener(widgetListener);
-
- fFileSystemButton = createPushButton(buttonComp, getMessage(FILE_SYSTEM_BUTTON), null);
- fFileSystemButton.addSelectionListener(widgetListener);
-
- fVariablesButton = createPushButton(buttonComp, getMessage(VARIABLES_BUTTON), null);
- fVariablesButton.addSelectionListener(widgetListener);
-
- fOpenFilesButton = createPushButton(buttonComp, getMessage(OPENFILES_BUTTON), null);
- fOpenFilesButton.addSelectionListener(widgetListener);
- }
-
- protected void updateResourceText(boolean useDefault)
- {
- if (useDefault)
- {
- resourceText.setText(defaultResource == null ? "" : defaultResource); //$NON-NLS-1$
- }
- else
- {
- resourceText.setText(resource == null ? "" : resource); //$NON-NLS-1$
- }
- resourceText.setEnabled(!useDefault);
- fFileSystemButton.setEnabled(!useDefault);
- fVariablesButton.setEnabled(!useDefault);
- fWorkspaceButton.setEnabled(!useDefault);
- }
-
- @Override
- public void dispose()
- {
- }
-
- protected void handleExternalResourceBrowseButtonSelected()
- {
- String currentWorkingDir = getText();
- String selected = null;
- if (resourceType == IResource.FOLDER)
- {
- DirectoryDialog dialog = new DirectoryDialog(getShell());
- dialog.setMessage(getMessage(DIRECTORY_DIALOG_MESSAGE));
- if (!currentWorkingDir.trim().equals("")) //$NON-NLS-1$
- {
- File path = new File(currentWorkingDir);
- if (path.exists())
- {
- dialog.setFilterPath(currentWorkingDir);
- }
- }
- selected = dialog.open();
- }
- else
- {
- FileDialog dialog = new FileDialog(getShell());
- if (!currentWorkingDir.trim().equals("")) //$NON-NLS-1$
- {
- File path = new File(currentWorkingDir);
- if (path.exists())
- {
- dialog.setFilterPath(currentWorkingDir);
- }
- }
- String[] fileExtensions = getFileExtensions();
- if (fileExtensions != null)
- {
- String[] filterExtensions = new String[fileExtensions.length];
- for (int i = 0; i < fileExtensions.length; i++)
- {
- String ext = fileExtensions[i];
- filterExtensions[i] = "*." + ext; //$NON-NLS-1$
- }
- dialog.setFilterExtensions(filterExtensions);
- }
- selected = dialog.open();
- }
- if (selected != null)
- {
- resourceText.setText(selected);
- }
- }
-
- protected String[] getFileExtensions()
- {
- return new XMLContentType().getFileExtensions();
- }
-
- protected void handleOpenFilesResourceBrowseButtonSelected()
- {
- String path = openFileListResourceDialog();
- if (path != null)
- setText("${workspace_loc:" + path + "}"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- /**
- * Opens a dialog displaying a list of all XML files in the editor and allows the user to select one of them.
- * @return The path to the selected XML file or null if none was chosen.
- */
- protected String openFileListResourceDialog(){
- IEditorReference[] editors = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditorReferences();
-
- WorkbenchContentProvider w = new WorkbenchContentProvider();
- String[] paths = filterOpenEditorsByFileExtension(editors);
-
- ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), new LabelProvider());
-
- dialog.setTitle(getMessage(OPENFILES_DIALOG_TITLE));
- dialog.setElements(paths);
- dialog.open();
-
- return (String)dialog.getFirstResult();
-
- }
-
- private String[] filterOpenEditorsByFileExtension(IEditorReference[] editors) {
- String [] paths = new String[editors.length];
- String [] fileExts = getFileExtensions();
-
- for(int i =0; i<editors.length; i++){
- IEditorReference currentEditor = editors[i];
- IEditorPart editorPart = currentEditor.getEditor(true);
- IFile file = (IFile) editorPart.getEditorInput().getAdapter(IFile.class);
- if (file != null) {
- IPath path = file.getFullPath();
- paths[i] = getEditorPath(path, fileExts);
- }
- }
- return paths;
- }
-
- private String getEditorPath(IPath filePath, String[] fileExts) {
- if (fileExts == null || fileExts.length == 0) {
- return filePath.toOSString();
- }
-
- String path = null;
- for (int cnt = 0; cnt < fileExts.length; cnt++) {
- if (filePath.getFileExtension().equals(fileExts[cnt])) {
- path = filePath.toOSString();
- break;
- }
- }
- return path;
- }
-
-
- protected void handleWorkspaceResourceBrowseButtonSelected()
- {
- IPath path = openWorkspaceResourceDialog();
- if (path != null)
- setText("${workspace_loc:" + path.toString() + "}"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- protected IPath openWorkspaceResourceDialog()
- {
- IResource currentResource = getResource();
- ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider());
- dialog.setTitle(getMessage(WORKSPACE_DIALOG_TITLE));
- dialog.setMessage(getMessage(WORKSPACE_DIALOG_MESSAGE));
- dialog.setValidator(validator);
- dialog.addFilter(new ViewerFilter()
- {
- @Override
- public boolean select(Viewer viewer, Object parentElement, Object element)
- {
- if (element instanceof IContainer)
- return true;
- if (resourceType != IResource.FILE)
- return false;
- IFile file = (IFile) element;
- String[] extensions = getFileExtensions();
- if (extensions == null)
- return true;
- String fileExt = file.getFileExtension();
- if (fileExt != null)
- {
- for (String ext : extensions)
- {
- if (fileExt.equalsIgnoreCase(ext))
- return true;
- }
- }
- return false;
- }
- });
- ViewerFilter filter = getResourceFilter();
- if (filter != null)
- dialog.addFilter(filter);
- dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
- dialog.setInitialSelection(currentResource);
- dialog.setComparator(new ResourceComparator(ResourceComparator.NAME));
- dialog.setAllowMultiple(false);
-
- if (dialog.open() == Window.OK)
- {
- Object[] elements = dialog.getResult();
- if (elements.length > 0)
- return ((IResource) elements[0]).getFullPath();
- }
- return null;
- }
-
- protected ViewerFilter getResourceFilter()
- {
- return null;
- }
-
- /**
- * Returns the selected workspace container,or <code>null</code>
- */
- protected IResource getResource()
- {
- String path = getText();
- if (path.length() > 0)
- {
- IResource res = null;
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- try
- {
- if (path.startsWith("${workspace_loc:")) //$NON-NLS-1$
- {
- IStringVariableManager manager = VariablesPlugin.getDefault().getStringVariableManager();
- path = manager.performStringSubstitution(path, false);
- }
- File f = new File(path);
- if (resourceType == IResource.FOLDER)
- {
- IContainer[] containers = root.findContainersForLocationURI(f.toURI());
- if (containers.length > 0)
- {
- res = containers[0];
- }
- }
- else if (resourceType == IResource.FILE)
- {
- IFile[] files = root.findFilesForLocationURI(f.toURI());
- if (files.length > 0)
- {
- res = files[0];
- }
- }
- return res;
- }
- catch (CoreException e)
- {
- XSLDebugUIPlugin.log(e);
- }
- }
- return null;
- }
-
- protected void handleResourceVariablesButtonSelected()
- {
- StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell());
- dialog.open();
- String variableText = dialog.getVariableExpression();
- if (variableText != null)
- {
- resourceText.insert(variableText);
- }
- }
-
- @Override
- public boolean isValid(ILaunchConfiguration config)
- {
- setErrorMessage(null);
- setMessage(null);
- // if variables are present, we cannot resolve the directory
- String workingDirPath = getText();
- if (workingDirPath.indexOf("${") >= 0) //$NON-NLS-1$
- {
- IStringVariableManager manager = VariablesPlugin.getDefault().getStringVariableManager();
- try
- {
- manager.validateStringVariables(workingDirPath);
- if (mustExist)
- {
- String path = manager.performStringSubstitution(workingDirPath);
- validateResource(path);
- }
- }
- catch (CoreException e)
- {
- setErrorMessage(e.getMessage());
- return false;
- }
- }
- else if (mustExist && workingDirPath.length() > 0)
- {
- return validateResource(workingDirPath);
- }
- else if (required && workingDirPath.length() == 0)
- {
- setErrorMessage(getMessage(ERROR_DIRECTORY_NOT_SPECIFIED));
- }
- return true;
- }
-
- protected boolean validateResource(String workingDirPath)
- {
- if (resourceType == IResource.FOLDER)
- {
- IContainer container = (IContainer) getResource();
- if (container == null)
- {
- File dir = new File(workingDirPath);
- if (dir.isDirectory())
- {
- return true;
- }
- }
- else
- return true;
- }
- else if (resourceType == IResource.FILE)
- {
- File file = new File(workingDirPath);
- if (file.isFile())
- {
- return true;
- }
- }
- setErrorMessage(getMessage(ERROR_DIRECTORY_DOES_NOT_EXIST));
- return false;
- }
-
- protected abstract String getMessage(int type);
-
- protected void textModified()
- {
- }
-
- protected String getText()
- {
- return resourceText.getText().trim();
- }
-
- protected void setText(String text)
- {
- resourceText.setText(text);
- }
-
- protected void setLaunchConfiguration(ILaunchConfiguration config)
- {
- fLaunchConfiguration = config;
- }
-
- protected ILaunchConfiguration getLaunchConfiguration()
- {
- return fLaunchConfiguration;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/XSLDebugUIConstants.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/XSLDebugUIConstants.java
deleted file mode 100644
index c983bae..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/XSLDebugUIConstants.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui;
-
-/**
- * Constants for the XSL Debug UI.
- *
- * @author Doug Satchwell
- * @since 1.0
- */
-public class XSLDebugUIConstants
-{
- private static final String PREFIX = XSLDebugUIPlugin.PLUGIN_ID + '.';
- /**
- * Constant used to store column setting preferences for the <code>InstalledProcessorsBlock</code>
- */
- public static final String PROCESSOR_DETAILS_DIALOG = PREFIX + "PROCESSOR_DETAILS_DIALOG"; //$NON-NLS-1$
- /**
- * Constant used to store column setting preferences for the <code>ParametersBlock</code>
- */
- public static final String MAIN_PARAMATERS_BLOCK = PREFIX + "MAIN_PARAMATERS_BLOCK"; //$NON-NLS-1$
- /**
- * Constant used to store column setting preferences for the <code>TransformsBlock</code>
- */
- public static final String MAIN_TRANSFORMS_BLOCK = PREFIX + "MAIN_TRANSFORMS_BLOCK"; //$NON-NLS-1$
- /**
- * Constant used to store column setting preferences for the <code>OutputBlock</code>
- */
- public static final String OUTPUT_BLOCK = PREFIX + "OUTPUT_BLOCK"; //$NON-NLS-1$
- /**
- * The id of the XSL editor
- */
- public static final String XSL_EDITOR_ID = "org.eclipse.wst.xsl.ui.XSLEditor"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/XSLDebugUILaunchListener.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/XSLDebugUILaunchListener.java
deleted file mode 100644
index 8cbefaf..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/XSLDebugUILaunchListener.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui;
-
-import java.io.File;
-
-import org.eclipse.core.commands.common.CommandException;
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.IFileStore;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchesListener2;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.handlers.IHandlerService;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.wst.xsl.launching.config.BaseLaunchHelper;
-
-/**
- * A listener to XSL launches. When an XSL launch is terminated, this performs the UI parts of the
- * XSL launching - such as open the editor on the output file, and format it.
- *
- * @author Doug Satchwell
- * @since 1.0
- */
-public class XSLDebugUILaunchListener implements ILaunchesListener2
-{
- public static final String XSL_LAUNCH_CONFIGURATION_TYPE = "org.eclipse.wst.xsl.launching.launchConfigurationType";
-
- /**
- * Starts the launch listening
- */
- public void start()
- {
- DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this);
- }
-
- /**
- * Stops the launch listening
- */
- public void stop()
- {
- DebugPlugin.getDefault().getLaunchManager().removeLaunchListener(this);
- }
-
- public void launchesTerminated(ILaunch[] launches)
- {
- for (ILaunch launch : launches)
- {
- ILaunchConfigurationType configType = null;
- try
- {
- configType = launch.getLaunchConfiguration().getType();
- }
- catch (CoreException e)
- {
- // do nothing
- }
- if (configType != null && XSL_LAUNCH_CONFIGURATION_TYPE.equals(configType.getIdentifier()))
- {
- try
- {
- BaseLaunchHelper launchHelper = new BaseLaunchHelper(launch.getLaunchConfiguration());
- File file = launchHelper.getTarget();
- IFile ifile = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(new Path(file.getAbsolutePath()));
- if (ifile != null)
- {// refresh this workspace file..
- try
- {
- ifile.refreshLocal(IResource.DEPTH_ZERO, new NullProgressMonitor());
- }
- catch (CoreException e)
- {
- XSLDebugUIPlugin.log(e);
- }
- }
- openFileIfRequired(launchHelper);
- }
- catch (CoreException e)
- {
- XSLDebugUIPlugin.log(e);
- }
- }
- }
- }
-
- public void launchesAdded(ILaunch[] launches)
- {
- // do nothing
- }
-
- public void launchesChanged(ILaunch[] launches)
- {
- // do nothing
- }
-
- public void launchesRemoved(ILaunch[] launches)
- {
- // do nothing
- }
-
- private void openFileIfRequired(final BaseLaunchHelper launchHelper)
- {
- if (launchHelper.getOpenFileOnCompletion())
- {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable()
- {
- public void run()
- {
- try
- {
- // Open editor on new file.
- IWorkbenchWindow dw = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- File file = launchHelper.getTarget();
- Path path = new Path(file.getAbsolutePath());
- IFileStore filestore = EFS.getLocalFileSystem().getStore(path);
- IDE.openEditorOnFileStore(dw.getActivePage(), filestore);
-
- if (launchHelper.getFormatFileOnCompletion())
- {
- // format the editor contents
- IHandlerService p = (IHandlerService)PlatformUI.getWorkbench().getService(IHandlerService.class);
- p.executeCommand("org.eclipse.wst.sse.ui.format.document", null);
- }
- }
- catch (PartInitException e)
- {
- XSLDebugUIPlugin.log(e);
- }
- catch (CommandException e)
- {
- XSLDebugUIPlugin.log(e);
- }
- }
- });
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/XSLDebugUIPlugin.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/XSLDebugUIPlugin.java
deleted file mode 100644
index 5cf1503..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/XSLDebugUIPlugin.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.preference.IPreferenceNode;
-import org.eclipse.jface.preference.IPreferencePage;
-import org.eclipse.jface.preference.PreferenceDialog;
-import org.eclipse.jface.preference.PreferenceManager;
-import org.eclipse.jface.preference.PreferenceNode;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The XSL Debug UI plugin.
- *
- * @author Doug Satchwell
- * @since 1.0
- */
-public class XSLDebugUIPlugin extends AbstractUIPlugin
-{
- /**
- * The id of this.
- */
- public static final String PLUGIN_ID = "org.eclipse.wst.xsl.debug.ui"; //$NON-NLS-1$
-
- // The shared instance
- private static XSLDebugUIPlugin plugin;
-
- private XSLDebugUILaunchListener launchListener = new XSLDebugUILaunchListener();
-
- /**
- * Create a new instance of this.
- */
- public XSLDebugUIPlugin()
- {
- plugin = this;
- }
-
- @Override
- public void start(BundleContext context) throws Exception
- {
- super.start(context);
- launchListener.start();
- }
-
- @Override
- public void stop(BundleContext context) throws Exception
- {
- plugin = null;
- launchListener.stop();
- super.stop(context);
- }
-
- /**
- * Get the singleton instance of this.
- *
- * @return the singleton
- */
- public static XSLDebugUIPlugin getDefault()
- {
- return plugin;
- }
-
- /**
- * Get an ImageDescriptor from a path in this bundle.
- *
- * @param path the path to the image
- * @return the ImageDescriptor
- */
- public static ImageDescriptor getImageDescriptor(String path)
- {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
- /**
- * Convenience method for opening a given preference page.
- *
- * @param id the id of the preference page
- * @param page the preference page to show
- */
- public static void showPreferencePage(String id, IPreferencePage page)
- {
- final IPreferenceNode targetNode = new PreferenceNode(id, page);
-
- PreferenceManager manager = new PreferenceManager();
- manager.addToRoot(targetNode);
- final PreferenceDialog dialog = new PreferenceDialog(XSLDebugUIPlugin.getActiveWorkbenchShell(), manager);
- final boolean[] result = new boolean[]
- { false };
- BusyIndicator.showWhile(XSLDebugUIPlugin.getStandardDisplay(), new Runnable()
- {
- public void run()
- {
- dialog.create();
- dialog.setMessage(targetNode.getLabelText());
- result[0] = (dialog.open() == Window.OK);
- }
- });
- }
-
- /**
- * Get the current Display if possible, or else the default Display.
- *
- * @return the current or default Display
- */
- public static Display getStandardDisplay()
- {
- Display display;
- display = Display.getCurrent();
- if (display == null)
- display = Display.getDefault();
- return display;
- }
-
- /**
- * Get the active workbench window from the workbench.
- *
- * @return the active workbench window
- */
- public static IWorkbenchWindow getActiveWorkbenchWindow()
- {
- return getDefault().getWorkbench().getActiveWorkbenchWindow();
- }
-
- /**
- * Get the shell of the active workbench window.
- *
- * @return the active workbench shell
- */
- public static Shell getActiveWorkbenchShell()
- {
- IWorkbenchWindow window = getActiveWorkbenchWindow();
- if (window != null)
- {
- return window.getShell();
- }
- return null;
- }
-
- /**
- * Get the active page of the active workbench window.
- *
- * @return the active page
- */
- public static IWorkbenchPage getActivePage()
- {
- IWorkbenchWindow w = getActiveWorkbenchWindow();
- if (w != null)
- {
- return w.getActivePage();
- }
- return null;
- }
-
- /**
- * Log the given exception by creating a new Status.
- *
- * @param e the exception to log
- */
- public static void log(Exception e)
- {
- getDefault().getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, 0, "", e)); //$NON-NLS-1$
- }
-
- /**
- * Log the given core exception.
- *
- * @param e the exception to log
- */
- public static void log(CoreException e)
- {
- getDefault().getLog().log(e.getStatus());
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/XSLLaunchConfigurationTab.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/XSLLaunchConfigurationTab.java
deleted file mode 100644
index beeabcf..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/XSLLaunchConfigurationTab.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui;
-
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
-import org.eclipse.debug.ui.ILaunchConfigurationDialog;
-import org.eclipse.debug.ui.ILaunchConfigurationTab;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * The base class for XSL launch configuration tabs which allows a number of 'blocks' to be added.
- * Each block must itself fully implement <code>ILaunchConfigurationTab</code>.
- *
- * @author Doug Satchwell
- * @since 1.0
- */
-public abstract class XSLLaunchConfigurationTab extends AbstractLaunchConfigurationTab
-{
- private ILaunchConfigurationTab[] blocks;
-
- protected void setBlocks(ILaunchConfigurationTab[] blocks)
- {
- this.blocks = blocks;
- }
-
- public void createControl(Composite parent)
- {
- Composite comp = new Composite(parent, SWT.NONE);
- comp.setFont(parent.getFont());
- // TODO PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(),
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- comp.setLayout(layout);
- setControl(comp);
- }
-
- public void setDefaults(ILaunchConfigurationWorkingCopy configuration)
- {
- for (ILaunchConfigurationTab element : blocks)
- element.setDefaults(configuration);
- }
-
- public void initializeFrom(ILaunchConfiguration configuration)
- {
- for (ILaunchConfigurationTab element : blocks)
- element.initializeFrom(configuration);
- }
-
- public void performApply(ILaunchConfigurationWorkingCopy configuration)
- {
- for (ILaunchConfigurationTab element : blocks)
- element.performApply(configuration);
- }
-
- @Override
- public void setLaunchConfigurationDialog(ILaunchConfigurationDialog dialog)
- {
- super.setLaunchConfigurationDialog(dialog);
- for (ILaunchConfigurationTab element : blocks)
- element.setLaunchConfigurationDialog(dialog);
- }
-
- @Override
- public void dispose()
- {
- for (ILaunchConfigurationTab element : blocks)
- element.dispose();
- }
-
- @Override
- public void activated(ILaunchConfigurationWorkingCopy workingCopy)
- {
- // don't call initializeFrom
- // super.activated(workingCopy);
- for (ILaunchConfigurationTab element : blocks)
- element.activated(workingCopy);
- }
-
-// @Override
-// protected boolean isDirty()
-// {
-// for (ILaunchConfigurationTab element : blocks)
-// if (((XSLLaunchConfigurationTab)element).isDirty())
-// return true;
-// return super.isDirty();
-// }
-
- @Override
- public boolean isValid(ILaunchConfiguration configuration)
- {
- boolean valid = true;
- for (ILaunchConfigurationTab element : blocks)
- valid &= element.isValid(configuration);
- return valid;
- }
-
- @Override
- public String getErrorMessage()
- {
- String m = super.getErrorMessage();
- if (m == null)
- {
- for (ILaunchConfigurationTab element : blocks)
- {
- m = element.getErrorMessage();
- if (m != null)
- break;
- }
- }
- return m;
- }
-
- @Override
- public String getMessage()
- {
- String m = super.getMessage();
- if (m == null)
- {
- for (ILaunchConfigurationTab element : blocks)
- {
- m = element.getMessage();
- if (m != null)
- break;
- }
- }
- return m;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/XSLLaunchShortcut.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/XSLLaunchShortcut.java
deleted file mode 100644
index b392c34..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/XSLLaunchShortcut.java
+++ /dev/null
@@ -1,332 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.variables.VariablesPlugin;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.IDebugModelPresentation;
-import org.eclipse.debug.ui.ILaunchShortcut;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.StatusDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.dialogs.ElementListSelectionDialog;
-import org.eclipse.wst.xsl.core.XSLCore;
-import org.eclipse.wst.xsl.internal.debug.ui.tabs.main.InputFileBlock;
-import org.eclipse.wst.xsl.launching.XSLLaunchConfigurationConstants;
-import org.eclipse.wst.xsl.launching.config.BaseLaunchHelper;
-import org.eclipse.wst.xsl.launching.config.LaunchPipeline;
-import org.eclipse.wst.xsl.launching.config.LaunchTransform;
-
-/**
- * <table border=1>
- * <th>
- * <tr>
- * <td>XML Files</td>
- * <td>XSL Files</td>
- * <td>Action</td>
- * </tr>
- * </th>
- * <tbody>
- * <tr>
- * <td>1</td>
- * <td>0</td>
- * <td>Launch assuming embedded stylesheet instruction</td>
- * </tr>
- * <tr>
- * <td>0</td>
- * <td>&gt;=1</td>
- * <td>Open dialog - prompt for input file</td>
- * </tr>
- * <tr>
- * <td>1</td>
- * <td>&gt;=1</td>
- * <td>Launch</td>
- * </tr>
- * </tbody>
- * </table>
- *
- * <p>The launch shortcut should not appear in the menu for any other combination of files</p>
- * <p>In all cases, a check must be performed to find any existing launch configuration that uses the selected files.</p>
- *
- * @author Doug
- * @since 1.0
- */
-public class XSLLaunchShortcut implements ILaunchShortcut
-{
- private IFile xmlFile;
- private IPath xmlFilePath;
- private IFile[] xslFiles;
-
- public void launch(ISelection selection, String mode)
- {
- if (selection instanceof IStructuredSelection)
- {
- IStructuredSelection ssel = (IStructuredSelection)selection;
- searchAndLaunch(ssel.toArray(),mode);
- }
- }
-
- public void launch(IEditorPart editor, String mode)
- {
- IEditorInput input = editor.getEditorInput();
- if (input != null)
- {
- IFile file = (IFile) input.getAdapter(IFile.class);
- if (file != null)
- searchAndLaunch(new Object[]{ file }, mode);
- }
- }
-
- private void searchAndLaunch(Object[] objects, String mode)
- {
- if (fillFiles(objects))
- {
- // ensure we have an input file
- if (xmlFile == null)
- promptForInput();
- if (xmlFile != null || xmlFilePath != null)
- launch(mode);
- }
- }
-
- private void promptForInput()
- {
- // prompt for input xml file
- StatusDialog dialog = new StatusDialog(getShell()){
- private InputFileBlock inputFileBlock = new InputFileBlock(null);
-
- @Override
- protected Control createDialogArea(Composite parent)
- {
- Composite comp = (Composite)super.createDialogArea(parent);
- comp.setFont(parent.getFont());
- GridLayout layout = new GridLayout(1, false);
- comp.setLayout(layout);
-
- Label label = new Label(comp,SWT.NONE);
- label.setFont(comp.getFont());
- GridData gd = new GridData();
- gd.horizontalIndent = 5;
- gd.verticalIndent = 5;
- gd.widthHint = 380;
- label.setLayoutData(gd);
- label.setText(Messages.XSLLaunchShortcut_0);
-
- inputFileBlock.createControl(comp);
- return comp;
- }
-
- @Override
- protected void okPressed()
- {
- IResource res = inputFileBlock.getResource();
- if (res == null)
- xmlFilePath = new Path(inputFileBlock.getText());
- else if (ResourcesPlugin.getWorkspace().getRoot().exists(res.getFullPath()) && res.getType() == IResource.FILE)
- xmlFile = (IFile)res;
- super.okPressed();
- }
-
- };
- dialog.setHelpAvailable(false);
- dialog.setStatusLineAboveButtons(true);
- dialog.setTitle(Messages.XSLLaunchShortcut_1);
- dialog.open();
- }
-
- private boolean fillFiles(Object[] selections)
- {
- xmlFile = null;
- xmlFilePath = null;
- List<IFile> xslFileList = new ArrayList<IFile>();
- for (Object object : selections)
- {
- IResource resource = (IResource)object;
- if (resource.getType() == IResource.FILE)
- {
- IFile file = (IFile)resource;
- if (XSLCore.isXMLFile(file))
- {
- if (XSLCore.isXSLFile(file))
- xslFileList.add(file);
- else if (xmlFile==null)
- xmlFile = file;
- else
- return false; // no action if we have more than than 1 xml file
- }
- }
- }
- xslFiles = xslFileList.toArray(new IFile[0]);
- return true;
- }
-
- private void launch(String mode)
- {
- if (xmlFile!=null)
- xmlFilePath = xmlFile.getLocation();
- ILaunchConfiguration config = null;
- try
- {
- config = findOrCreateLaunchConfiguration();
- if (config!=null)
- DebugUITools.launch(config, mode);
- }
- catch (CoreException e)
- {
- XSLDebugUIPlugin.log(e);
- }
- }
-
- protected ILaunchManager getLaunchManager()
- {
- return DebugPlugin.getDefault().getLaunchManager();
- }
-
- protected ILaunchConfigurationType getConfigurationType()
- {
- return getLaunchManager().getLaunchConfigurationType(XSLLaunchConfigurationConstants.ID_LAUNCH_CONFIG_TYPE);
- }
-
- private ILaunchConfiguration findOrCreateLaunchConfiguration() throws CoreException
- {
- ILaunchConfiguration[] configs = getLaunchManager().getLaunchConfigurations(getConfigurationType());
- List<ILaunchConfiguration> candidateConfigs = new ArrayList<ILaunchConfiguration>(configs.length);
- for (ILaunchConfiguration config : configs)
- {
- String inputFile = config.getAttribute(XSLLaunchConfigurationConstants.ATTR_INPUT_FILE, (String) null);
- try
- {
- inputFile = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(inputFile);
- }
- catch (CoreException e)
- {
- // just ignore this one
- continue;
- }
- Path path = new Path(inputFile);
- // the source xml file must be the same
- if (path.equals(xmlFilePath))
- {
- BaseLaunchHelper lh = new BaseLaunchHelper(config);
- // all the selected stylesheets must be in the pipeline
- boolean found = false;
- for (IFile stylesheet : xslFiles)
- {
- found = false;
- for (Iterator<LaunchTransform> iter = lh.getPipeline().getTransformDefs().iterator(); iter.hasNext();)
- {
- LaunchTransform lt = iter.next();
- if (lt.getLocation().equals(stylesheet.getLocation()))
- {
- found = true;
- break;
- }
- }
- if (!found)
- break;
- }
- if (found)
- candidateConfigs.add(config);
- }
- }
-
- ILaunchConfiguration config = null;
- int candidateCount = candidateConfigs.size();
- if (candidateCount == 1)
- config = candidateConfigs.get(0);
- else if (candidateCount > 1)
- config = chooseConfiguration(candidateConfigs);
- else
- config = createConfiguration();
-
- return config;
- }
-
- private ILaunchConfiguration chooseConfiguration(List<ILaunchConfiguration> configList)
- {
- IDebugModelPresentation labelProvider = DebugUITools.newDebugModelPresentation();
- ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), labelProvider);
- dialog.setElements(configList.toArray());
- dialog.setTitle(Messages.XSLLaunchShortcut_2);
- dialog.setMessage(Messages.XSLSelectExisting);
- dialog.setMultipleSelection(false);
- int result = dialog.open();
- labelProvider.dispose();
- if (result == Window.OK)
- {
- return (ILaunchConfiguration) dialog.getFirstResult();
- }
- return null;
- }
-
- private ILaunchConfiguration createConfiguration()
- {
- ILaunchConfiguration config = null;
- try
- {
- ILaunchConfigurationType configType = getConfigurationType();
- ILaunchConfigurationWorkingCopy wc = configType.newInstance(null, getLaunchManager().generateUniqueLaunchConfigurationNameFrom(xmlFilePath.lastSegment()));
- if (xmlFile != null)
- wc.setAttribute(XSLLaunchConfigurationConstants.ATTR_INPUT_FILE, "${workspace_loc:" + xmlFile.getFullPath().toPortableString()+"}"); //$NON-NLS-1$ //$NON-NLS-2$
- else
- wc.setAttribute(XSLLaunchConfigurationConstants.ATTR_INPUT_FILE, xmlFilePath.toPortableString());
-
- wc.setAttribute(XSLLaunchConfigurationConstants.ATTR_USE_DEFAULT_OUTPUT_FILE, true);
- wc.setAttribute(XSLLaunchConfigurationConstants.ATTR_OPEN_FILE, true);
-
- LaunchPipeline pipeline = new LaunchPipeline();
- for (IFile element : xslFiles)
- {
- pipeline.addTransformDef(new LaunchTransform(element.getFullPath().toPortableString(), LaunchTransform.RESOURCE_TYPE));
- }
- wc.setAttribute(XSLLaunchConfigurationConstants.ATTR_PIPELINE, pipeline.toXML());
- if (xmlFile!=null)
- wc.setMappedResources(new IResource[]{ xmlFile.getProject() });
- config = wc.doSave();
- }
- catch (CoreException exception)
- {
- MessageDialog.openError(getShell(), Messages.XSLLaunchShortcut_6, exception.getStatus().getMessage());
- }
- return config;
- }
-
- protected Shell getShell()
- {
- return XSLDebugUIPlugin.getActiveWorkbenchShell();
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/XSLTTabGroup.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/XSLTTabGroup.java
deleted file mode 100644
index 42ba093..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/XSLTTabGroup.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui;
-
-import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
-import org.eclipse.debug.ui.CommonTab;
-import org.eclipse.debug.ui.ILaunchConfigurationDialog;
-import org.eclipse.debug.ui.ILaunchConfigurationTab;
-import org.eclipse.debug.ui.sourcelookup.SourceLookupTab;
-import org.eclipse.wst.xsl.internal.debug.ui.tabs.main.XSLMainTab;
-import org.eclipse.wst.xsl.internal.debug.ui.tabs.output.OutputTab;
-
-/**
- *The tab group for the XSL tabs.
- *
- * @author Doug Satchwell
- * @since 1.0
- */
-public class XSLTTabGroup extends AbstractLaunchConfigurationTabGroup
-{
- /**
- * Create a new instance of this.
- */
- public XSLTTabGroup()
- {
- }
-
- public void createTabs(ILaunchConfigurationDialog dialog, String mode)
- {
- XSLMainTab main = new XSLMainTab();
- ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] { main, new OutputTab(main) };
- tabs = addTabs(tabs, new ILaunchConfigurationTab[] { new SourceLookupTab(), new CommonTab() });
-
- setTabs(tabs);
- }
-
- private ILaunchConfigurationTab[] addTabs(ILaunchConfigurationTab[] tabs1, ILaunchConfigurationTab[] tabs2)
- {
- ILaunchConfigurationTab[] newTabs = new ILaunchConfigurationTab[tabs1.length + tabs2.length];
- System.arraycopy(tabs1, 0, newTabs, 0, tabs1.length);
- System.arraycopy(tabs2, 0, newTabs, tabs1.length, tabs2.length);
- return newTabs;
- }
-
- @Override
- public void setTabs(ILaunchConfigurationTab[] tabs)
- {
- // TODO Auto-generated method stub
- super.setTabs(tabs);
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/AbstractParameterAction.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/AbstractParameterAction.java
deleted file mode 100644
index dab1427..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/AbstractParameterAction.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui.actions;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.actions.SelectionListenerAction;
-import org.eclipse.wst.xsl.internal.debug.ui.tabs.main.ParameterViewer;
-
-/**
- * A convenient base class for add/remove parameter actions.
- *
- * @author Doug Satchwell
- */
-public abstract class AbstractParameterAction extends SelectionListenerAction
-{
- private ParameterViewer viewer;
- private Button button;
- private Shell shell;
-
- protected AbstractParameterAction(String text, ParameterViewer viewer)
- {
- super(text);
- setViewer(viewer);
- }
-
- /**
- * Set the viewer.
- *
- * @param viewer the parametere viewer
- */
- public void setViewer(ParameterViewer viewer)
- {
- if (this.viewer != null)
- {
- this.viewer.getViewer().removeSelectionChangedListener(this);
- }
- this.viewer = viewer;
- if (viewer != null)
- {
- viewer.getViewer().addSelectionChangedListener(this);
- update();
- }
- }
-
- protected ParameterViewer getViewer()
- {
- return viewer;
- }
-
- /**
- * Set the button associated with the action.
- *
- * @param button the button
- */
- public void setButton(Button button)
- {
- this.button = button;
- button.addSelectionListener(new SelectionAdapter()
- {
- @Override
- public void widgetSelected(SelectionEvent evt)
- {
- run();
- }
- });
- button.setEnabled(isEnabled());
- }
-
- @Override
- public void setEnabled(boolean enabled)
- {
- super.setEnabled(enabled);
- if (button != null)
- {
- button.setEnabled(enabled);
- }
- }
-
- protected void update()
- {
- selectionChanged((IStructuredSelection) getViewer().getViewer().getSelection());
- }
-
- protected Shell getShell()
- {
- if (shell == null)
- {
- shell = getViewer().getShell();
- }
- return shell;
- }
-
- /**
- * Set the shell that will be used for opening a dialog.
- *
- * @param shell the shell to use
- */
- public void setShell(Shell shell)
- {
- this.shell = shell;
- }
-
- @Override
- protected boolean updateSelection(IStructuredSelection selection)
- {
- return getViewer().updateSelection(getActionType(), selection);
- }
-
- protected int getActionType()
- {
- return AbstractStylesheetAction.DEFAULT;
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/AbstractStylesheetAction.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/AbstractStylesheetAction.java
deleted file mode 100644
index 39ac666..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/AbstractStylesheetAction.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui.actions;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.actions.SelectionListenerAction;
-import org.eclipse.wst.xsl.internal.debug.ui.tabs.main.StylesheetViewer;
-import org.eclipse.wst.xsl.launching.config.LaunchPipeline;
-import org.eclipse.wst.xsl.launching.config.LaunchTransform;
-
-/**
- * A convenient base class for actions associated with the stylesheet viewer.
- *
- * @author Doug Satchwell
- */
-public abstract class AbstractStylesheetAction extends SelectionListenerAction
-{
- /**
- * The default action type.
- */
- public static final int DEFAULT = 0;
- /**
- * The action type for add actions.
- */
- public static final int ADD = 1;
- /**
- * The action type for remove actions.
- */
- public static final int REMOVE = 2;
- /**
- * The action type for move actions.
- */
- public static final int MOVE = 3;
-
- private StylesheetViewer viewer;
- private Button button;
- private Shell shell;
-
- protected AbstractStylesheetAction(String text, StylesheetViewer viewer)
- {
- super(text);
- setViewer(viewer);
- }
-
- /**
- * Add an array of LaunchTransform's to the viewer.
- *
- * @param res launch transforms to add
- */
- public void addTransforms(LaunchTransform[] res)
- {
- viewer.addTransforms(res);
- }
-
- /**
- * Set the viewer associated with this action.
- *
- * @param viewer the viewer
- */
- public void setViewer(StylesheetViewer viewer)
- {
- if (this.viewer != null)
- {
- this.viewer.getViewer().removeSelectionChangedListener(this);
- }
- this.viewer = viewer;
- if (viewer != null)
- {
- viewer.getViewer().addSelectionChangedListener(this);
- update();
- }
- }
-
- protected StylesheetViewer getViewer()
- {
- return viewer;
- }
-
- /**
- * Set the button associated with this action.
- *
- * @param button the button
- */
- public void setButton(Button button)
- {
- this.button = button;
- button.addSelectionListener(new SelectionAdapter()
- {
- @Override
- public void widgetSelected(SelectionEvent evt)
- {
- run();
- }
- });
- button.setEnabled(isEnabled());
- }
-
- @Override
- public void setEnabled(boolean enabled)
- {
- super.setEnabled(enabled);
- if (button != null)
- {
- button.setEnabled(enabled);
- }
- }
-
- protected void update()
- {
- selectionChanged((IStructuredSelection) getViewer().getViewer().getSelection());
- }
-
- protected Shell getShell()
- {
- if (shell == null)
- {
- shell = getViewer().getShell();
- }
- return shell;
- }
-
- /**
- * Set the shell to be used for opening a dialog.
- *
- * @param shell the shell to use
- */
- public void setShell(Shell shell)
- {
- this.shell = shell;
- }
-
- @Override
- protected boolean updateSelection(IStructuredSelection selection)
- {
- return getViewer().updateSelection(getActionType(), selection);
- }
-
- protected int getActionType()
- {
- return DEFAULT;
- }
-
- protected List<?> getOrderedSelection()
- {
- List<?> selection = ((IStructuredSelection) getViewer().getViewer().getSelection()).toList();
- return selection;
- }
-
- protected List<LaunchTransform> getEntriesAsList()
- {
- // IStylesheetEntry[] entries = getViewer().getEntries();
- // List list = new ArrayList(entries.length);
- // for (int i = 0; i < entries.length; i++) {
- // list.add(entries[i]);
- // }
- LaunchPipeline lp = (LaunchPipeline) getViewer().getViewer().getInput();
- return lp.getTransformDefs();
- }
-
- protected void setEntries(List<?> list)
- {
- getViewer().setEntries(list.toArray(new LaunchTransform[list.size()]));
- // // update all selection listeners
- // getViewer().setSelection(getViewer().getSelection());
- }
-
- protected boolean isIndexSelected(IStructuredSelection selection, int index)
- {
- if (selection.isEmpty())
- {
- return false;
- }
- Iterator<?> entries = selection.iterator();
- List<?> list = getEntriesAsList();
- while (entries.hasNext())
- {
- Object next = entries.next();
- if (list.indexOf(next) == index)
- {
- return true;
- }
- }
- return false;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/AddExternalFileAction.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/AddExternalFileAction.java
deleted file mode 100644
index c1b3423..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/AddExternalFileAction.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- * David Carver (STAR) - bug 245772 - NLS Message refactoring
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui.actions;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.core.runtime.content.IContentTypeManager;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.wst.xsl.internal.debug.ui.Messages;
-import org.eclipse.wst.xsl.internal.debug.ui.tabs.main.StylesheetViewer;
-import org.eclipse.wst.xsl.launching.config.LaunchTransform;
-import org.eclipse.wst.xsl.core.XSLCore;
-
-
-/**
- * An action that opens a dialog to allow the user to select a file from the file system.
- *
- * @author Doug Satchwell
- */
-public class AddExternalFileAction extends OpenDialogAction
-{
- /**
- * Create a new instance of this.
- *
- * @param viewer the stylesheet viewer
- * @param dialogSettingsPrefix a prefix to use for saving dialog preferences
- */
- public AddExternalFileAction(StylesheetViewer viewer, String dialogSettingsPrefix)
- {
- super(Messages.AddExternalFileAction_Text, viewer, dialogSettingsPrefix);
- }
-
- @Override
- public void run()
- {
- String lastUsedPath = getDialogSetting(LAST_PATH_SETTING);
- if (lastUsedPath == null)
- {
- lastUsedPath = ""; //$NON-NLS-1$
- }
- FileDialog dialog = new FileDialog(getShell(), SWT.MULTI);
- dialog.setText(Messages.AddExternalFileAction_Selection_3);
- dialog.setFilterPath(lastUsedPath);
- IContentTypeManager contentTypeManager = Platform.getContentTypeManager();
- IContentType contentType = contentTypeManager.getContentType(XSLCore.XSL_CONTENT_TYPE);
- String[] xslContentTypes = contentType.getFileSpecs(IContentType.FILE_EXTENSION_SPEC);
-
- // add *. to front
- for (int i = 0; i < xslContentTypes.length; i++)
- {
- String string = xslContentTypes[i];
- xslContentTypes[i] = "*."+string;
- }
-
- dialog.setFilterExtensions(xslContentTypes);
- String res = dialog.open();
- if (res == null)
- {
- return;
- }
-
- IPath filterPath = new Path(dialog.getFilterPath());
- LaunchTransform[] lts = new LaunchTransform[1];
- IPath path = new Path(res).makeAbsolute();
- lts[0] = new LaunchTransform(path.toPortableString(), LaunchTransform.EXTERNAL_TYPE);
-
- setDialogSetting(LAST_PATH_SETTING, filterPath.toOSString());
-
- addTransforms(lts);
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/AddParameterAction.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/AddParameterAction.java
deleted file mode 100644
index 1440b10..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/AddParameterAction.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- * David Carver (STAR) - bug 245772 - NLS Message refactoring
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui.actions;
-
-import org.eclipse.jface.window.Window;
-import org.eclipse.wst.xsl.internal.debug.ui.Messages;
-import org.eclipse.wst.xsl.internal.debug.ui.tabs.main.ParameterViewer;
-import org.eclipse.wst.xsl.launching.config.LaunchAttribute;
-
-/**
- * An action that opens a dialog to allow the user to add a parameter to a transform.
- *
- * @author Doug Satchwell
- */
-public class AddParameterAction extends AbstractParameterAction
-{
- /**
- * Create a new instance of this.
- *
- * @param viewer teh viewer
- */
- public AddParameterAction(ParameterViewer viewer)
- {
- super(Messages.AddParameterAction, viewer);
- }
-
- @Override
- public void run()
- {
- MultipleInputDialog dialog = new MultipleInputDialog(getShell(), Messages.AddParameterAction_Dialog);
- String namelabel = Messages.AddParameterAction_Dialog_Name;
- dialog.addTextField(namelabel, null, false);
- String variableslabel = Messages.AddParameterAction_Dialog_Value;
- dialog.addVariablesField(variableslabel, null, false);
- dialog.open();
-
- if (dialog.getReturnCode() == Window.OK)
- {
- String name = dialog.getStringValue(namelabel);
- String value = dialog.getStringValue(variableslabel);
- LaunchAttribute parameter = null;
- if (value != null && value.indexOf("${") > -1) //$NON-NLS-1$
- parameter = new LaunchAttribute(name, null, value);
- else
- parameter = new LaunchAttribute(name, null, value);
- getViewer().addParameter(parameter);
- }
- }
-
- @Override
- public void setEnabled(boolean enabled)
- {
- // do nothing
- }
-
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/AddWorkspaceFileAction.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/AddWorkspaceFileAction.java
deleted file mode 100644
index cc0e483..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/AddWorkspaceFileAction.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- * David Carver - bug 245772 - NLS Message refactoring
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui.actions;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.jface.window.Window;
-import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
-import org.eclipse.ui.dialogs.ISelectionStatusValidator;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.ui.views.navigator.ResourceComparator;
-import org.eclipse.wst.xsl.core.XSLCore;
-import org.eclipse.wst.xsl.internal.debug.ui.Messages;
-import org.eclipse.wst.xsl.internal.debug.ui.XSLDebugUIPlugin;
-import org.eclipse.wst.xsl.internal.debug.ui.tabs.main.StylesheetViewer;
-import org.eclipse.wst.xsl.launching.config.LaunchTransform;
-
-/**
- * An action that opens a dialog to allow the user to select a file in the workspace.
- *
- * @author Doug Satchwell
- */
-public class AddWorkspaceFileAction extends AbstractStylesheetAction
-{
- private final ISelectionStatusValidator validator = new ISelectionStatusValidator()
- {
- public IStatus validate(Object[] selection)
- {
- if (selection.length == 0)
- {
- return new Status(IStatus.ERROR, XSLDebugUIPlugin.PLUGIN_ID, 0, "", null); //$NON-NLS-1$
- }
- for (int i = 0; i < selection.length; i++)
- {
- if (!(selection[i] instanceof IFile))
- {
- return new Status(IStatus.ERROR, XSLDebugUIPlugin.PLUGIN_ID, 0, "", null); //$NON-NLS-1$
- }
- }
- return new Status(IStatus.OK, XSLDebugUIPlugin.PLUGIN_ID, 0, "", null); //$NON-NLS-1$
- }
- };
-
- /**
- * Create a new instance of this.
- *
- * @param viewer the viewer
- */
- public AddWorkspaceFileAction(StylesheetViewer viewer)
- {
- super(Messages.AddWorkspaceFileAction_Text, viewer);
- }
-
- @Override
- public void run()
- {
-
- // ViewerFilter filter= new StylesheetFilter(getSelectedJars());
-
- ILabelProvider lp = new WorkbenchLabelProvider();
- ITreeContentProvider cp = new WorkbenchContentProvider();
-
- ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(), lp, cp);
- dialog.setValidator(validator);
- dialog.setTitle(Messages.AddWorkspaceFileAction_DialogTitle);
- dialog.setMessage(Messages.AddWorkspaceFileAction_DialogMessage);
- dialog.addFilter(new ViewerFilter()
- {
- @Override
- public boolean select(Viewer viewer, Object parentElement, Object element)
- {
- if (!(element instanceof IResource))
- return false;
- IResource resource = (IResource)element;
- if (resource.getType() == IResource.FILE)
- {
- if (!XSLCore.isXSLFile((IFile)resource))
- return false;
- }
- return true;
- }
- });
- dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
- dialog.setComparator(new ResourceComparator(ResourceComparator.NAME));
-
- if (dialog.open() == Window.OK)
- {
- Object[] elements = dialog.getResult();
- LaunchTransform[] res = new LaunchTransform[elements.length];
- for (int i = 0; i < res.length; i++)
- {
- IResource elem = (IResource) elements[i];
- res[i] = new LaunchTransform(elem.getFullPath().toPortableString(), LaunchTransform.RESOURCE_TYPE);
- }
- addTransforms(res);
- }
- }
-
- @Override
- protected int getActionType()
- {
- return ADD;
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/ControlAccessibleListener.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/ControlAccessibleListener.java
deleted file mode 100644
index 71caaf6..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/ControlAccessibleListener.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui.actions;
-
-import org.eclipse.swt.accessibility.AccessibleAdapter;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * Used to help with accessibility.
- *
- * @author Doug Satchwell
- */
-public class ControlAccessibleListener extends AccessibleAdapter
-{
- private final String controlName;
-
- private ControlAccessibleListener(String name)
- {
- controlName = name;
- }
-
- @Override
- public void getName(AccessibleEvent e)
- {
- e.result = controlName;
- }
-
- /**
- * Helper for adding an instance of this to the given control.
- *
- * @param comp the control to add this to
- * @param name the name for this
- */
- public static void addListener(Control comp, String name)
- {
- // strip mnemonic
- String[] strs = name.split("&"); //$NON-NLS-1$
- StringBuffer stripped = new StringBuffer();
- for (String element : strs)
- {
- stripped.append(element);
- }
- comp.getAccessible().addAccessibleListener(new ControlAccessibleListener(stripped.toString()));
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/MoveDownAction.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/MoveDownAction.java
deleted file mode 100644
index 683636e..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/MoveDownAction.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui.actions;
-
-import java.util.List;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.wst.xsl.internal.debug.ui.Messages;
-import org.eclipse.wst.xsl.internal.debug.ui.tabs.main.StylesheetViewer;
-import org.eclipse.wst.xsl.launching.config.LaunchTransform;
-
-/**
- * The action for moving a stylesheet further down in the transformation pipeline.
- *
- * @author Doug Satchwell
- */
-public class MoveDownAction extends AbstractStylesheetAction
-{
- /**
- * Create a new instance of this.
- *
- * @param viewer
- */
- public MoveDownAction(StylesheetViewer viewer)
- {
- super(Messages.MoveDownAction_Text, viewer);
- }
-
- @Override
- public void run()
- {
- List<?> targets = getOrderedSelection();
- if (targets.isEmpty())
- {
- return;
- }
- List<LaunchTransform> list = getEntriesAsList();
- int bottom = list.size() - 1;
- int index = 0;
- for (int i = targets.size() - 1; i >= 0; i--)
- {
- Object target = targets.get(i);
- index = list.indexOf(target);
- if (index < bottom)
- {
- bottom = index + 1;
- Object temp = list.get(bottom);
- list.set(bottom, (LaunchTransform)target);
- list.set(index, (LaunchTransform)temp);
- }
- bottom = index;
- }
- setEntries(list);
- }
-
- @Override
- protected boolean updateSelection(IStructuredSelection selection)
- {
- if (selection.isEmpty())
- {
- return false;
- }
- return getViewer().updateSelection(getActionType(), selection) && !isIndexSelected(selection, getEntriesAsList().size() - 1);
- }
-
- @Override
- protected int getActionType()
- {
- return MOVE;
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/MoveUpAction.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/MoveUpAction.java
deleted file mode 100644
index 9646d52..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/MoveUpAction.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- * David Carver (STAR) - bug 245772 - NLS Message refactoring
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui.actions;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.wst.xsl.internal.debug.ui.Messages;
-import org.eclipse.wst.xsl.internal.debug.ui.tabs.main.StylesheetViewer;
-import org.eclipse.wst.xsl.launching.config.LaunchTransform;
-
-/**
- * The action for moving a stylesheet further up in the transformation pipeline.
- *
- * @author Doug Satchwell
- */
-public class MoveUpAction extends AbstractStylesheetAction
-{
- /**
- * Create a new instance of this.
- *
- * @param viewer
- */
- public MoveUpAction(StylesheetViewer viewer)
- {
- super(Messages.MoveUpAction_Text, viewer);
- }
-
- @Override
- public void run()
- {
- List<?> targets = getOrderedSelection();
- if (targets.isEmpty())
- {
- return;
- }
- int top = 0;
- int index = 0;
- List<LaunchTransform> list = getEntriesAsList();
- Iterator<?> entries = targets.iterator();
- while (entries.hasNext())
- {
- Object target = entries.next();
- index = list.indexOf(target);
- if (index > top)
- {
- top = index - 1;
- Object temp = list.get(top);
- list.set(top, (LaunchTransform)target);
- list.set(index, (LaunchTransform)temp);
- }
- top = index;
- }
- setEntries(list);
- }
-
- @Override
- protected boolean updateSelection(IStructuredSelection selection)
- {
- if (selection.isEmpty())
- {
- return false;
- }
- return getViewer().updateSelection(getActionType(), selection) && !isIndexSelected(selection, 0);
- }
-
- @Override
- protected int getActionType()
- {
- return MOVE;
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/MultipleInputDialog.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/MultipleInputDialog.java
deleted file mode 100644
index 692b1b3..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/MultipleInputDialog.java
+++ /dev/null
@@ -1,435 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- * David Carver (STAR) - bug 245772 - NLS Message refactor
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui.actions;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.debug.ui.StringVariableSelectionDialog;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Scrollable;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.wst.xsl.internal.debug.ui.Messages;
-import org.eclipse.wst.xsl.internal.debug.ui.XSLDebugUIPlugin;
-
-/**
- * A dialog with handy methods for adding simple controls to itself.
- *
- * @author Doug Satchwell
- */
-public class MultipleInputDialog extends Dialog
-{
- protected static final String FIELD_NAME = "FIELD_NAME"; //$NON-NLS-1$
- protected static final int TEXT = 100;
- protected static final int BROWSE = 101;
- protected static final int VARIABLE = 102;
- protected static final int COMBO = 103;
-
- protected Composite panel;
-
- protected List<FieldSummary> fieldList = new ArrayList<FieldSummary>();
- protected List<Scrollable> controlList = new ArrayList<Scrollable>();
- protected List<Validator> validators = new ArrayList<Validator>();
- @SuppressWarnings("unchecked")
- protected Map<Object, Comparable> valueMap = new HashMap<Object, Comparable>();
-
- private final String title;
-
- /**
- * Create a new instance of this.
- *
- * @param shell the shell to open the dialog on
- * @param title the title for the dialog
- */
- public MultipleInputDialog(final Shell shell, final String title)
- {
- super(shell);
- this.title = title;
- setShellStyle(getShellStyle() | SWT.RESIZE);
- }
-
- @Override
- protected void configureShell(Shell shell)
- {
- super.configureShell(shell);
- if (title != null)
- {
- shell.setText(title);
- }
-
- }
-
- @Override
- protected Control createButtonBar(Composite parent)
- {
- Control bar = super.createButtonBar(parent);
- validateFields();
- return bar;
- }
-
- @Override
- protected Control createDialogArea(Composite parent)
- {
- Composite container = (Composite) super.createDialogArea(parent);
- // ((GridData) parent.getLayoutData()).heightHint = 400;
- // ((GridData) parent.getLayoutData()).widthHint = 400;
-
- container.setLayout(new GridLayout(2, false));
-
- GridData gd = new GridData(GridData.FILL_BOTH);
- // gd.heightHint = 200;
- container.setLayoutData(gd);
-
- panel = new Composite(container, SWT.NONE);
- GridLayout layout = new GridLayout(2, false);
- panel.setLayout(layout);
- panel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- for (Iterator<FieldSummary> i = fieldList.iterator(); i.hasNext();)
- {
- FieldSummary field = i.next();
- switch (field.type)
- {
- case TEXT:
- createTextField(field.name, field.initialValue, field.allowsEmpty);
- break;
- // case BROWSE:
- // createBrowseField(field.name, field.initialValue,
- // field.allowsEmpty);
- // break;
- case VARIABLE:
- createVariablesField(field.name, field.initialValue, field.allowsEmpty);
- break;
- case COMBO:
- createComboField(field.name, field.initialIndex, field.items);
- break;
- }
- }
-
- fieldList = null; // allow it to be gc'd
- Dialog.applyDialogFont(container);
-
- return container;
- }
-
- /**
- * Add a label, text box and button for browsing the for a file.
- *
- * @param labelText the label
- * @param initialValue the initial value
- * @param allowsEmpty true if the text box can be empty
- */
- public void addBrowseField(String labelText, String initialValue, boolean allowsEmpty)
- {
- fieldList.add(new FieldSummary(BROWSE, labelText, initialValue, allowsEmpty));
- }
-
- /**
- * Add a label and a text box.
- *
- * @param labelText the label
- * @param initialValue the initial value
- * @param allowsEmpty true if the text box can be empty
- */
- public void addTextField(String labelText, String initialValue, boolean allowsEmpty)
- {
- fieldList.add(new FieldSummary(TEXT, labelText, initialValue, allowsEmpty));
- }
-
- /**
- * Add a label, a text box and a button for selecting variables.
- *
- * @param labelText the label
- * @param initialValue the initial value
- * @param allowsEmpty true if the text box can be empty
- */
- public void addVariablesField(String labelText, String initialValue, boolean allowsEmpty)
- {
- fieldList.add(new FieldSummary(VARIABLE, labelText, initialValue, allowsEmpty));
- }
-
- /**
- * Add a label and a combo.
- *
- * @param labelText the label
- * @param initialIndex the initial selection index
- * @param items the array of items for the combo
- */
- public void addComboField(String labelText, int initialIndex, String[] items)
- {
- fieldList.add(new FieldSummary(COMBO, labelText, items, initialIndex));
- }
-
- protected void createTextField(String labelText, String initialValue, boolean allowEmpty)
- {
- Label label = new Label(panel, SWT.NONE);
- label.setText(labelText);
- label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
-
- final Text text = new Text(panel, SWT.SINGLE | SWT.BORDER);
- text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- text.setData(FIELD_NAME, labelText);
-
- // make sure rows are the same height on both panels.
- label.setSize(label.getSize().x, text.getSize().y);
-
- if (initialValue != null)
- {
- text.setText(initialValue);
- }
-
- if (!allowEmpty)
- {
- validators.add(new Validator()
- {
- @Override
- public boolean validate()
- {
- return !text.getText().equals(""); //$NON-NLS-1$
- }
- });
- text.addModifyListener(new ModifyListener()
- {
- public void modifyText(ModifyEvent e)
- {
- validateFields();
- }
- });
- }
-
- controlList.add(text);
- }
-
- protected void createVariablesField(String labelText, String initialValue, boolean allowEmpty)
- {
- Label label = new Label(panel, SWT.NONE);
- label.setText(labelText);
- label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
-
- Composite comp = new Composite(panel, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- comp.setLayout(layout);
- comp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- final Text text = new Text(comp, SWT.SINGLE | SWT.BORDER);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = 200;
- text.setLayoutData(data);
- text.setData(FIELD_NAME, labelText);
-
- // make sure rows are the same height on both panels.
- label.setSize(label.getSize().x, text.getSize().y);
-
- if (initialValue != null)
- {
- text.setText(initialValue);
- }
-
- if (!allowEmpty)
- {
- validators.add(new Validator()
- {
- @Override
- public boolean validate()
- {
- return !text.getText().equals(""); //$NON-NLS-1$
- }
- });
-
- text.addModifyListener(new ModifyListener()
- {
- public void modifyText(ModifyEvent e)
- {
- validateFields();
- }
- });
- }
-
- Button button = createButton(comp, IDialogConstants.IGNORE_ID, Messages.VariablesFieldButton_Text, false);
- button.addSelectionListener(new SelectionAdapter()
- {
- @Override
- public void widgetSelected(SelectionEvent e)
- {
- StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell());
- int code = dialog.open();
- if (code == IDialogConstants.OK_ID)
- {
- String variable = dialog.getVariableExpression();
- if (variable != null)
- {
- text.insert(variable);
- }
- }
- }
- });
-
- controlList.add(text);
-
- }
-
- protected void createComboField(String labelText, int initialValue, String[] items)
- {
- Label label = new Label(panel, SWT.NONE);
- label.setText(labelText);
- label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
-
- Composite comp = new Composite(panel, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- comp.setLayout(layout);
- comp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- final Combo combo = new Combo(comp, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
- // GridData data = new GridData(GridData.FILL_HORIZONTAL);
- // data.widthHint = 200;
- // combo.setLayoutData(data);
-
- combo.setData(FIELD_NAME, labelText);
-
- // make sure rows are the same height on both panels.
- label.setSize(label.getSize().x, combo.getSize().y);
-
- combo.setItems(items);
- combo.select(initialValue);
-
- controlList.add(combo);
- }
-
- @Override
- protected void okPressed()
- {
- for (Iterator<Scrollable> i = controlList.iterator(); i.hasNext();)
- {
- Control control = i.next();
- if (control instanceof Text)
- {
- valueMap.put(control.getData(FIELD_NAME), ((Text) control).getText());
- }
- else if (control instanceof Combo)
- {
- Combo combo = (Combo) control;
- valueMap.put(control.getData(FIELD_NAME), new Integer(combo.getSelectionIndex()));
- }
- }
- controlList = null;
- super.okPressed();
- }
-
- @Override
- public int open()
- {
- applyDialogFont(panel);
- return super.open();
- }
-
- protected Object getValue(String key)
- {
- return valueMap.get(key);
- }
-
- protected String getStringValue(String key)
- {
- return (String) getValue(key);
- }
-
- protected int getIntValue(String key)
- {
- return ((Integer) getValue(key)).intValue();
- }
-
- protected void validateFields()
- {
- for (Iterator<Validator> i = validators.iterator(); i.hasNext();)
- {
- Validator validator = i.next();
- if (!validator.validate())
- {
- getButton(IDialogConstants.OK_ID).setEnabled(false);
- return;
- }
- }
- getButton(IDialogConstants.OK_ID).setEnabled(true);
- }
-
- private String getDialogSettingsSectionName()
- {
- return XSLDebugUIPlugin.PLUGIN_ID + ".MULTIPLE_INPUT_DIALOG"; //$NON-NLS-1$
- }
-
- @Override
- protected IDialogSettings getDialogBoundsSettings()
- {
- IDialogSettings settings = XSLDebugUIPlugin.getDefault().getDialogSettings();
- IDialogSettings section = settings.getSection(getDialogSettingsSectionName());
- if (section == null)
- {
- section = settings.addNewSection(getDialogSettingsSectionName());
- }
- return section;
- }
-
- protected class FieldSummary
- {
- int initialIndex;
- int type;
- String name;
- String initialValue;
- boolean allowsEmpty;
- String[] items;
-
- public FieldSummary(int type, String name, String initialValue, boolean allowsEmpty)
- {
- this.type = type;
- this.name = name;
- this.initialValue = initialValue;
- this.allowsEmpty = allowsEmpty;
- }
-
- public FieldSummary(int type, String name, String[] items, int initialIndex)
- {
- this.type = type;
- this.name = name;
- this.items = items;
- }
- }
-
- protected class Validator
- {
- boolean validate()
- {
- return true;
- }
- }
-
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/OpenDialogAction.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/OpenDialogAction.java
deleted file mode 100644
index 3c269b0..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/OpenDialogAction.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui.actions;
-
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.wst.xsl.internal.debug.ui.XSLDebugUIPlugin;
-import org.eclipse.wst.xsl.internal.debug.ui.tabs.main.StylesheetViewer;
-
-/**
- * An action that opens a dialog.
- *
- * @author Doug Satchwell
- */
-public class OpenDialogAction extends AbstractStylesheetAction
-{
- protected static final String LAST_PATH_SETTING = "LAST_PATH_SETTING"; //$NON-NLS-1$
- private String fPrefix = null;
-
- /**
- * Create a new instance of this
- *
- * @param label the dialog title
- * @param viewer a viewer that this dialog is associated with
- * @param dialogSettingsPrefix the prefix to use for saving dialog preferences
- */
- public OpenDialogAction(String label, StylesheetViewer viewer, String dialogSettingsPrefix)
- {
- super(label, viewer);
- fPrefix = dialogSettingsPrefix;
- }
-
- protected String getDialogSettingsPrefix()
- {
- return fPrefix;
- }
-
- protected String getDialogSetting(String settingName)
- {
- return getDialogSettings().get(getDialogSettingsPrefix() + "." + settingName); //$NON-NLS-1$
- }
-
- protected void setDialogSetting(String settingName, String value)
- {
- getDialogSettings().put(getDialogSettingsPrefix() + "." + settingName, value); //$NON-NLS-1$
- }
-
- protected IDialogSettings getDialogSettings()
- {
- IDialogSettings settings = XSLDebugUIPlugin.getDefault().getDialogSettings();
- return settings;
- }
-
- @Override
- protected int getActionType()
- {
- return ADD;
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/RemoveAction.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/RemoveAction.java
deleted file mode 100644
index 11809ce..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/RemoveAction.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- * David Carver (STAR) - bug 245772 - NLS Message refactoring
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui.actions;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.wst.xsl.internal.debug.ui.Messages;
-import org.eclipse.wst.xsl.internal.debug.ui.tabs.main.StylesheetViewer;
-import org.eclipse.wst.xsl.launching.config.LaunchTransform;
-
-/**
- * An action that removes a selection from a viewer.
- *
- * @author Doug Satchwell
- */
-public class RemoveAction extends AbstractStylesheetAction
-{
- /**
- * Create a new instance of this.
- *
- * @param viewer the viewer that will have its selection removed
- */
- public RemoveAction(StylesheetViewer viewer)
- {
- super(Messages.RemoveAction_Text, viewer);
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public void run()
- {
- IStructuredSelection selection = (IStructuredSelection) getViewer().getViewer().getSelection();
- getViewer().removeEntries((LaunchTransform[]) selection.toList().toArray(new LaunchTransform[0]));
- }
-
- @Override
- protected boolean updateSelection(IStructuredSelection selection)
- {
- if (selection.isEmpty())
- {
- return false;
- }
- return getViewer().updateSelection(getActionType(), selection);
- }
-
- @Override
- protected int getActionType()
- {
- return MOVE;
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/RemoveParameterAction.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/RemoveParameterAction.java
deleted file mode 100644
index 430dadc..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/actions/RemoveParameterAction.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- * David Carver (STAR) - bug 245772 - NLS Message refactoring
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui.actions;
-
-import java.util.Iterator;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.wst.xsl.internal.debug.ui.Messages;
-import org.eclipse.wst.xsl.internal.debug.ui.tabs.main.ParameterViewer;
-import org.eclipse.wst.xsl.launching.config.LaunchAttribute;
-
-/**
- * An action that removes a selection from a viewer.
- *
- * @author Doug Satchwell
- */
-public class RemoveParameterAction extends AbstractParameterAction
-{
- /**
- * Create a new instance of this.
- *
- * @param viewer the viewer that will have its selection removed
- */
- public RemoveParameterAction(ParameterViewer viewer)
- {
- super(Messages.RemoveParameterAction, viewer);
- }
-
- @Override
- public void run()
- {
- IStructuredSelection sel = getStructuredSelection();
- if (sel.size() > 0)
- {
- LaunchAttribute[] entries = new LaunchAttribute[sel.size()];
- int i = 0;
- for (Iterator<?> iter = sel.iterator(); iter.hasNext(); i++)
- {
- LaunchAttribute att = (LaunchAttribute) iter.next();
- entries[i] = att;
- }
- getViewer().removeEntries(entries);
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/breakpoint/XSLBreakpointProvider.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/breakpoint/XSLBreakpointProvider.java
deleted file mode 100644
index 14cbe5b..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/breakpoint/XSLBreakpointProvider.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- * David Carver (STAR) - bug 245772 - NLS Message refactoring
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui.breakpoint;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExecutableExtension;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITypedRegion;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IStorageEditorInput;
-import org.eclipse.wst.sse.ui.internal.StructuredResourceMarkerAnnotationModel;
-import org.eclipse.wst.sse.ui.internal.provisional.extensions.ISourceEditingTextTools;
-import org.eclipse.wst.sse.ui.internal.provisional.extensions.breakpoint.IBreakpointProvider;
-import org.eclipse.wst.xsl.internal.debug.ui.Messages;
-import org.eclipse.wst.xsl.internal.debug.ui.XSLDebugUIPlugin;
-import org.eclipse.wst.xsl.launching.model.XSLLineBreakpoint;
-
-/**
- * An SSE <code>IBreakpointProvider</code> for XSL files.
- *
- * @author Doug Satchwell
- */
-public class XSLBreakpointProvider implements IBreakpointProvider, IExecutableExtension
-{
- public IStatus addBreakpoint(IDocument document, IEditorInput input, int editorLineNumber, int offset) throws CoreException
- {
- // check if there is a valid position to set breakpoint
- int pos = getValidPosition(document, editorLineNumber);
- IStatus status = null;
- if (pos >= 0)
- {
- IResource res = getResourceFromInput(input);
- if (res != null)
- {
- boolean add = true;
- if (add)
- {
- IBreakpoint point = new XSLLineBreakpoint(res, editorLineNumber, pos, pos);
- if (point == null)
- {
- status = new Status(IStatus.ERROR, XSLDebugUIPlugin.PLUGIN_ID, IStatus.ERROR, Messages.XSLBreakpointProvider_0, null);
- }
- else
- {
- // DebugPlugin.getDefault().getBreakpointManager().addBreakpoint(point);
- }
- }
- }
- else if (input instanceof IStorageEditorInput)
- {
- res = ResourcesPlugin.getWorkspace().getRoot();
- String id = input.getName();
- if (input instanceof IStorageEditorInput && ((IStorageEditorInput) input).getStorage() != null && ((IStorageEditorInput) input).getStorage().getFullPath() != null)
- {
- id = ((IStorageEditorInput) input).getStorage().getFullPath().toString();
- }
- Map<String, String> attributes = new HashMap<String, String>();
- attributes.put(StructuredResourceMarkerAnnotationModel.SECONDARY_ID_KEY, id);
- IBreakpoint point = new XSLLineBreakpoint(res, editorLineNumber, pos, pos);
- if (point == null)
- {
- status = new Status(IStatus.ERROR, XSLDebugUIPlugin.PLUGIN_ID, IStatus.ERROR, Messages.XSLBreakpointProvider_0, null);
- }
- }
- }
- if (status == null)
- {
- status = new Status(IStatus.OK, XSLDebugUIPlugin.PLUGIN_ID, IStatus.OK, "JSPUIMessages.OK", null); //$NON-NLS-1$
- }
- return status;
- }
-
- public IResource getResource(IEditorInput input)
- {
- return getResourceFromInput(input);
- }
-
- private IResource getResourceFromInput(IEditorInput input)
- {
- IResource resource = (IResource) input.getAdapter(IFile.class);
- if (resource == null)
- {
- resource = (IResource) input.getAdapter(IResource.class);
- }
- return resource;
- }
-
- private int getValidPosition(IDocument idoc, int editorLineNumber)
- {
- int result = -1;
- if (idoc != null)
- {
- int startOffset = 0;
- int endOffset = 0;
- try
- {
- IRegion line = idoc.getLineInformation(editorLineNumber - 1);
- startOffset = line.getOffset();
- endOffset = Math.max(line.getOffset(), line.getOffset() + line.getLength());
-
- String lineText = idoc.get(startOffset, endOffset - startOffset).trim();
-
- // blank lines or PI's cannot have breakpoints
- if (lineText.trim().equals("") || lineText.startsWith("<?")) //$NON-NLS-1$ //$NON-NLS-2$
- {
- result = -1;
- }
- else
- {
- // get all partitions for current line
- ITypedRegion[] partitions = null;
-
- partitions = idoc.computePartitioning(startOffset, endOffset - startOffset);
-
- for (int i = 0; i < partitions.length; ++i)
- {
- // String type = partitions[i].getType();
- result = partitions[i].getOffset();
- }
- }
- }
- catch (BadLocationException e)
- {
- result = -1;
- }
- }
- return result;
- }
-
- public void setInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException
- {
- // not used
- }
-
- public void setSourceEditingTextTools(ISourceEditingTextTools tools)
- {
- // not used
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/messages.properties b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/messages.properties
deleted file mode 100644
index 018d14e..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/messages.properties
+++ /dev/null
@@ -1,127 +0,0 @@
-ResourceSelectionBlock_0=File:
-XSLLaunchShortcut_0=Select an input file for the transformation
-XSLLaunchShortcut_1=Input File
-XSLLaunchShortcut_2=Select a Launch Configuration
-XSLLaunchShortcut_6=Error
-XSLSelectExisting=&Select existing configuration:
-#Action Messages
-RemoveAction_Text=Remove
-AddWorkspaceFileAction_Text=Add Files
-AddExternalFileAction_Text=Add External Files
-MoveDownAction_Text=Move Down
-MoveUpAction_Text=Move Up
-AddExternalFileAction_Selection_3=
-AddWorkspaceFileAction_DialogMessage=Choose Stylesheet
-AddWorkspaceFileAction_DialogTitle=
-AddParameterAction=Add Parameter
-RemoveParameterAction=Remove Parameter
-VariablesFieldButton_Text=Variables...
-AddParameterAction_Dialog=Add XSLT Parameter
-AddParameterAction_Dialog_Name=Name:
-AddParameterAction_Dialog_Type=Type:
-AddParameterAction_Dialog_Value=Value:
-#Breakpoint
-XSLBreakpointProvider_0=unsupported input type
-
-StylesheetEntryLabelProvider_Invalid_path=Invalid path
-XSLMainTab_TabName=Main
-
-TransformsBlock_0=TransformsBlock
-TransformsBlock_Name=Transformation Pipeline
-TransformsBlock_ParametersLabel=Parameters for stylesheet:
-TransformsBlock_StylesheetsLabel=Stylesheets:
-
-InputFileBlock_DIRECTORY_NOT_SPECIFIED=Input file not specified
-InputFileBlock_DIRECTORY_DOES_NOT_EXIST=Input file does not exist
-InputFileBlock_GROUP_NAME=XML Input File
-InputFileBlock_DEFAULT_RADIO=Use default
-InputFileBlock_OTHER_RADIO=Other
-InputFileBlock_DIALOG_MESSAGE=Select an external input file
-InputFileBlock_WORKSPACE_DIALOG_MESSAGE=Select an input file from the workspace
-InputFileBlock_VARIABLES_BUTTON=Variables...
-InputFileBlock_FILE_SYSTEM_BUTTON=File System...
-InputFileBlock_WORKSPACE_BUTTON=Workspace...
-InputFileBlock_OPENFILES_BUTTON=Open Files...
-InputFileBlock_OPENFILES_DIALOG=Select File
-InputFileBlock_Name=XML Input File
-InputFileBlock_Exception_occurred_reading_configuration=Exception occurred reading configuration
-InputFileBlock_WORKSPACE_DIALOG_TITLE=File Selection
-
-RemoveAction_Text=Remove
-AddWorkspaceFileAction_Text=Add Files
-AddExternalFileAction_Text=Add External Files
-MoveDownAction_Text=Move Down
-MoveUpAction_Text=Move Up
-AddExternalFileAction_Selection_3=
-AddWorkspaceFileAction_DialogMessage=Choose Stylesheet
-AddWorkspaceFileAction_DialogTitle=
-AddParameterAction=Add Parameter
-RemoveParameterAction=Remove Parameter
-VariablesFieldButton_Text=Variables...
-AddParameterAction_Dialog=Add XSLT Parameter
-AddParameterAction_Dialog_Name=Name:
-AddParameterAction_Dialog_Type=Type:
-AddParameterAction_Dialog_Value=Value:
-
-ParametersBlock_0=Name
-ParametersBlock_1=Type
-ParametersBlock_10=type
-ParametersBlock_11=value
-ParametersBlock_2=Value
-ParametersBlock_3=name
-ParametersBlock_4=type
-ParametersBlock_5=value
-ParametersBlock_6=type
-ParametersBlock_7=value
-ParametersBlock_8=type
-ParametersBlock_9=Transformation Parameters
-
-OutputPropertiesBlock_0=Use properties from preferences
-OutputPropertiesBlock_1=Change Preferences...
-OutputPropertiesBlock_13=Output Properties
-OutputPropertiesBlock_3=Use specific properties
-OutputPropertiesBlock_4=Property
-OutputPropertiesBlock_5=Value
-OutputPropertiesBlock_7=property
-OutputPropertiesBlock_8=value
-OutputPropertiesBlock_9=value
-OutputTab_0=Output Properties
-OutputTab_1=Output
-
-
-
-OutputTypeBlock_Group_Name=Output Type
-OutputFileBlock_0=Use default location
-OutputFileBlock_7=Location:
-OutputFileBlock_8=Open file on completion
-OutputFileBlock_9=Output File
-OutputFileBlock_DIRECTORY_NOT_SPECIFIED=Transform output file not specified
-OutputFileBlock_DIRECTORY_DOES_NOT_EXIST=Transform output file does not exist
-OutputFileBlock_GROUP_NAME=Transform Output File
-OutputFileBlock_DEFAULT_RADIO=Default
-OutputFileBlock_OTHER_RADIO=Other
-OutputFileBlock_DIALOG_MESSAGE=Select an external output file
-OutputFileBlock_WORKSPACE_DIALOG_MESSAGE=Select an output file from the workspace
-OutputFileBlock_VARIABLES_BUTTON=Variables...
-OutputFileBlock_FILE_SYSTEM_BUTTON=File System...
-OutputFileBlock_WORKSPACE_BUTTON=Workspace...
-OutputFileBlock_Name=Transform Output File
-OutputFileBlock_Exception_occurred_reading_configuration=Exception occurred reading configuration
-OutputFileBlock_Exception_occurred_saving_configuration=Exception occurred saving launch configuration
-OutputFileBlock_WORKSPACE_DIALOG_TITLE=File Selection
-
-OutputFOFileBlock_DIRECTORY_NOT_SPECIFIED=Renderer output file not specified
-OutputFOFileBlock_DIRECTORY_DOES_NOT_EXIST=Renderer output file does not exist
-OutputFOFileBlock_GROUP_NAME=Renderer Output File
-OutputFOFileBlock_DEFAULT_RADIO=Default
-OutputFOFileBlock_OTHER_RADIO=Other
-OutputFOFileBlock_DIALOG_MESSAGE=Select an external output file
-OutputFOFileBlock_WORKSPACE_DIALOG_MESSAGE=Select an output file from the workspace
-OutputFOFileBlock_VARIABLES_BUTTON=Variables...
-OutputFOFileBlock_FILE_SYSTEM_BUTTON=File System...
-OutputFOFileBlock_WORKSPACE_BUTTON=Workspace...
-OutputFOFileBlock_Name=Renderer Output File
-OutputFOFileBlock_Exception_occurred_reading_configuration=Exception occurred reading configuration
-OutputFOFileBlock_Exception_occurred_saving_configuration=Exception occurred saving launch configuration
-OutputFOFileBlock_WORKSPACE_DIALOG_TITLE=File Selection
-
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/model/XSLBreakpointAdapterFactory.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/model/XSLBreakpointAdapterFactory.java
deleted file mode 100644
index db68b8f..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/model/XSLBreakpointAdapterFactory.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui.model;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.debug.ui.actions.IToggleBreakpointsTarget;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.wst.xsl.core.XSLCore;
-
-/**
- * Creates a toggle breakpoint adapter
- */
-public class XSLBreakpointAdapterFactory implements IAdapterFactory
-{
- @SuppressWarnings("unchecked")
- public Object getAdapter(Object adaptableObject, Class adapterType)
- {
- if (adaptableObject instanceof ITextEditor)
- {
- ITextEditor editorPart = (ITextEditor) adaptableObject;
- IResource resource = (IResource) editorPart.getEditorInput().getAdapter(IResource.class);
- if (resource != null && resource instanceof IFile)
- {
- if (XSLCore.isXSLFile((IFile)resource))
- {
- return new XSLLineBreakpointAdapter();
- }
- }
- }
- return null;
- }
-
- @SuppressWarnings("unchecked")
- public Class[] getAdapterList()
- {
- return new Class[]
- { IToggleBreakpointsTarget.class };
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/model/XSLLineBreakpointAdapter.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/model/XSLLineBreakpointAdapter.java
deleted file mode 100644
index 870045d..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/model/XSLLineBreakpointAdapter.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui.model;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.core.model.ILineBreakpoint;
-import org.eclipse.debug.ui.actions.IToggleBreakpointsTarget;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.wst.xsl.core.XSLCore;
-import org.eclipse.wst.xsl.launching.model.IXSLConstants;
-import org.eclipse.wst.xsl.launching.model.XSLLineBreakpoint;
-
-/**
- * An <code>IToggleBreakpointsTarget</code> for XSL breakpoints.
- *
- * @author Doug Satchwell
- */
-public class XSLLineBreakpointAdapter implements IToggleBreakpointsTarget
-{
- public void toggleLineBreakpoints(IWorkbenchPart part, ISelection selection) throws CoreException
- {
- ITextEditor textEditor = getEditor(part);
- if (textEditor != null)
- {
- IResource resource = (IResource) textEditor.getEditorInput().getAdapter(IResource.class);
- ITextSelection textSelection = (ITextSelection) selection;
- int lineNumber = textSelection.getStartLine();
- IBreakpoint[] breakpoints = DebugPlugin.getDefault().getBreakpointManager().getBreakpoints(IXSLConstants.ID_XSL_DEBUG_MODEL);
- for (IBreakpoint breakpoint : breakpoints)
- {
- if (resource.equals(breakpoint.getMarker().getResource()))
- {
- if (((ILineBreakpoint) breakpoint).getLineNumber() == (lineNumber + 1))
- {
- // remove
- breakpoint.delete();
- return;
- }
- }
- }
- // create line breakpoint (doc line numbers start at 0)
- XSLLineBreakpoint lineBreakpoint = new XSLLineBreakpoint(resource, lineNumber + 1, 1, 1);
- DebugPlugin.getDefault().getBreakpointManager().addBreakpoint(lineBreakpoint);
- }
- }
-
- public boolean canToggleLineBreakpoints(IWorkbenchPart part, ISelection selection)
- {
- return getEditor(part) != null;
- }
-
- /**
- * Returns the editor being used to edit a XSL file, associated with the
- * given part, or <code>null</code> if none.
- */
- private ITextEditor getEditor(IWorkbenchPart part)
- {
- if (part instanceof ITextEditor)
- {
- ITextEditor editorPart = (ITextEditor) part;
- IResource resource = (IResource) editorPart.getEditorInput().getAdapter(IResource.class);
- if (resource != null && resource.getType() == IResource.FILE)
- {
- if (XSLCore.isXSLFile((IFile)resource))
- {
- return editorPart;
- }
- }
- }
- return null;
- }
-
- public void toggleMethodBreakpoints(IWorkbenchPart part, ISelection selection) throws CoreException
- {
- }
-
- public boolean canToggleMethodBreakpoints(IWorkbenchPart part, ISelection selection)
- {
- return false;
- }
-
- public void toggleWatchpoints(IWorkbenchPart part, ISelection selection) throws CoreException
- {
- }
-
- public boolean canToggleWatchpoints(IWorkbenchPart part, ISelection selection)
- {
- return false;
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/model/XSLModelPresentation.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/model/XSLModelPresentation.java
deleted file mode 100644
index 3b72474..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/model/XSLModelPresentation.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- * David Carver (STAR) - bug 214235 - Added NodeList specific images.
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui.model;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.ILineBreakpoint;
-import org.eclipse.debug.core.model.IValue;
-import org.eclipse.debug.ui.IDebugModelPresentation;
-import org.eclipse.debug.ui.IValueDetailListener;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.wst.xsl.internal.debug.ui.XSLDebugUIConstants;
-import org.eclipse.wst.xsl.internal.debug.ui.XSLDebugUIPlugin;
-import org.eclipse.wst.xsl.launching.model.NodeListVariable;
-import org.eclipse.wst.xsl.launching.model.XSLVariable;
-import org.w3c.dom.Node;
-import org.eclipse.wst.xml.ui.internal.util.SharedXMLEditorPluginImageHelper;
-
-/**
- * An <code>IDebugModelPresentation</code> for XSL debugging.
- *
- * @author Doug Satchwell
- */
-public class XSLModelPresentation extends LabelProvider implements IDebugModelPresentation
-{
- private Image localImg;
-
- public void setAttribute(String attribute, Object value)
- {
- }
-
- @Override
- public Image getImage(Object element)
- {
- if (element instanceof XSLVariable)
- {
- XSLVariable var = (XSLVariable) element;
- if (var.getScope().equals(XSLVariable.LOCAL_SCOPE))
- {
- if (localImg == null)
- localImg = XSLDebugUIPlugin.getImageDescriptor("/icons/localvariable_obj.gif").createImage(); //$NON-NLS-1$
- return localImg;
- }
- }
- if (element instanceof NodeListVariable) {
- NodeListVariable nodeVar = (NodeListVariable) element;
- if (nodeVar.getNode() != null) {
- Node node = nodeVar.getNode();
- if (node.getNodeType() == Node.ELEMENT_NODE) {
- localImg = SharedXMLEditorPluginImageHelper.getImage(SharedXMLEditorPluginImageHelper.IMG_OBJ_ELEMENT);
- }
- if (node.getNodeType() == Node.ATTRIBUTE_NODE) {
- localImg = SharedXMLEditorPluginImageHelper.getImage(SharedXMLEditorPluginImageHelper.IMG_OBJ_ATTRIBUTE);
- }
- if (node.getNodeType() == Node.COMMENT_NODE) {
- localImg = SharedXMLEditorPluginImageHelper.getImage(SharedXMLEditorPluginImageHelper.IMG_OBJ_COMMENT);
- }
- if (node.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE) {
- localImg = SharedXMLEditorPluginImageHelper.getImage(SharedXMLEditorPluginImageHelper.IMG_OBJ_PROCESSINGINSTRUCTION);
- }
- if (node.getNodeType() == Node.CDATA_SECTION_NODE) {
- localImg = SharedXMLEditorPluginImageHelper.getImage(SharedXMLEditorPluginImageHelper.IMG_OBJ_CDATASECTION);
- }
- if (node.getNodeType() == Node.ENTITY_NODE) {
- localImg = SharedXMLEditorPluginImageHelper.getImage(SharedXMLEditorPluginImageHelper.IMG_OBJ_ENTITY);
- }
- if (node.getNodeType() == Node.ENTITY_REFERENCE_NODE) {
- localImg = SharedXMLEditorPluginImageHelper.getImage(SharedXMLEditorPluginImageHelper.IMG_OBJ_ENTITY_REFERENCE);
- }
- if (node.getNodeType() == Node.TEXT_NODE) {
- localImg = SharedXMLEditorPluginImageHelper.getImage(SharedXMLEditorPluginImageHelper.IMG_OBJ_TXTEXT);
- }
- return localImg;
- }
- }
- return null;
- }
-
- @Override
- public String getText(Object element)
- {
- return null;
- }
-
- @Override
- public void dispose()
- {
- if (localImg != null)
- localImg.dispose();
- super.dispose();
- }
-
- public void computeDetail(IValue value, IValueDetailListener listener)
- {
- String detail = ""; //$NON-NLS-1$
- try
- {
- detail = value.getValueString();
- }
- catch (DebugException e)
- {
- }
- listener.detailComputed(value, detail);
- }
-
- public IEditorInput getEditorInput(Object element)
- {
- if (element instanceof IFile)
- {
- return new FileEditorInput((IFile) element);
- }
- if (element instanceof ILineBreakpoint)
- {
- return new FileEditorInput((IFile) ((ILineBreakpoint) element).getMarker().getResource());
- }
- return null;
- }
-
- public String getEditorId(IEditorInput input, Object element)
- {
- if (element instanceof IFile || element instanceof ILineBreakpoint)
- {
- return XSLDebugUIConstants.XSL_EDITOR_ID;
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/IParametersChangedListener.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/IParametersChangedListener.java
deleted file mode 100644
index 13d8a71..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/IParametersChangedListener.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui.tabs.main;
-
-public interface IParametersChangedListener
-{
- void parametersChanged(ParameterViewer viewer);
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/IStylesheetEntriesChangedListener.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/IStylesheetEntriesChangedListener.java
deleted file mode 100644
index b1fe798..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/IStylesheetEntriesChangedListener.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui.tabs.main;
-
-public interface IStylesheetEntriesChangedListener
-{
- void entriesChanged(StylesheetViewer viewer);
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/InputFileBlock.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/InputFileBlock.java
deleted file mode 100644
index 59bd3a9..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/InputFileBlock.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- * Stuart Harper - added "open files" selector
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui.tabs.main;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.variables.IStringVariableManager;
-import org.eclipse.core.variables.VariablesPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.wst.xsl.internal.debug.ui.Messages;
-import org.eclipse.wst.xsl.internal.debug.ui.ResourceSelectionBlock;
-import org.eclipse.wst.xsl.internal.debug.ui.XSLDebugUIPlugin;
-import org.eclipse.wst.xsl.launching.XSLLaunchConfigurationConstants;
-
-
-public class InputFileBlock extends ResourceSelectionBlock
-{
- private final IFile defaultFile;
-
- public InputFileBlock(IFile defaultFile)
- {
- super(IResource.FILE, false);
- this.defaultFile = defaultFile;
- }
-
-
- public void setDefaults(ILaunchConfigurationWorkingCopy configuration)
- {
- String path = ""; //$NON-NLS-1$
- if (defaultFile != null)
- path = VariablesPlugin.getDefault().getStringVariableManager().generateVariableExpression("workspace_loc", defaultFile.getFullPath().toPortableString()); //$NON-NLS-1$
- configuration.setAttribute(XSLLaunchConfigurationConstants.ATTR_INPUT_FILE, path);
- }
-
- public void initializeFrom(ILaunchConfiguration configuration)
- {
- setLaunchConfiguration(configuration);
- try
- {
- String wd = configuration.getAttribute(XSLLaunchConfigurationConstants.ATTR_INPUT_FILE, (String) null);
- if (wd != null)
- {
- setText(wd);
- }
- }
- catch (CoreException e)
- {
- setErrorMessage(Messages.InputFileBlock_Exception_occurred_reading_configuration + e.getStatus().getMessage());
- XSLDebugUIPlugin.log(e);
- }
- }
-
- public void performApply(ILaunchConfigurationWorkingCopy configuration)
- {
- configuration.setAttribute(XSLLaunchConfigurationConstants.ATTR_INPUT_FILE, getText());
- }
-
- public String getName()
- {
- return Messages.InputFileBlock_Name;
- }
-
- @Override
- protected void textModified()
- {
- IPath path = null;
- String workingDirPath = getText();
- if (workingDirPath.indexOf("${") >= 0) //$NON-NLS-1$
- {
- IStringVariableManager manager = VariablesPlugin.getDefault().getStringVariableManager();
- try
- {
- manager.validateStringVariables(workingDirPath);
- path = new Path(manager.performStringSubstitution(workingDirPath));
- }
- catch (CoreException e)
- {
- }
- }
- else if (workingDirPath.length() > 0)
- {
- path = new Path(workingDirPath);
- }
- }
-
- @Override
- protected String getMessage(int type)
- {
- switch (type)
- {
- case ERROR_DIRECTORY_NOT_SPECIFIED:
- return Messages.InputFileBlock_DIRECTORY_NOT_SPECIFIED;
- case ERROR_DIRECTORY_DOES_NOT_EXIST:
- return Messages.InputFileBlock_DIRECTORY_DOES_NOT_EXIST;
- case GROUP_NAME:
- return Messages.InputFileBlock_GROUP_NAME;
- case USE_DEFAULT_RADIO:
- return Messages.InputFileBlock_DEFAULT_RADIO;
- case USE_OTHER_RADIO:
- return Messages.InputFileBlock_OTHER_RADIO;
- case DIRECTORY_DIALOG_MESSAGE:
- return Messages.InputFileBlock_DIALOG_MESSAGE;
- case WORKSPACE_DIALOG_MESSAGE:
- return Messages.InputFileBlock_WORKSPACE_DIALOG_MESSAGE;
- case VARIABLES_BUTTON:
- return Messages.InputFileBlock_VARIABLES_BUTTON;
- case FILE_SYSTEM_BUTTON:
- return Messages.InputFileBlock_FILE_SYSTEM_BUTTON;
- case WORKSPACE_BUTTON:
- return Messages.InputFileBlock_WORKSPACE_BUTTON;
- case WORKSPACE_DIALOG_TITLE:
- return Messages.InputFileBlock_WORKSPACE_DIALOG_TITLE;
- case OPENFILES_BUTTON:
- return Messages.InputFileBlock_OPENFILES_BUTTON;
- case OPENFILES_DIALOG_TITLE:
- return Messages.InputFileBlock_OPENFILES_DIALOG;
- }
- return "" + type; //$NON-NLS-1$
- }
-
- @Override
- protected void updateResourceText(boolean useDefault)
- {
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/ParameterViewer.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/ParameterViewer.java
deleted file mode 100644
index 7927c85..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/ParameterViewer.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui.tabs.main;
-
-import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.wst.xsl.internal.debug.ui.actions.AbstractStylesheetAction;
-import org.eclipse.wst.xsl.launching.config.LaunchAttribute;
-
-public class ParameterViewer
-{
- private final TableViewer viewer;
- private final ListenerList fListeners = new ListenerList();
-
- public ParameterViewer(Table table)
- {
- viewer = new TableViewer(table);
- }
-
- public TableViewer getViewer()
- {
- return viewer;
- }
-
- private ParametersContentProvider getParametersContentProvider()
- {
- return (ParametersContentProvider) viewer.getContentProvider();
- }
-
- public Shell getShell()
- {
- return viewer.getControl().getShell();
- }
-
- public boolean isEnabled()
- {
- return true;
- }
-
- public boolean updateSelection(int actionType, IStructuredSelection selection)
- {
- switch (actionType)
- {
- case AbstractStylesheetAction.ADD:
- return true;
- case AbstractStylesheetAction.REMOVE:
- case AbstractStylesheetAction.MOVE:
- default:
- break;
- }
- return selection.size() > 0;
- }
-
- public IStructuredSelection getSelectedEntries()
- {
- IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
- return selection;
- }
-
- public void addParameter(LaunchAttribute parameter)
- {
- getParametersContentProvider().addParameter(parameter);
- notifyChanged();
- }
-
- public void removeEntries(LaunchAttribute[] entries)
- {
- getParametersContentProvider().removeParameters(entries);
- notifyChanged();
- }
-
- public LaunchAttribute[] getParameters()
- {
- return getParametersContentProvider().getParameters();
- }
-
- public void addParametersChangedListener(IParametersChangedListener listener)
- {
- fListeners.add(listener);
- }
-
- public void removeParametersChangedListener(IParametersChangedListener listener)
- {
- fListeners.remove(listener);
- }
-
- private void notifyChanged()
- {
- Object[] listeners = fListeners.getListeners();
- for (Object element : listeners)
- {
- ((IParametersChangedListener) element).parametersChanged(this);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/ParametersBlock.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/ParametersBlock.java
deleted file mode 100644
index 0846e48..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/ParametersBlock.java
+++ /dev/null
@@ -1,242 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui.tabs.main;
-
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.jface.viewers.ICellModifier;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TextCellEditor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Item;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.wst.xsl.internal.debug.ui.AbstractTableBlock;
-import org.eclipse.wst.xsl.internal.debug.ui.Messages;
-import org.eclipse.wst.xsl.internal.debug.ui.XSLDebugUIConstants;
-import org.eclipse.wst.xsl.internal.debug.ui.XSLDebugUIPlugin;
-import org.eclipse.wst.xsl.internal.debug.ui.actions.AbstractParameterAction;
-import org.eclipse.wst.xsl.internal.debug.ui.actions.AddParameterAction;
-import org.eclipse.wst.xsl.internal.debug.ui.actions.RemoveParameterAction;
-import org.eclipse.wst.xsl.launching.config.LaunchAttribute;
-import org.eclipse.wst.xsl.launching.config.LaunchTransform;
-
-public class ParametersBlock extends AbstractTableBlock
-{
- private ParameterViewer parametersViewer;
- private Button addParameterButton;
- private Button removeParameterButton;
- private final TransformsBlock transformsBlock;
- private final ISelectionChangedListener selectionListener = new ISelectionChangedListener()
- {
- public void selectionChanged(SelectionChangedEvent event)
- {
- IStructuredSelection stylesheetSelection = (IStructuredSelection) event.getSelection();
- if (stylesheetSelection.size() == 1)
- setTransform((LaunchTransform) stylesheetSelection.getFirstElement());
- else
- setTransform(null);
- updateEnabled();
- }
- };
- private Table fTable;
-
- public ParametersBlock(TransformsBlock transformsBlock)
- {
- super();
- this.transformsBlock = transformsBlock;
- }
-
- protected void setTransform(LaunchTransform transform)
- {
- parametersViewer.getViewer().setInput(transform);
- }
-
- protected void updateEnabled()
- {
- IStructuredSelection stylesheetSelection = (IStructuredSelection) transformsBlock.getStylesheetViewer().getSelection();
- boolean enabled = stylesheetSelection.size() == 1;
- parametersViewer.getViewer().getTable().setEnabled(enabled);
- addParameterButton.setEnabled(enabled);
- IStructuredSelection parametersSelection = (IStructuredSelection) parametersViewer.getViewer().getSelection();
- removeParameterButton.setEnabled(enabled && !parametersSelection.isEmpty());
- }
-
- public void createControl(Composite parent)
- {
- Font font = parent.getFont();
-
- Group group = new Group(parent, SWT.NONE);
- group.setText(getName());
- GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
- group.setLayoutData(gd);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- group.setLayout(layout);
- group.setFont(font);
-
- setControl(group);
-
- fTable = new Table(group, SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION);
-
- GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
- // data.heightHint = 100;
- fTable.setLayoutData(data);
- fTable.setFont(font);
-
- fTable.setHeaderVisible(true);
- fTable.setLinesVisible(true);
-
- TableColumn column1 = new TableColumn(fTable, SWT.NONE);
- column1.setWidth(150);
- column1.setResizable(true);
- column1.setText(Messages.ParametersBlock_0);
-
- TableColumn column3 = new TableColumn(fTable, SWT.NONE);
- column3.setWidth(250);
- column3.setResizable(true);
- column3.setText(Messages.ParametersBlock_2);
-
- parametersViewer = new ParameterViewer(fTable);
- parametersViewer.getViewer().setLabelProvider(new ParametersLabelProvider());
- parametersViewer.getViewer().setContentProvider(new ParametersContentProvider());
- parametersViewer.addParametersChangedListener(new IParametersChangedListener()
- {
-
- public void parametersChanged(ParameterViewer viewer)
- {
- updateLaunchConfigurationDialog();
- }
- });
- parametersViewer.getViewer().getTable().addKeyListener(new KeyAdapter() {
- @Override
- public void keyPressed(KeyEvent event) {
- if (event.character == SWT.DEL && event.stateMask == 0) {
- RemoveParameterAction ra = new RemoveParameterAction(parametersViewer);
- ra.run();
- updateLaunchConfigurationDialog();
- }
- }
- });
-
- parametersViewer.getViewer().setColumnProperties(new String[]
- { "name", "value" }); //$NON-NLS-1$ //$NON-NLS-2$
- TextCellEditor textEditor = new TextCellEditor(fTable);
- CellEditor[] editors = new CellEditor[]
- { null, textEditor };
- parametersViewer.getViewer().setCellEditors(editors);
- parametersViewer.getViewer().setCellModifier(new ICellModifier()
- {
- public boolean canModify(Object element, String property)
- {
- return "value".equals(property); //$NON-NLS-1$
- }
-
- public Object getValue(Object element, String property)
- {
- LaunchAttribute att = (LaunchAttribute) element;
- return att.value == null ? "" : att.value; //$NON-NLS-1$
- }
-
- public void modify(Object element, String property, Object value)
- {
- Item item = (Item) element;
- LaunchAttribute att = (LaunchAttribute) item.getData();
- att.value = (String) value;
- parametersViewer.getViewer().update(att, null);
- updateLaunchConfigurationDialog();
- }
- });
-
- Composite parameterButtonComp = new Composite(group, SWT.NONE);
- GridLayout parameterButtonCompLayout = new GridLayout();
- parameterButtonCompLayout.marginHeight = 0;
- parameterButtonCompLayout.marginWidth = 0;
- parameterButtonComp.setLayout(parameterButtonCompLayout);
- gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.HORIZONTAL_ALIGN_FILL);
- gd.horizontalSpan = 2;
- parameterButtonComp.setLayoutData(gd);
- parameterButtonComp.setFont(font);
-
- addParameterButton = createButton(parameterButtonComp, new AddParameterAction(parametersViewer));
- removeParameterButton = createButton(parameterButtonComp, new RemoveParameterAction(parametersViewer));
-
- transformsBlock.getStylesheetViewer().addSelectionChangedListener(selectionListener);
-
- restoreColumnSettings();
- }
-
- protected Button createButton(Composite pathButtonComp, AbstractParameterAction action)
- {
- Button button = createPushButton(pathButtonComp, action.getText(), null);
- action.setButton(button);
- return button;
- }
-
- @Override
- protected Table getTable()
- {
- return fTable;
- }
-
- @Override
- protected IDialogSettings getDialogSettings()
- {
- return XSLDebugUIPlugin.getDefault().getDialogSettings();
- }
-
- @Override
- protected String getQualifier()
- {
- return XSLDebugUIConstants.MAIN_PARAMATERS_BLOCK;
- }
-
- public String getName()
- {
- return Messages.ParametersBlock_9;
- }
-
- public void initializeFrom(ILaunchConfiguration configuration)
- {
- // handled by the Tab
- updateEnabled();
- }
-
- public void performApply(ILaunchConfigurationWorkingCopy configuration)
- {
- // handled by the Tab
- }
-
- public void setDefaults(ILaunchConfigurationWorkingCopy configuration)
- {
- // handled by the Tab
- }
-
- @Override
- public void dispose()
- {
- if (transformsBlock.getStylesheetViewer() != null)
- transformsBlock.getStylesheetViewer().removeSelectionChangedListener(selectionListener);
- super.dispose();
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/ParametersContentProvider.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/ParametersContentProvider.java
deleted file mode 100644
index 2298719..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/ParametersContentProvider.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui.tabs.main;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.wst.xsl.launching.config.LaunchAttribute;
-import org.eclipse.wst.xsl.launching.config.LaunchTransform;
-
-public class ParametersContentProvider implements IStructuredContentProvider
-{
- private LaunchTransform stylesheetEntry;
- private TableViewer parameterViewer;
-
- public Object[] getElements(Object inputElement)
- {
- if (stylesheetEntry == null)
- return new Object[0];
- return stylesheetEntry.getParameters().toArray();
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput)
- {
- stylesheetEntry = (LaunchTransform) newInput;
- parameterViewer = (TableViewer) viewer;
- }
-
- public void dispose()
- {
- }
-
- public LaunchAttribute[] getParameters()
- {
- return stylesheetEntry.getParameters().toArray(new LaunchAttribute[0]);
- }
-
- public void removeParameters(LaunchAttribute[] entries)
- {
- for (LaunchAttribute parameter : entries)
- {
- stylesheetEntry.getParameters().remove(parameter);
- }
- TableItem[] items = parameterViewer.getTable().getItems();
- List<LaunchAttribute> entryList = Arrays.asList(entries);
- Object sel = null;
- for (int i = items.length - 1; i >= 0; i--)
- {
- TableItem item = items[i];
- if (!entryList.contains(item.getData()))
- {
- sel = item.getData();
- break;
- }
- }
- parameterViewer.remove(entries);
-
- if (sel != null)
- parameterViewer.setSelection(new StructuredSelection(sel), true);
- }
-
- public void addParameter(LaunchAttribute parameter)
- {
- stylesheetEntry.getParameters().add(parameter);
- parameterViewer.add(parameter);
- parameterViewer.setSelection(new StructuredSelection(parameter), true);
- // parameterViewer.refresh();
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/ParametersLabelProvider.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/ParametersLabelProvider.java
deleted file mode 100644
index e5da79f..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/ParametersLabelProvider.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui.tabs.main;
-
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.xsl.launching.config.LaunchAttribute;
-
-public class ParametersLabelProvider implements ITableLabelProvider
-{
- public String getColumnText(Object element, int columnIndex)
- {
- LaunchAttribute p = (LaunchAttribute) element;
- switch (columnIndex)
- {
- case 0:
- return p.uri;
- case 1:
- return p.value;
- }
- return "!"; //$NON-NLS-1$
- }
-
- public Image getColumnImage(Object element, int columnIndex)
- {
- return null;
- }
-
- public void addListener(ILabelProviderListener listener)
- {
- }
-
- public void dispose()
- {
- }
-
- public boolean isLabelProperty(Object element, String property)
- {
- return false;
- }
-
- public void removeListener(ILabelProviderListener listener)
- {
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/StylesheetContentProvider.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/StylesheetContentProvider.java
deleted file mode 100644
index 17c34ad..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/StylesheetContentProvider.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui.tabs.main;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.wst.xsl.launching.config.LaunchPipeline;
-import org.eclipse.wst.xsl.launching.config.LaunchTransform;
-
-public class StylesheetContentProvider implements IStructuredContentProvider
-{
- private TableViewer tableViewer;
- private LaunchPipeline pipeline;
-
- public StylesheetContentProvider()
- {
- }
-
- public Object[] getElements(Object inputElement)
- {
- return pipeline.getTransformDefs().toArray(new LaunchTransform[0]);
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput)
- {
- tableViewer = (TableViewer) viewer;
- pipeline = (LaunchPipeline) newInput;
- }
-
- public void dispose()
- {
- }
-
- public void setEntries(LaunchTransform[] transforms)
- {
- pipeline.setTransformDefs(new ArrayList<LaunchTransform>(Arrays.asList(transforms)));
- tableViewer.refresh();
- }
-
- public void addEntries(LaunchTransform[] res, Object beforeElement)
- {
- for (LaunchTransform transform : res)
- {
- pipeline.addTransformDef(transform);
- }
- tableViewer.add(res);
- // select the first new one
- tableViewer.setSelection(new StructuredSelection(res[0]), true);
- }
-
- public void removeEntries(LaunchTransform[] res)
- {
- for (LaunchTransform transform : res)
- {
- pipeline.removeTransformDef(transform);
- }
- tableViewer.refresh();
- }
-
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/StylesheetLabelProvider.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/StylesheetLabelProvider.java
deleted file mode 100644
index 40e3b14..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/StylesheetLabelProvider.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui.tabs.main;
-
-import java.io.File;
-import java.text.MessageFormat;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.xsl.internal.debug.ui.Messages;
-import org.eclipse.wst.xsl.internal.debug.ui.XSLDebugUIPlugin;
-import org.eclipse.wst.xsl.launching.config.LaunchTransform;
-
-public class StylesheetLabelProvider extends LabelProvider
-{
- private Image image = XSLDebugUIPlugin.getImageDescriptor("icons/xslt_launch.gif").createImage();
-
- @Override
- public Image getImage(Object element)
- {
- return image;
- }
-
- @Override
- public String getText(Object element)
- {
- LaunchTransform lt = (LaunchTransform) element;
- int index = lt.getPipeline().getTransformDefs().indexOf(lt);
-
- IPath path;
- try
- {
- path = lt.getPath();
- }
- catch (CoreException e)
- {
- return MessageFormat.format(Messages.StylesheetEntryLabelProvider_Invalid_path, new Object[]
- { "null" }); //$NON-NLS-1$
- }
-
- if (path == null)
- {
- return MessageFormat.format(Messages.StylesheetEntryLabelProvider_Invalid_path, new Object[]
- { "null" }); //$NON-NLS-1$
- }
- else if (!path.isAbsolute() || !path.isValidPath(path.toString()))
- {
- return MessageFormat.format(Messages.StylesheetEntryLabelProvider_Invalid_path, new Object[]
- { path.toString() });
- }
-
- String[] segments = path.segments();
- StringBuffer displayPath = new StringBuffer();
- if (segments.length > 0)
- {
- displayPath.append(segments[segments.length - 1]);
- displayPath.append(" - "); //$NON-NLS-1$
- String device = path.getDevice();
- if (device != null)
- {
- displayPath.append(device);
- }
- displayPath.append(File.separator);
- for (int i = 0; i < segments.length - 1; i++)
- {
- displayPath.append(segments[i]).append(File.separator);
- }
- }
- else
- {
- displayPath.append(path.toString());
- }
- return (index + 1) + ") " + displayPath.toString(); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/StylesheetViewer.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/StylesheetViewer.java
deleted file mode 100644
index 1d7b8a5..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/StylesheetViewer.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui.tabs.main;
-
-import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.wst.xsl.internal.debug.ui.actions.AbstractStylesheetAction;
-import org.eclipse.wst.xsl.launching.config.LaunchTransform;
-
-public class StylesheetViewer
-{
- private TableViewer viewer;
- private final ListenerList listenerList = new ListenerList();
-
- public StylesheetViewer(Composite parent)
- {
- viewer = new TableViewer(parent);
- }
-
- public TableViewer getViewer(){
- return viewer;
- }
-
- private StylesheetContentProvider getStylesheetContentProvider()
- {
- return (StylesheetContentProvider) viewer.getContentProvider();
- }
-
- public void setEntries(LaunchTransform[] transforms)
- {
- getStylesheetContentProvider().setEntries(transforms);
- notifyChanged();
- }
-
- public LaunchTransform[] getEntries()
- {
- return (LaunchTransform[]) getStylesheetContentProvider().getElements(null);
- }
-
- public Shell getShell()
- {
- return viewer.getControl().getShell();
- }
-
- public boolean isEnabled()
- {
- return true;
- }
-
- public boolean updateSelection(int actionType, IStructuredSelection selection)
- {
- switch (actionType)
- {
- case AbstractStylesheetAction.ADD:
- return true;
- case AbstractStylesheetAction.REMOVE:
- case AbstractStylesheetAction.MOVE:
- default:
- break;
- }
- return selection.size() > 0;
- }
-
- public IStructuredSelection getSelectedEntries()
- {
- IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
- return selection;
- }
-
- public void addTransforms(LaunchTransform[] res)
- {
- IStructuredSelection sel = (IStructuredSelection) viewer.getSelection();
- Object beforeElement = sel.getFirstElement();
- if (getEntries().length > 1 && beforeElement == null)
- beforeElement = getEntries()[getEntries().length - 1];
- getStylesheetContentProvider().addEntries(res, beforeElement);
- notifyChanged();
- }
-
- public void removeEntries(LaunchTransform[] entries)
- {
- getStylesheetContentProvider().removeEntries(entries);
- notifyChanged();
- }
-
- public void addEntriesChangedListener(IStylesheetEntriesChangedListener listener)
- {
- listenerList.add(listener);
- }
-
- public void removeEntriesChangedListener(IStylesheetEntriesChangedListener listener)
- {
- listenerList.remove(listener);
- }
-
- private void notifyChanged()
- {
- Object[] listeners = listenerList.getListeners();
- for (Object element : listeners)
- {
- ((IStylesheetEntriesChangedListener) element).entriesChanged(this);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/TransformsBlock.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/TransformsBlock.java
deleted file mode 100644
index 19ed3c0..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/TransformsBlock.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui.tabs.main;
-
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.wst.xsl.internal.debug.ui.AbstractTableBlock;
-import org.eclipse.wst.xsl.internal.debug.ui.Messages;
-import org.eclipse.wst.xsl.internal.debug.ui.XSLDebugUIConstants;
-import org.eclipse.wst.xsl.internal.debug.ui.XSLDebugUIPlugin;
-import org.eclipse.wst.xsl.internal.debug.ui.actions.AbstractStylesheetAction;
-import org.eclipse.wst.xsl.internal.debug.ui.actions.AddExternalFileAction;
-import org.eclipse.wst.xsl.internal.debug.ui.actions.AddWorkspaceFileAction;
-import org.eclipse.wst.xsl.internal.debug.ui.actions.MoveDownAction;
-import org.eclipse.wst.xsl.internal.debug.ui.actions.MoveUpAction;
-import org.eclipse.wst.xsl.internal.debug.ui.actions.RemoveAction;
-import org.eclipse.wst.xsl.launching.config.LaunchPipeline;
-
-public class TransformsBlock extends AbstractTableBlock implements IStylesheetEntriesChangedListener
-{
- protected static final String DIALOG_SETTINGS_PREFIX = "TransformsBlock";
- private StylesheetViewer stylesheetViewer;
- private LaunchPipeline pipeline;
-
- public TransformsBlock()
- {
- super();
- }
-
- public void createControl(Composite parent)
- {
- Font font = parent.getFont();
-
- Group group = new Group(parent, SWT.NONE);
- group.setText(getName());
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- group.setLayoutData(gd);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- group.setLayout(layout);
- group.setFont(font);
-
- setControl(group);
-
- stylesheetViewer = new StylesheetViewer(group);
- gd = new GridData(SWT.FILL, SWT.FILL, true, true);
- stylesheetViewer.getViewer().getTable().setLayoutData(gd);
- stylesheetViewer.addEntriesChangedListener(this);
- stylesheetViewer.getViewer().getControl().setFont(font);
- stylesheetViewer.getViewer().setLabelProvider(new StylesheetLabelProvider());
- stylesheetViewer.getViewer().setContentProvider(new StylesheetContentProvider());
- stylesheetViewer.getViewer().getTable().addKeyListener(new KeyAdapter() {
- @Override
- public void keyPressed(KeyEvent event) {
- if (event.character == SWT.DEL && event.stateMask == 0) {
- RemoveAction ra = new RemoveAction(stylesheetViewer);
- ra.run();
- updateLaunchConfigurationDialog();
- }
- }
- });
-
- Composite upDownButtonComp = new Composite(group, SWT.NONE);
- GridLayout upDownButtonLayout = new GridLayout();
- upDownButtonLayout.marginHeight = 0;
- upDownButtonLayout.marginWidth = 0;
- upDownButtonComp.setLayout(upDownButtonLayout);
- gd = new GridData(SWT.FILL, SWT.FILL, false, true);
- upDownButtonComp.setLayoutData(gd);
- upDownButtonComp.setFont(font);
-
- createArrowButton(upDownButtonComp, new MoveUpAction(stylesheetViewer), SWT.UP);
- Label spacer = new Label(upDownButtonComp, SWT.NONE);
- gd = new GridData(SWT.NONE, SWT.FILL, false, true);
- spacer.setLayoutData(gd);
- createArrowButton(upDownButtonComp, new MoveDownAction(stylesheetViewer), SWT.DOWN);
-
- Composite pathButtonComp = new Composite(group, SWT.NONE);
- GridLayout pathButtonLayout = new GridLayout();
- pathButtonLayout.marginHeight = 0;
- pathButtonLayout.marginWidth = 0;
- pathButtonComp.setLayout(pathButtonLayout);
- gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.HORIZONTAL_ALIGN_FILL);
- pathButtonComp.setLayoutData(gd);
- pathButtonComp.setFont(font);
-
- createButton(pathButtonComp, new AddWorkspaceFileAction(stylesheetViewer));
- createButton(pathButtonComp, new AddExternalFileAction(stylesheetViewer, DIALOG_SETTINGS_PREFIX));
- createButton(pathButtonComp, new RemoveAction(stylesheetViewer));
- }
-
- public Viewer getStylesheetViewer()
- {
- return stylesheetViewer == null ? null : stylesheetViewer.getViewer();
- }
-
- protected Button createArrowButton(Composite pathButtonComp, AbstractStylesheetAction action, int updown)
- {
- Button b = new Button(pathButtonComp, SWT.ARROW | updown);
- GridData gd = new GridData();
- b.setLayoutData(gd);
- action.setButton(b);
- return b;
- }
-
- protected Button createButton(Composite pathButtonComp, AbstractStylesheetAction action)
- {
- Button button = createPushButton(pathButtonComp, action.getText(), null);
- action.setButton(button);
- return button;
- }
-
- public String getName()
- {
- return Messages.TransformsBlock_Name;
- }
-
- public void setPipeline(LaunchPipeline pipeline)
- {
- this.pipeline = pipeline;
- }
-
- public void initializeFrom(ILaunchConfiguration configuration)
- {
- stylesheetViewer.getViewer().setInput(pipeline);
- if (pipeline.getTransformDefs().size() > 0)
- {
- stylesheetViewer.getViewer().setSelection(new StructuredSelection(pipeline.getTransformDefs().get(0)));
- }
- }
-
- public void performApply(ILaunchConfigurationWorkingCopy configuration)
- {
- }
-
- public void setDefaults(ILaunchConfigurationWorkingCopy configuration)
- {
- }
-
- public void entriesChanged(StylesheetViewer viewer)
- {
- setDirty(true);
- updateLaunchConfigurationDialog();
- }
-
- @Override
- protected void setSortColumn(int column)
- {
- switch (column)
- {
- // case 1:
- // sortByName();
- // break;
- // case 2:
- // sortByType();
- // break;
- }
- super.setSortColumn(column);
- }
-
- @Override
- protected Table getTable()
- {
- return stylesheetViewer == null ? null : stylesheetViewer.getViewer().getTable();
- }
-
- @Override
- protected IDialogSettings getDialogSettings()
- {
- return XSLDebugUIPlugin.getDefault().getDialogSettings();
- }
-
- @Override
- protected String getQualifier()
- {
- return XSLDebugUIConstants.MAIN_TRANSFORMS_BLOCK;
- }
-
- @Override
- public void dispose()
- {
- if (stylesheetViewer != null)
- stylesheetViewer.removeEntriesChangedListener(this);
- super.dispose();
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/XSLMainTab.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/XSLMainTab.java
deleted file mode 100644
index 5c353d4..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/main/XSLMainTab.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007,2008 Chase Technology Ltd - http://www.chasetechnology.co.uk and others
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- * David Carver - STAR - bug 223557 - Added Images contributed by Holger Voorman
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui.tabs.main;
-
-import java.io.ByteArrayInputStream;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.ui.ILaunchConfigurationTab;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.wst.xsl.core.XSLCore;
-import org.eclipse.wst.xsl.debug.internal.util.XSLDebugPluginImages;
-import org.eclipse.wst.xsl.debug.internal.util.XSLPluginImageHelper;
-import org.eclipse.wst.xsl.internal.debug.ui.Messages;
-import org.eclipse.wst.xsl.internal.debug.ui.XSLDebugUIPlugin;
-import org.eclipse.wst.xsl.internal.debug.ui.XSLLaunchConfigurationTab;
-import org.eclipse.wst.xsl.launching.XSLLaunchConfigurationConstants;
-import org.eclipse.wst.xsl.launching.config.LaunchPipeline;
-import org.eclipse.wst.xsl.launching.config.LaunchTransform;
-
-public class XSLMainTab extends XSLLaunchConfigurationTab
-{
- private final InputFileBlock inputFileBlock;
- private final TransformsBlock transformsBlock;
- private final ParametersBlock parametersBlock;
- public LaunchPipeline pipeline;
-
- // private RenderBlock renderBlock;
- // private OutputBlock outputBlock;
-
- public XSLMainTab()
- {
- IResource[] resourceContext = getContext();
- IFile inputFile = getXMLInput(resourceContext);
-
- inputFileBlock = new InputFileBlock(inputFile);
- transformsBlock = new TransformsBlock();
- parametersBlock = new ParametersBlock(transformsBlock);
- // renderBlock = new RenderBlock();
- // outputBlock = new OutputBlock();
-
- setBlocks(new ILaunchConfigurationTab[]
- { inputFileBlock, transformsBlock, parametersBlock }); // ,renderBlock,outputBlock});
- }
-
- @Override
- public void createControl(Composite parent)
- {
- super.createControl(parent);
- Composite comp = (Composite) getControl();
- GridLayout layout = new GridLayout(1, false);
- comp.setLayout(layout);
-
- inputFileBlock.createControl(comp);
- transformsBlock.createControl(comp);
- parametersBlock.createControl(comp);
- // renderBlock.createControl(comp);
- // outputBlock.createControl(comp);
- }
-
- @Override
- public void setDefaults(ILaunchConfigurationWorkingCopy configuration)
- {
- LaunchPipeline lp = new LaunchPipeline();
- IResource[] resourceContext = getContext();
- IFile[] stylesheets = getXSLStylesheets(resourceContext);
- for (IFile file : stylesheets)
- {
- LaunchTransform lt = new LaunchTransform(file.getFullPath().toPortableString(), LaunchTransform.RESOURCE_TYPE);
- lp.addTransformDef(lt);
- }
- savePipeline(configuration, lp);
- super.setDefaults(configuration);
- }
-
- @Override
- public void initializeFrom(ILaunchConfiguration configuration)
- {
- pipeline = null;
- try
- {
- String s = configuration.getAttribute(XSLLaunchConfigurationConstants.ATTR_PIPELINE, (String) null);
- if (s != null && s.length() > 0)
- {
- ByteArrayInputStream inputStream = new ByteArrayInputStream(s.getBytes());
- pipeline = LaunchPipeline.fromXML(inputStream);
- }
- else
- {
- pipeline = new LaunchPipeline();
- }
- }
- catch (CoreException e)
- {
- XSLDebugUIPlugin.log(e);
- }
- transformsBlock.setPipeline(pipeline);
- super.initializeFrom(configuration);
- }
-
- @Override
- public void performApply(ILaunchConfigurationWorkingCopy configuration)
- {
- super.performApply(configuration);
- savePipeline(configuration, pipeline);
- }
-
- private void savePipeline(ILaunchConfigurationWorkingCopy configuration, LaunchPipeline pipeline)
- {
- try
- {
- configuration.setAttribute(XSLLaunchConfigurationConstants.ATTR_PIPELINE, pipeline.toXML());
- }
- catch (CoreException e)
- {
- XSLDebugUIPlugin.log(e);
- }
- }
-
- public String getName()
- {
- return Messages.XSLMainTab_TabName;
- }
-
- private static IResource[] getContext()
- {
-
- // IProject[] projects =
- // ResourcesPlugin.getWorkspace().getRoot().getProjects();
- // project.setInput( projects);
- // String s = configuration.getAttribute(
- // IXSLTLaunchConfiguration.PROJECT, "");
- // IProject project = null;
- // if( s.equals(""))
- // {
- // if( projects.length>0)
- // {
- // project = projects[ 0];
- // }
- // }
- // else
- // project = ResourcesPlugin.getWorkspace().getRoot().getProject( s);
-
- IWorkbenchPage page = XSLDebugUIPlugin.getActivePage();
- List<Object> resources = new ArrayList<Object>();
- if (page != null)
- {
- // use selections to find the project
- ISelection selection = page.getSelection();
- if (selection != null && !selection.isEmpty() && selection instanceof IStructuredSelection)
- {
- IStructuredSelection ss = (IStructuredSelection) selection;
- for (Iterator<?> iter = ss.iterator(); iter.hasNext();)
- {
- Object element = iter.next();
- if (element instanceof IResource)
- resources.add(element);
- }
- return resources.toArray(new IResource[0]);
- }
- // use current editor to find the project
- IEditorPart part = page.getActiveEditor();
- if (part != null)
- {
- IEditorInput input = part.getEditorInput();
- IFile file = (IFile) input.getAdapter(IFile.class);
- if (file != null)
- return new IResource[]
- { file };
- }
- }
- return new IResource[0];
- }
-
- private IFile getXMLInput(IResource[] context)
- {
- for (IResource resource : context)
- {
- if (resource instanceof IFile && ("xml".equalsIgnoreCase(resource.getFileExtension()) || "xhtml".equalsIgnoreCase(resource.getFileExtension()))) //$NON-NLS-1$ //$NON-NLS-2$
- return (IFile) resource;
- }
- return null;
- }
-
- private IFile[] getXSLStylesheets(IResource[] context)
- {
- List<IResource> stylesheets = new ArrayList<IResource>();
- for (IResource resource : context)
- {
- if (resource instanceof IFile && XSLCore.isXSLFile((IFile)resource))
- stylesheets.add(resource);
- }
- return stylesheets.toArray(new IFile[0]);
-
- }
-
- @Override
- public Image getImage() {
- return XSLPluginImageHelper.getInstance().getImage(XSLDebugPluginImages.IMG_MAIN_TAB);
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/output/OutputFileBlock.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/output/OutputFileBlock.java
deleted file mode 100644
index f938688..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/output/OutputFileBlock.java
+++ /dev/null
@@ -1,297 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui.tabs.output;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.wst.xsl.internal.debug.ui.Messages;
-import org.eclipse.wst.xsl.internal.debug.ui.ResourceSelectionBlock;
-import org.eclipse.wst.xsl.internal.debug.ui.XSLDebugUIPlugin;
-import org.eclipse.wst.xsl.launching.XSLLaunchConfigurationConstants;
-import org.eclipse.wst.xsl.launching.XSLTRuntime;
-
-public class OutputFileBlock extends ResourceSelectionBlock
-{
- private Button openFileCheckButton;
- private Button formatFileCheckButton;
- private String inputFilename;
- private Text fileNameText;
- private String defaultOutputFileName;
- private String outputFileName;
-
- public OutputFileBlock()
- {
- super(IResource.FOLDER, true, true, false);
- }
-
- @Override
- protected String getMessage(int type)
- {
- switch (type)
- {
- case ERROR_DIRECTORY_NOT_SPECIFIED:
- return Messages.OutputFOFileBlock_DIRECTORY_NOT_SPECIFIED;
- case ERROR_DIRECTORY_DOES_NOT_EXIST:
- return Messages.OutputFOFileBlock_DIRECTORY_DOES_NOT_EXIST;
- case GROUP_NAME:
- return getName();
- case USE_DEFAULT_RADIO:
- return Messages.OutputFileBlock_0;
- case USE_OTHER_RADIO:
- return Messages.OutputFOFileBlock_OTHER_RADIO;
- case DIRECTORY_DIALOG_MESSAGE:
- return Messages.OutputFOFileBlock_DIALOG_MESSAGE;
- case WORKSPACE_DIALOG_MESSAGE:
- return Messages.OutputFOFileBlock_WORKSPACE_DIALOG_MESSAGE;
- case VARIABLES_BUTTON:
- return Messages.OutputFOFileBlock_VARIABLES_BUTTON;
- case FILE_SYSTEM_BUTTON:
- return Messages.OutputFOFileBlock_FILE_SYSTEM_BUTTON;
- case WORKSPACE_BUTTON:
- return Messages.OutputFOFileBlock_WORKSPACE_BUTTON;
- case WORKSPACE_DIALOG_TITLE:
- return Messages.OutputFOFileBlock_WORKSPACE_DIALOG_TITLE;
- }
- return "" + type; //$NON-NLS-1$
- }
-
- @Override
- protected void createCheckboxAndText(Composite parent)
- {
- if (showDefault)
- {
- useDefaultCheckButton = createCheckButton(parent, getMessage(USE_DEFAULT_RADIO));
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- gd.horizontalSpan = 2;
- useDefaultCheckButton.setLayoutData(gd);
- useDefaultCheckButton.addSelectionListener(widgetListener);
- }
-
- Composite specificFileComp = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout(2, false);
- layout.marginWidth = 0;
- if (showDefault)
- layout.marginLeft = 20;
- else
- layout.marginLeft = 0;
- layout.marginHeight = 0;
- specificFileComp.setLayout(layout);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- specificFileComp.setLayoutData(gd);
-
- Label label = new Label(specificFileComp, SWT.NONE);
- label.setText("Filename");
-
- fileNameText = new Text(specificFileComp, SWT.SINGLE | SWT.BORDER);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = showDefault ? 1 : 2;
- fileNameText.setLayoutData(gd);
- fileNameText.setFont(parent.getFont());
- fileNameText.addModifyListener(widgetListener);
-
- if (showDefault)
- {
- label = new Label(specificFileComp, SWT.NONE);
- label.setText(Messages.OutputFileBlock_7);
- }
-
- resourceText = new Text(specificFileComp, SWT.SINGLE | SWT.BORDER);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = showDefault ? 1 : 2;
- resourceText.setLayoutData(gd);
- resourceText.setFont(parent.getFont());
- resourceText.addModifyListener(widgetListener);
- }
-
- @Override
- protected void createButtons(Composite parent)
- {
- Composite checkComposite = new Composite(parent,SWT.NONE);
- checkComposite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
- GridLayout gl = new GridLayout();
- gl.marginWidth = 0;
- checkComposite.setLayout(gl);
-
- openFileCheckButton = createCheckButton(checkComposite, Messages.OutputFileBlock_8);
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- gd.horizontalSpan = 1;
- openFileCheckButton.setLayoutData(gd);
- openFileCheckButton.addSelectionListener(new SelectionListener()
- {
-
- public void widgetDefaultSelected(SelectionEvent e)
- {
- }
-
- public void widgetSelected(SelectionEvent e)
- {
- if (openFileCheckButton.getSelection())
- {
- formatFileCheckButton.setEnabled(true);
- updateLaunchConfigurationDialog();
- }
- else
- {
- formatFileCheckButton.setEnabled(false);
- formatFileCheckButton.setSelection(false);
- }
- }
- });
-
- formatFileCheckButton = createCheckButton(checkComposite, "Format file on completion");
- gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- gd.horizontalSpan = 1;
- formatFileCheckButton.setLayoutData(gd);
- formatFileCheckButton.addSelectionListener(new SelectionListener()
- {
-
- public void widgetDefaultSelected(SelectionEvent e)
- {
- }
-
- public void widgetSelected(SelectionEvent e)
- {
- updateLaunchConfigurationDialog();
- }
- });
-
- Composite buttonComp = new Composite(parent, SWT.TOP);
- GridLayout layout = new GridLayout(3, false);
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- buttonComp.setLayout(layout);
- gd = new GridData(GridData.HORIZONTAL_ALIGN_END | GridData.VERTICAL_ALIGN_BEGINNING);
- gd.horizontalSpan = 1;
- buttonComp.setLayoutData(gd);
- buttonComp.setFont(parent.getFont());
-
- fWorkspaceButton = createPushButton(buttonComp, getMessage(WORKSPACE_BUTTON), null);
- fWorkspaceButton.addSelectionListener(widgetListener);
-
- fFileSystemButton = createPushButton(buttonComp, getMessage(FILE_SYSTEM_BUTTON), null);
- fFileSystemButton.addSelectionListener(widgetListener);
-
- fVariablesButton = createPushButton(buttonComp, getMessage(VARIABLES_BUTTON), null);
- fVariablesButton.addSelectionListener(widgetListener);
- }
-
- public String getName()
- {
- return Messages.OutputFileBlock_9;
- }
-
- public void initializeFrom(ILaunchConfiguration configuration)
- {
- try
- {
- inputFilename = configuration.getAttribute(XSLLaunchConfigurationConstants.ATTR_INPUT_FILE, ""); //$NON-NLS-1$
- updateDefaultOutputFile();
-
- boolean useDefault = configuration.getAttribute(XSLLaunchConfigurationConstants.ATTR_USE_DEFAULT_OUTPUT_FILE, true);
- useDefaultCheckButton.setSelection(useDefault);
-
- outputFileName = configuration.getAttribute(XSLLaunchConfigurationConstants.ATTR_OUTPUT_FILENAME, defaultOutputFileName);
- resource = configuration.getAttribute(XSLLaunchConfigurationConstants.ATTR_OUTPUT_FOLDER, defaultResource);
-
- updateResourceText(useDefault);
-
- boolean openFileOnCompletion = configuration.getAttribute(XSLLaunchConfigurationConstants.ATTR_OPEN_FILE, true);
- openFileCheckButton.setSelection(openFileOnCompletion);
-
- boolean formatFileOnCompletion = configuration.getAttribute(XSLLaunchConfigurationConstants.ATTR_FORMAT_FILE, false);
- formatFileCheckButton.setSelection(formatFileOnCompletion);
- }
- catch (CoreException e)
- {
- XSLDebugUIPlugin.log(e);
- }
- }
-
- public void performApply(ILaunchConfigurationWorkingCopy configuration)
- {
- boolean useDefault = useDefaultCheckButton.getSelection();
- configuration.setAttribute(XSLLaunchConfigurationConstants.ATTR_USE_DEFAULT_OUTPUT_FILE, useDefault);
-
- String outputFile = resourceText.getText();
- configuration.setAttribute(XSLLaunchConfigurationConstants.ATTR_OUTPUT_FOLDER, outputFile);
-
- String outputFileName = fileNameText.getText();
- configuration.setAttribute(XSLLaunchConfigurationConstants.ATTR_OUTPUT_FILENAME, outputFileName);
-
- boolean openFileOnCompletion = openFileCheckButton.getSelection();
- configuration.setAttribute(XSLLaunchConfigurationConstants.ATTR_OPEN_FILE, openFileOnCompletion);
-
- boolean formatFileOnCompletion = formatFileCheckButton.getSelection();
- configuration.setAttribute(XSLLaunchConfigurationConstants.ATTR_FORMAT_FILE, formatFileOnCompletion);
- }
-
- public void setDefaults(ILaunchConfigurationWorkingCopy configuration)
- {
- configuration.setAttribute(XSLLaunchConfigurationConstants.ATTR_USE_DEFAULT_OUTPUT_FILE, true);
- configuration.setAttribute(XSLLaunchConfigurationConstants.ATTR_OUTPUT_FOLDER, (String)null);
- configuration.setAttribute(XSLLaunchConfigurationConstants.ATTR_OUTPUT_FILENAME, (String)null);
- configuration.setAttribute(XSLLaunchConfigurationConstants.ATTR_OPEN_FILE, true);
- configuration.setAttribute(XSLLaunchConfigurationConstants.ATTR_FORMAT_FILE, false);
- }
-
- @Override
- protected void updateResourceText(boolean useDefault)
- {
- fileNameText.setEnabled(!useDefault);
- if (useDefault)
- fileNameText.setText(defaultOutputFileName == null ? "" : defaultOutputFileName); //$NON-NLS-1$
- else
- fileNameText.setText(outputFileName == null ? defaultOutputFileName : outputFileName);
- super.updateResourceText(useDefault);
- }
-
- private void updateDefaultOutputFile()
- {
- try
- {
- IPath path = XSLTRuntime.defaultOutputFileForInputFile(inputFilename);
- // determine whether this path exists in the workspace
- IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(path);
- if (files.length > 0)
- {// inside workspace
- IPath p = new Path(files[0].getProject().getName());
- p.append(files[0].getParent().getProjectRelativePath());
- defaultResource = "${workspace_loc:/"+p.toString()+"}";
- }
- else
- {// outside workspace
- IPath p = path.removeLastSegments(1);
- defaultResource = p.toOSString();
- }
- defaultOutputFileName = path.lastSegment();
- }
- catch (CoreException e)
- {
- // do nothing
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/output/OutputTab.java b/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/output/OutputTab.java
deleted file mode 100644
index 4434c1a..0000000
--- a/bundles/org.eclipse.wst.xsl.debug.ui/src/org/eclipse/wst/xsl/internal/debug/ui/tabs/output/OutputTab.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.internal.debug.ui.tabs.output;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.ui.ILaunchConfigurationTab;
-import org.eclipse.debug.ui.WorkingDirectoryBlock;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.wst.xsl.debug.internal.util.XSLDebugPluginImages;
-import org.eclipse.wst.xsl.debug.internal.util.XSLPluginImageHelper;
-import org.eclipse.wst.xsl.internal.debug.ui.Messages;
-import org.eclipse.wst.xsl.internal.debug.ui.XSLLaunchConfigurationTab;
-import org.eclipse.wst.xsl.internal.debug.ui.tabs.main.XSLMainTab;
-import org.eclipse.wst.xsl.launching.XSLLaunchConfigurationConstants;
-
-public class OutputTab extends XSLLaunchConfigurationTab
-{
- private final OutputFileBlock outputFileBlock;
- private final WorkingDirectoryBlock workingDirectoryBlock;
-
- public OutputTab(XSLMainTab main)
- {
- outputFileBlock = new OutputFileBlock();
- workingDirectoryBlock = new WorkingDirectoryBlock(XSLLaunchConfigurationConstants.ATTR_WORKING_DIR){
- @Override
- protected IProject getProject(ILaunchConfiguration configuration) throws CoreException
- {
- // TODO Auto-generated method stub
- return null;
- }
- };
-
- setBlocks(new ILaunchConfigurationTab[]{ outputFileBlock,workingDirectoryBlock });
- }
-
- @Override
- public void createControl(Composite parent)
- {
- super.createControl(parent);
- Composite comp = (Composite) getControl();
- GridLayout layout = new GridLayout(1, false);
- comp.setLayout(layout);
-
- outputFileBlock.createControl(comp);
-
- workingDirectoryBlock.createControl(comp);
-
-
-
-// Group group = new Group(comp, SWT.NULL);
-// group.setText(Messages.OutputTab_0);
-// GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
-// group.setLayoutData(gd);
-// layout = new GridLayout(2, false);
-// group.setLayout(layout);
-
-// outputBlock.createControl(group);
- }
-
- @Override
- public String getId()
- {
- return "org.eclipse.wst.xsl.internal.debug.ui.tabs.output";
- }
-
- public String getName()
- {
- return Messages.OutputTab_1;
- }
-
- @Override
- public Image getImage() {
- return XSLPluginImageHelper.getInstance().getImage(XSLDebugPluginImages.IMG_OUTPUT_TAB);
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/.classpath b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/.classpath
deleted file mode 100644
index 88c91a8..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/.classpath
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
- <accessrules>
- <accessrule kind="accessible" pattern="org/eclipse/wst/xsl/internal/**"/>
- <accessrule kind="accessible" pattern="org/eclipse/wst/xsl/ui/internal/**"/>
- </accessrules>
- </classpathentry>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/.project b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/.project
deleted file mode 100644
index 6a6f79d..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.xsl.jaxp.debug.ui</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f455492..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,20 +0,0 @@
-#Tue Feb 10 05:26:00 GMT 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index aa814b3..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,29 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.wst.xsl.jaxp.debug.ui;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.wst.xsl.jaxp.debug.ui.internal.JAXPDebugUIPlugin
-Bundle-Vendor: %vendorName
-Require-Bundle: org.eclipse.ui;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.debug.ui;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.wst.xsl.debug.ui;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.ui.ide;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.wst.xsl.launching;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.wst.xsl.jaxp.launching;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.jface.text;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.wst.sse.ui;bundle-version="[1.1.0,2.0.0)",
- org.eclipse.wst.xsl.ui;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.wst.sse.core;bundle-version="[1.1.300,2.0.0)",
- org.eclipse.wst.xml.core;bundle-version="[1.1.300,2.0.0)",
- org.eclipse.ui.workbench.texteditor;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.wst.xml.ui;bundle-version="[1.0.400,2.0.0)",
- org.eclipse.jdt.debug.ui;bundle-version="[3.3.0,4.0.0)"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
-Export-Package: org.eclipse.wst.xsl.jaxp.debug.ui.internal;x-internal:=true,
- org.eclipse.wst.xsl.jaxp.debug.ui.internal.preferences;x-internal:=true,
- org.eclipse.wst.xsl.jaxp.debug.ui.internal.tabs.processor;x-internal:=true,
- org.eclipse.wst.xsl.jaxp.debug.ui.internal.views;x-internal:=true
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/about.html b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/about.html
deleted file mode 100644
index ed30003..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/about.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<HTML>
-
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-
-<BODY lang="EN-US">
-
-<H3>About This Content</H3>
-
-<P>August, 2008</P>
-
-<H3>License</H3>
-
-<P>The Eclipse Foundation makes available all content in this plug-in
-("Content"). Unless otherwise indicated below, the Content is provided to you
-under the terms and conditions of the Eclipse Public License Version 1.0
-("EPL"). A copy of the EPL is available at
-<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
-For purposes of the EPL, "Program" will mean the Content.</P>
-
-<P>If you did not receive this Content directly from the Eclipse Foundation, the
-Content is being redistributed by another party ("Redistributor") and different
-terms and conditions may apply to your use of any object code in the Content.
-Check the Redistributor’s license that was provided with the Content. If no such
-license exists, contact the Redistributor. Unless otherwise indicated below, the
-terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at
-<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P>
-
-</BODY>
-</HTML>
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/build.properties b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/build.properties
deleted file mode 100644
index 647fcc0..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- about.html,\
- icons/,\
- plugin.properties
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/icons/xslt_processor.gif b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/icons/xslt_processor.gif
deleted file mode 100644
index 5e71289..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/icons/xslt_processor.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/plugin.properties b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/plugin.properties
deleted file mode 100644
index 6a9c3a7..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/plugin.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-#Properties file for org.eclipse.wst.xsl.jaxp.debug.ui
-vendorName = Eclipse.org
-pluginName = XSL JAXP Debug UI
-pageNameJavaProcessors = Java Processors
-viewNameResult = Result \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/plugin.xml b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/plugin.xml
deleted file mode 100644
index af972da..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/plugin.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension point="org.eclipse.debug.ui.launchConfigurationTabs">
- <tab
- class="org.eclipse.wst.xsl.jaxp.debug.ui.internal.tabs.processor.XSLProcessorTab2"
- group="org.eclipse.wst.xsl.internal.debug.ui.launchConfigurationTabGroup.xslt"
- id="org.eclipse.wst.xsl.debug.ui.jaxp.tabs.processor" name="Processor">
- <associatedDelegate
- delegate="org.eclipse.wst.xsl.launching.internal.jaxp.JAXPLaunchConfigurationDelegate">
- </associatedDelegate>
- <placement after="org.eclipse.wst.xsl.internal.debug.ui.tabs.output">
- </placement>
- </tab>
- <tab class="org.eclipse.jdt.debug.ui.launchConfigurations.JavaJRETab"
- group="org.eclipse.wst.xsl.internal.debug.ui.launchConfigurationTabGroup.xslt"
- id="org.eclipse.jdt.debug.ui.javaJRETab" name="JRE">
- <associatedDelegate
- delegate="org.eclipse.wst.xsl.launching.internal.jaxp.JAXPLaunchConfigurationDelegate">
- </associatedDelegate>
- <placement after="org.eclipse.wst.xsl.debug.ui.jaxp.tabs.processor">
- </placement>
- </tab>
- <tab class="org.eclipse.jdt.debug.ui.launchConfigurations.JavaClasspathTab"
- group="org.eclipse.wst.xsl.internal.debug.ui.launchConfigurationTabGroup.xslt"
- id="org.eclipse.jdt.debug.ui.javaClasspathTab" name="Classpath">
- <associatedDelegate
- delegate="org.eclipse.wst.xsl.launching.internal.jaxp.JAXPLaunchConfigurationDelegate">
- </associatedDelegate>
- <placement after="org.eclipse.jdt.debug.ui.javaJRETab">
- </placement>
- </tab>
- </extension>
- <extension point="org.eclipse.ui.preferencePages">
- <page category="org.eclipse.wst.xsl.ui.preferences.BasePreferencePage"
- class="org.eclipse.wst.xsl.jaxp.debug.ui.internal.preferences.ProcessorsPreferencePage"
- id="org.eclipse.wst.xsl.ui.preferences.java" name="%pageNameJavaProcessors">
- </page>
- </extension>
- <extension
- point="org.eclipse.ui.views">
- <view
- class="org.eclipse.wst.xsl.jaxp.debug.ui.internal.views.ResultView"
- id="org.eclipse.wst.xsl.jaxp.debug.ui.resultview"
- name="%viewNameResult"
- category="org.eclipse.wst.xml">
- </view>
- </extension>
- <extension
- point="org.eclipse.ui.perspectiveExtensions">
- <perspectiveExtension
- targetID="org.eclipse.debug.ui.DebugPerspective">
- <view
- id="org.eclipse.wst.xsl.jaxp.debug.ui.view1"
- minimized="false"
- relationship="stack"
- relative="org.eclipse.ui.console.ConsoleView"
- visible="false">
- </view>
- </perspectiveExtension>
- </extension>
-
- <extension point="org.eclipse.debug.ui.contextViewBindings">
- <contextViewBinding
- contextId="org.eclipse.wst.xsl.debug.ui.context"
- viewId="org.eclipse.wst.xsl.jaxp.debug.ui.resultview">
- </contextViewBinding>
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/JAXPDebugUIPlugin.java b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/JAXPDebugUIPlugin.java
deleted file mode 100644
index 182d3e5..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/JAXPDebugUIPlugin.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.eclipse.wst.xsl.jaxp.debug.ui.internal;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class JAXPDebugUIPlugin extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.wst.xsl.jaxp.debug.ui";
-
- // The shared instance
- private static JAXPDebugUIPlugin plugin;
-
- /**
- * The constructor
- */
- public JAXPDebugUIPlugin() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static JAXPDebugUIPlugin getDefault() {
- return plugin;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/preferences/AddProcessorDialog.java b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/preferences/AddProcessorDialog.java
deleted file mode 100644
index f9b92b1..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/preferences/AddProcessorDialog.java
+++ /dev/null
@@ -1,384 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.ui.internal.preferences;
-
-import java.io.File;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.StatusDialog;
-import org.eclipse.jface.viewers.ComboViewer;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.wst.xsl.internal.debug.ui.XSLDebugUIPlugin;
-import org.eclipse.wst.xsl.jaxp.debug.ui.internal.tabs.processor.InstallStandin;
-import org.eclipse.wst.xsl.jaxp.launching.IDebugger;
-import org.eclipse.wst.xsl.jaxp.launching.IProcessorInstall;
-import org.eclipse.wst.xsl.jaxp.launching.IProcessorJar;
-import org.eclipse.wst.xsl.jaxp.launching.IProcessorType;
-import org.eclipse.wst.xsl.jaxp.launching.JAXPRuntime;
-
-public class AddProcessorDialog extends StatusDialog
-{
- private final InstallStandin standinProcessor;
- private final IProcessorType[] processorTypes;
- private IProcessorType selectedProcessorType;
- private ComboViewer processorTypeField;
- private ProcessorLibraryBlock fLibraryBlock;
- private Text processorNameField;
- private final IStatus[] fStati;
- private int fPrevIndex = -1;
- private final InstalledProcessorsBlock block;
- private boolean adding;
-
- public AddProcessorDialog(InstalledProcessorsBlock block, Shell parent, IProcessorType[] types, IProcessorInstall install)
- {
- super(parent);
- setShellStyle(getShellStyle() | SWT.RESIZE);
- this.block = block;
- fStati = new IStatus[5];
- for (int i = 0; i < fStati.length; i++)
- {
- fStati[i] = Status.OK_STATUS;
- }
- processorTypes = types;
- selectedProcessorType = install != null ? install.getProcessorType() : types[0];
- InstallStandin standin = null;
- if (install == null)
- {
- adding = true;
- standin = new InstallStandin(JAXPRuntime.createUniqueProcessorId(selectedProcessorType), "", selectedProcessorType.getId(), null, new IProcessorJar[0]); //$NON-NLS-1$
- }
- else
- {
- standin = new InstallStandin(install);
- }
- standinProcessor = standin;
- }
-
- @Override
- protected void configureShell(Shell newShell)
- {
- super.configureShell(newShell);
- // TODO PlatformUI.getWorkbench().getHelpSystem().setHelp...
- }
-
- protected void createDialogFields(Composite parent)
- {
- GridData gd;
- Label label;
-
- label = new Label(parent, SWT.NONE);
- label.setText(Messages.AddProcessorDialog_processorName);
- processorNameField = new Text(parent, SWT.BORDER);
- gd = new GridData(SWT.NONE, SWT.NONE, false, false);
- gd.widthHint = convertWidthInCharsToPixels(50);
- gd.horizontalSpan = 2;
- processorNameField.setLayoutData(gd);
-
- label = new Label(parent, SWT.NONE);
- label.setText(Messages.AddProcessorDialog_processorType);
- processorTypeField = new ComboViewer(parent, SWT.READ_ONLY);
- gd = new GridData();
- gd.horizontalSpan = 2;
- processorTypeField.getCombo().setLayoutData(gd);
- processorTypeField.setContentProvider(new IStructuredContentProvider()
- {
-
- private Object input;
-
- public Object[] getElements(Object inputElement)
- {
- return (IProcessorType[]) input;
- }
-
- public void dispose()
- {
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput)
- {
- input = newInput;
- }
- });
- processorTypeField.setLabelProvider(new LabelProvider()
- {
- @Override
- public String getText(Object element)
- {
- return ((IProcessorType) element).getLabel();
- }
- });
-
- }
-
- protected void createFieldListeners()
- {
- processorTypeField.addSelectionChangedListener(new ISelectionChangedListener()
- {
- public void selectionChanged(SelectionChangedEvent event)
- {
- updateProcessorType();
- }
- });
-
- processorNameField.addModifyListener(new ModifyListener()
- {
- public void modifyText(ModifyEvent e)
- {
- setProcessorNameStatus(validateProcessorName());
- updateStatusLine();
- }
- });
- }
-
- protected String getProcessorName()
- {
- return processorNameField.getText();
- }
-
- @Override
- protected Control createDialogArea(Composite ancestor)
- {
- Composite parent = (Composite) super.createDialogArea(ancestor);
- ((GridLayout) parent.getLayout()).numColumns = 3;
-// ((GridData) parent.getLayoutData()).heightHint = 400;
-// ((GridData) parent.getLayoutData()).widthHint = 400;
-
- createDialogFields(parent);
-
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.AddProcessorDialog_jars);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 3;
- l.setLayoutData(gd);
-
- fLibraryBlock = new ProcessorLibraryBlock(this);
- Control block = fLibraryBlock.createControl(parent);
- gd = new GridData(GridData.FILL_BOTH);
- gd.horizontalSpan = 3;
- block.setLayoutData(gd);
-
- initializeFields();
- createFieldListeners();
- applyDialogFont(parent);
-
- return parent;
- }
-
- private void updateProcessorType()
- {
- int selIndex = processorTypeField.getCombo().getSelectionIndex();
- if (selIndex == fPrevIndex)
- {
- return;
- }
- fPrevIndex = selIndex;
- if (selIndex >= 0 && selIndex < processorTypes.length)
- {
- selectedProcessorType = processorTypes[selIndex];
- }
- fLibraryBlock.initializeFrom(standinProcessor, selectedProcessorType);
- updateStatusLine();
- }
-
- @Override
- public void create()
- {
- super.create();
- processorNameField.setFocus();
- }
-
- private void initializeFields()
- {
- processorTypeField.setInput(processorTypes);
- if (adding)
- {
- processorNameField.setText(""); //$NON-NLS-1$
- processorTypeField.setSelection(new StructuredSelection(processorTypes[0]));
- fLibraryBlock.initializeFrom(standinProcessor, selectedProcessorType);
- }
- else
- {
- processorTypeField.getCombo().setEnabled(false);
- processorTypeField.setSelection(new StructuredSelection(standinProcessor.getProcessorType()));
- processorNameField.setText(standinProcessor.getName());
-
- fLibraryBlock.initializeFrom(standinProcessor, selectedProcessorType);
- }
- setProcessorNameStatus(validateProcessorName());
- updateStatusLine();
- }
-
- private IStatus validateProcessorName()
- {
- IStatus status = Status.OK_STATUS;
- String name = processorNameField.getText();
- if (name == null || name.trim().length() == 0)
- {
- status = new Status(IStatus.INFO, XSLDebugUIPlugin.PLUGIN_ID, IStatus.OK, Messages.AddProcessorDialog_enterName, null);
- }
- else
- {
- if (block.isDuplicateName(name) && (standinProcessor == null || !name.equals(standinProcessor.getName())))
- {
- status = new Status(IStatus.ERROR, XSLDebugUIPlugin.PLUGIN_ID, IStatus.OK, Messages.AddProcessorDialog_duplicateName, null);
- }
- else
- {
- // IStatus s = ResourcesPlugin.getWorkspace().validateName(name,
- // IResource.FILE);
- // if (!s.isOK())
- // {
- // status.setError(MessageFormat.format(Messages.AddProcessorDialog_Processor_name_must_be_a_valid_file_name,
- // new String[]
- // { s.getMessage() }));
- // }
- }
- }
- return status;
- }
-
- protected IStatus validateVersionStatus()
- {
- IStatus status = Status.OK_STATUS;
- return status;
- }
-
- protected void updateStatusLine()
- {
- IStatus max = null;
- for (IStatus curr : fStati)
- {
- if (curr.matches(IStatus.ERROR))
- {
- updateStatus(curr);
- return;
- }
- if (max == null || curr.getSeverity() > max.getSeverity())
- {
- max = curr;
- }
- }
- updateStatus(max);
- }
-
- @Override
- protected void okPressed()
- {
- doOkPressed();
- super.okPressed();
- }
-
- private void doOkPressed()
- {
- if (adding)
- {
- setFieldValuesToProcessor(standinProcessor);
- block.processorAdded(standinProcessor);
- }
-// else
-// setFieldValuesToProcessor((ProcessorInstall)editedProcessor);
- }
-
- protected void setFieldValuesToProcessor(InstallStandin processor)
- {
- processor.setName(processorNameField.getText());
- processor.setProcessorTypeId(selectedProcessorType.getId());
-
- IDebugger[] debuggers = JAXPRuntime.getDebuggers();
- for (IDebugger element : debuggers)
- {
- if (element.getProcessorType().equals(selectedProcessorType))
- processor.setDebuggerId(element.getId());
- }
-
- fLibraryBlock.performApply(processor);
- }
-
- protected File getAbsoluteFileOrEmpty(String path)
- {
- if (path == null || path.length() == 0)
- {
- return new File(""); //$NON-NLS-1$
- }
- return new File(path).getAbsoluteFile();
- }
-
- private void setProcessorNameStatus(IStatus status)
- {
- fStati[0] = status;
- }
-
- protected IStatus getSystemLibraryStatus()
- {
- return fStati[3];
- }
-
- protected void setSystemLibraryStatus(IStatus status)
- {
- fStati[3] = status;
- }
-
- protected void setVersionStatus(IStatus status)
- {
- fStati[2] = status;
- }
-
- @Override
- protected void updateButtonsEnableState(IStatus status)
- {
- Button ok = getButton(IDialogConstants.OK_ID);
- if (ok != null && !ok.isDisposed())
- ok.setEnabled(status.getSeverity() == IStatus.OK);
- }
-
- @Override
- protected void setButtonLayoutData(Button button)
- {
- super.setButtonLayoutData(button);
- }
-
- protected String getDialogSettingsSectionName()
- {
- return "ADD_PROCESSOR_DIALOG_SECTION"; //$NON-NLS-1$
- }
-
- @Override
- protected IDialogSettings getDialogBoundsSettings()
- {
-// IDialogSettings settings = XSLDebugUIPlugin.getDefault().getDialogSettings();
-// IDialogSettings section = settings.getSection(getDialogSettingsSectionName());
-// if (section == null)
-// {
-// section = settings.addNewSection(getDialogSettingsSectionName());
-// }
-// return section;
- return null;
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/preferences/BasePreferencePage.java b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/preferences/BasePreferencePage.java
deleted file mode 100644
index 73db6bf..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/preferences/BasePreferencePage.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.ui.internal.preferences;
-
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-
-public class BasePreferencePage extends PreferencePage implements IWorkbenchPreferencePage
-{
- @Override
- protected Control createContents(Composite parent)
- {
- return null;
- }
-
- public void init(IWorkbench workbench)
- {
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/preferences/InstalledProcessorsBlock.java b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/preferences/InstalledProcessorsBlock.java
deleted file mode 100644
index 91d06b2..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/preferences/InstalledProcessorsBlock.java
+++ /dev/null
@@ -1,646 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.ui.internal.preferences;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.wst.xsl.internal.debug.ui.AbstractTableBlock;
-import org.eclipse.wst.xsl.internal.debug.ui.XSLDebugUIConstants;
-import org.eclipse.wst.xsl.internal.debug.ui.XSLDebugUIPlugin;
-import org.eclipse.wst.xsl.jaxp.debug.ui.internal.tabs.processor.InstallStandin;
-import org.eclipse.wst.xsl.jaxp.launching.IProcessorInstall;
-import org.eclipse.wst.xsl.jaxp.launching.IProcessorType;
-import org.eclipse.wst.xsl.jaxp.launching.JAXPRuntime;
-
-public class InstalledProcessorsBlock extends AbstractTableBlock implements ISelectionProvider
-{
- private Composite fControl;
- private final List<IProcessorInstall> processors = new ArrayList<IProcessorInstall>();
- private CheckboxTableViewer tableViewer;
- private Button fAddButton;
- private Button fRemoveButton;
- private Button fEditButton;
- private final ListenerList fSelectionListeners = new ListenerList();
- private ISelection fPrevSelection = new StructuredSelection();
-
- public void addSelectionChangedListener(ISelectionChangedListener listener)
- {
- fSelectionListeners.add(listener);
- }
-
- public void removeSelectionChangedListener(ISelectionChangedListener listener)
- {
- fSelectionListeners.remove(listener);
- }
-
- public ISelection getSelection()
- {
- return new StructuredSelection(tableViewer.getCheckedElements());
- }
-
- public void setSelection(ISelection selection)
- {
- if (selection instanceof IStructuredSelection)
- {
- if (!selection.equals(fPrevSelection))
- {
- fPrevSelection = selection;
- Object jre = ((IStructuredSelection) selection).getFirstElement();
- if (jre == null)
- {
- tableViewer.setCheckedElements(new Object[0]);
- }
- else
- {
- tableViewer.setCheckedElements(new Object[]
- { jre });
- tableViewer.reveal(jre);
- }
- fireSelectionChanged();
- }
- }
- }
-
- public void createControl(Composite ancestor)
- {
-
- Composite parent = new Composite(ancestor, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- parent.setLayout(layout);
- Font font = ancestor.getFont();
- parent.setFont(font);
- fControl = parent;
-
- GridData data;
-
- Label tableLabel = new Label(parent, SWT.NONE);
- tableLabel.setText(Messages.InstalledProcessorsBlock_0);
- data = new GridData();
- data.horizontalSpan = 2;
- tableLabel.setLayoutData(data);
- tableLabel.setFont(font);
-
- Table fTable = new Table(parent, SWT.CHECK | SWT.BORDER | SWT.FULL_SELECTION | SWT.V_SCROLL);
-
- data = new GridData(GridData.FILL_BOTH);
- data.widthHint = 450;
- fTable.setLayoutData(data);
- fTable.setFont(font);
-
- fTable.setHeaderVisible(true);
- fTable.setLinesVisible(true);
-
- TableColumn column1 = new TableColumn(fTable, SWT.NONE);
- column1.setWidth(180);
- column1.setResizable(true);
- column1.setText(Messages.InstalledProcessorsBlock_1);
- column1.addSelectionListener(new SelectionAdapter()
- {
- @Override
- public void widgetSelected(SelectionEvent e)
- {
- sortByName();
- }
- });
-
- TableColumn column2 = new TableColumn(fTable, SWT.NONE);
- column2.setWidth(90);
- column2.setResizable(true);
- column2.setText(Messages.InstalledProcessorsBlock_2);
- column2.addSelectionListener(new SelectionAdapter()
- {
- @Override
- public void widgetSelected(SelectionEvent e)
- {
- sortByType();
- }
- });
-
- TableColumn column4 = new TableColumn(fTable, SWT.NONE);
- column4.setWidth(180);
- column4.setResizable(true);
- column4.setText(Messages.InstalledProcessorsBlock_4);
- column4.addSelectionListener(new SelectionAdapter()
- {
- @Override
- public void widgetSelected(SelectionEvent e)
- {
- sortByVersion();
- }
- });
-
- tableViewer = new CheckboxTableViewer(fTable);
- tableViewer.setLabelProvider(new VMLabelProvider());
- tableViewer.setContentProvider(new ProcessorsContentProvider());
-
- tableViewer.addSelectionChangedListener(new ISelectionChangedListener()
- {
- public void selectionChanged(SelectionChangedEvent evt)
- {
- enableButtons();
- }
- });
-
- tableViewer.addCheckStateListener(new ICheckStateListener()
- {
- public void checkStateChanged(CheckStateChangedEvent event)
- {
- if (event.getChecked())
- {
- setCheckedInstall((IProcessorInstall) event.getElement());
- }
- else
- {
- setCheckedInstall(null);
- }
- }
- });
-
- tableViewer.addDoubleClickListener(new IDoubleClickListener()
- {
- public void doubleClick(DoubleClickEvent e)
- {
- if (!tableViewer.getSelection().isEmpty())
- {
- editProcessor();
- }
- }
- });
- fTable.addKeyListener(new KeyAdapter()
- {
- @Override
- public void keyPressed(KeyEvent event)
- {
- if (event.character == SWT.DEL && event.stateMask == 0)
- {
- removeProcessors();
- }
- }
- });
-
- Composite buttons = new Composite(parent, SWT.NULL);
- buttons.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
- layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- buttons.setLayout(layout);
- buttons.setFont(font);
-
- fAddButton = createPushButton(buttons, Messages.InstalledProcessorsBlock_5);
- fAddButton.addListener(SWT.Selection, new Listener()
- {
- public void handleEvent(Event evt)
- {
- addProcessor();
- }
- });
-
- fEditButton = createPushButton(buttons, Messages.InstalledProcessorsBlock_6);
- fEditButton.addListener(SWT.Selection, new Listener()
- {
- public void handleEvent(Event evt)
- {
- editProcessor();
- }
- });
-
- fRemoveButton = createPushButton(buttons, Messages.InstalledProcessorsBlock_7);
- fRemoveButton.addListener(SWT.Selection, new Listener()
- {
- public void handleEvent(Event evt)
- {
- removeProcessors();
- }
- });
-
- // copied from ListDialogField.CreateSeparator()
- Label separator = new Label(buttons, SWT.NONE);
- separator.setVisible(false);
- GridData gd = new GridData();
- gd.horizontalAlignment = GridData.FILL;
- gd.verticalAlignment = GridData.BEGINNING;
- gd.heightHint = 4;
- separator.setLayoutData(gd);
-
- fillWithWorkspaceProcessors();
- enableButtons();
-
- restoreColumnSettings();
- }
-
- protected void fillWithWorkspaceProcessors()
- {
- List<InstallStandin> standins = new ArrayList<InstallStandin>();
- IProcessorType[] types = JAXPRuntime.getProcessorTypes();
- for (IProcessorType type : types)
- {
- IProcessorInstall[] installs = JAXPRuntime.getProcessors(type.getId());
- for (IProcessorInstall install : installs)
- {
- standins.add(new InstallStandin(install));
- }
- }
- setProcessors(standins.toArray(new IProcessorInstall[standins.size()]));
- }
-
- private void fireSelectionChanged()
- {
- SelectionChangedEvent event = new SelectionChangedEvent(this, getSelection());
- Object[] listeners = fSelectionListeners.getListeners();
- for (Object element : listeners)
- {
- ISelectionChangedListener listener = (ISelectionChangedListener) element;
- listener.selectionChanged(event);
- }
- }
-
- /**
- * Sorts by type, and name within type.
- */
- private void sortByType()
- {
- tableViewer.setSorter(new ViewerSorter()
- {
- @Override
- public int compare(Viewer viewer, Object e1, Object e2)
- {
- IProcessorInstall left = (IProcessorInstall) e1;
- IProcessorInstall right = (IProcessorInstall) e2;
- return left.getProcessorType().getLabel().compareToIgnoreCase(right.getProcessorType().getLabel());
- }
-
- @Override
- public boolean isSorterProperty(Object element, String property)
- {
- return true;
- }
- });
- }
-
- private void sortByVersion()
- {
- tableViewer.setSorter(new ViewerSorter()
- {
- @Override
- public int compare(Viewer viewer, Object e1, Object e2)
- {
- IProcessorInstall left = (IProcessorInstall) e1;
- IProcessorInstall right = (IProcessorInstall) e2;
- return left.getSupports().compareToIgnoreCase(right.getSupports());
- }
-
- @Override
- public boolean isSorterProperty(Object element, String property)
- {
- return true;
- }
- });
- }
-
- /**
- * Sorts by name.
- */
- private void sortByName()
- {
- tableViewer.setSorter(new ViewerSorter()
- {
- @Override
- public int compare(Viewer viewer, Object e1, Object e2)
- {
- if ((e1 instanceof IProcessorInstall) && (e2 instanceof IProcessorInstall))
- {
- IProcessorInstall left = (IProcessorInstall) e1;
- IProcessorInstall right = (IProcessorInstall) e2;
- return left.getName().compareToIgnoreCase(right.getName());
- }
- return super.compare(viewer, e1, e2);
- }
-
- @Override
- public boolean isSorterProperty(Object element, String property)
- {
- return true;
- }
- });
- }
-
- private void enableButtons()
- {
- IStructuredSelection selection = (IStructuredSelection) tableViewer.getSelection();
- int selectionCount = selection.size();
- fEditButton.setEnabled(selectionCount == 1 && !((IProcessorInstall)selection.getFirstElement()).isContributed());
- if (selectionCount > 0 && selectionCount < tableViewer.getTable().getItemCount())
- {
- Iterator<?> iterator = selection.iterator();
- while (iterator.hasNext())
- {
- IProcessorInstall install = (IProcessorInstall) iterator.next();
- if (install.isContributed())
- {
- fRemoveButton.setEnabled(false);
- return;
- }
- }
- fRemoveButton.setEnabled(true);
- }
- else
- {
- fRemoveButton.setEnabled(false);
- }
- }
-
- protected Button createPushButton(Composite parent, String label)
- {
- Button button = new Button(parent, SWT.PUSH);
- button.setText(label);
- button.setLayoutData(GridDataFactory.fillDefaults().create());
- return button;
- }
-
- @Override
- public Control getControl()
- {
- return fControl;
- }
-
- protected void setProcessors(IProcessorInstall[] vms)
- {
- processors.clear();
- for (IProcessorInstall element : vms)
- {
- processors.add(element);
- }
- tableViewer.setInput(processors);
- // tableViewer.refresh();
- }
-
- public IProcessorInstall[] getProcessors()
- {
- return processors.toArray(new IProcessorInstall[processors.size()]);
- }
-
- private void addProcessor()
- {
- AddProcessorDialog dialog = new AddProcessorDialog(this, getShell(), JAXPRuntime.getProcessorTypesExclJREDefault(), null);
- dialog.setTitle(Messages.AddProcessorDialog_Add_Title);
- if (dialog.open() != Window.OK)
- {
- return;
- }
- }
-
- public void processorAdded(IProcessorInstall install)
- {
- processors.add(install);
- tableViewer.add(install);
- tableViewer.setSelection(new StructuredSelection(install), true);
- }
-
- public boolean isDuplicateName(String name)
- {
- for (int i = 0; i < processors.size(); i++)
- {
- IProcessorInstall install = processors.get(i);
- if (install.getName().equals(name))
- {
- return true;
- }
- }
- return false;
- }
-
- private void editProcessor()
- {
- IStructuredSelection selection = (IStructuredSelection) tableViewer.getSelection();
- IProcessorInstall install = (IProcessorInstall) selection.getFirstElement();
- if (install == null)
- {
- return;
- }
- if (!install.isContributed())
- {
-// ProcessorDetailsDialog dialog = new ProcessorDetailsDialog(getShell(), install);
-// dialog.open();
-// }
-// else
-// {
- AddProcessorDialog dialog = new AddProcessorDialog(this, getShell(), JAXPRuntime.getProcessorTypesExclJREDefault(), install);
- dialog.setTitle(Messages.AddProcessorDialog_Edit_Title);
- if (dialog.open() != Window.OK)
- {
- return;
- }
- // fillWithWorkspaceProcessors();
- tableViewer.refresh();
- }
- }
-
- private void removeProcessors()
- {
- IStructuredSelection selection = (IStructuredSelection) tableViewer.getSelection();
- IProcessorInstall[] vms = new IProcessorInstall[selection.size()];
- Iterator<?> iter = selection.iterator();
- int i = 0;
- while (iter.hasNext())
- {
- vms[i] = (IProcessorInstall) iter.next();
- i++;
- }
- removeProcessors(vms);
- }
-
- public void removeProcessors(IProcessorInstall[] theInstalls)
- {
- IStructuredSelection prev = (IStructuredSelection) getSelection();
- for (IProcessorInstall element : theInstalls)
- {
- processors.remove(element);
- }
- tableViewer.refresh();
- IStructuredSelection curr = (IStructuredSelection) getSelection();
- if (!curr.equals(prev))
- {
- IProcessorInstall[] installs = getProcessors();
- if (curr.size() == 0 && installs.length == 1)
- {
- // pick a default install automatically
- setSelection(new StructuredSelection(installs[0]));
- }
- else
- {
- fireSelectionChanged();
- }
- }
- }
-
- public void setCheckedInstall(IProcessorInstall install)
- {
- if (install == null)
- {
- setSelection(new StructuredSelection());
- }
- else
- {
- setSelection(new StructuredSelection(install));
- }
- }
-
- public IProcessorInstall getCheckedInstall()
- {
- Object[] objects = tableViewer.getCheckedElements();
- if (objects.length == 0)
- {
- return null;
- }
- return (IProcessorInstall) objects[0];
- }
-
- @Override
- protected void setSortColumn(int column)
- {
- switch (column)
- {
- case 1:
- sortByName();
- break;
- case 2:
- sortByType();
- break;
- }
- super.setSortColumn(column);
- }
-
- @Override
- protected Table getTable()
- {
- return tableViewer.getTable();
- }
-
- @Override
- protected IDialogSettings getDialogSettings()
- {
- return XSLDebugUIPlugin.getDefault().getDialogSettings();
- }
-
- @Override
- protected String getQualifier()
- {
- return XSLDebugUIConstants.PROCESSOR_DETAILS_DIALOG;
- }
-
- public String getName()
- {
- return null;
- }
-
- public void initializeFrom(ILaunchConfiguration configuration)
- {
- }
-
- public void performApply(ILaunchConfigurationWorkingCopy configuration)
- {
- }
-
- public void setDefaults(ILaunchConfigurationWorkingCopy configuration)
- {
- }
-
- private class ProcessorsContentProvider implements IStructuredContentProvider
- {
- public Object[] getElements(Object input)
- {
- return processors.toArray();
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput)
- {
- }
-
- public void dispose()
- {
- }
- }
-
- private class VMLabelProvider extends LabelProvider implements ITableLabelProvider
- {
- public String getColumnText(Object element, int columnIndex)
- {
- if (element instanceof IProcessorInstall)
- {
- IProcessorInstall install = (IProcessorInstall) element;
- switch (columnIndex)
- {
- case 0:
- return install.getName();
- case 1:
- return install.getProcessorType().getLabel();
- case 2:
- if (install.getDebugger() != null)
- {
- return install.getDebugger().getName();
- }
- return Messages.InstalledProcessorsBlock_8;
- }
- }
- return element.toString();
- }
-
- public Image getColumnImage(Object element, int columnIndex)
- {
- return null;
- }
-
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/preferences/Messages.java b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/preferences/Messages.java
deleted file mode 100644
index 43404e1..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/preferences/Messages.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.eclipse.wst.xsl.jaxp.debug.ui.internal.preferences;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS
-{
- private static final String BUNDLE_NAME = "org.eclipse.wst.xsl.jaxp.debug.ui.internal.preferences.messages"; //$NON-NLS-1$
- static
- {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
-
- public static String AddProcessorDialog_1;
- public static String AddProcessorDialog_7;
- public static String AddProcessorDialog_Edit_Title;
- public static String AddProcessorDialog_Add_Title;
- public static String AddProcessorDialog_jars;
- public static String AddProcessorDialog_attributes;
- public static String AddProcessorDialog_processorName;
- public static String AddProcessorDialog_processorType;
- public static String AddProcessorDialog_enterName;
- public static String AddProcessorDialog_duplicateName;
-
- public static String ProcessorLibraryBlock_6;
- public static String ProcessorLibraryBlock_AddButton;
- public static String ProcessorLibraryBlock_RemoveButton;
- public static String ProcessorLibraryBlock_AddWorkspaceButton;
- public static String ProcessorLibraryBlock_FileDialog_Title;
- public static String ProcessorLibraryBlock_WorkspaceFileDialog_Title;
- public static String ProcessorLibraryBlock_WorkspaceFileDialog_Message;
-
- public static String InstalledProcessorsBlock_0;
- public static String InstalledProcessorsBlock_1;
- public static String InstalledProcessorsBlock_2;
- public static String InstalledProcessorsBlock_3;
- public static String InstalledProcessorsBlock_4;
- public static String InstalledProcessorsBlock_5;
- public static String InstalledProcessorsBlock_6;
- public static String InstalledProcessorsBlock_7;
- public static String InstalledProcessorsBlock_8;
-
- public static String ProcessorsPreferencePage_0;
- public static String ProcessorsPreferencePage_1;
- public static String ProcessorsPreferencePage_2;
-
- private Messages()
- {
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/preferences/ProcessorLibraryBlock.java b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/preferences/ProcessorLibraryBlock.java
deleted file mode 100644
index b352dc8..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/preferences/ProcessorLibraryBlock.java
+++ /dev/null
@@ -1,344 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.ui.internal.preferences;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
-import org.eclipse.ui.dialogs.ISelectionStatusValidator;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.ui.views.navigator.ResourceComparator;
-import org.eclipse.wst.xsl.internal.debug.ui.XSLDebugUIPlugin;
-import org.eclipse.wst.xsl.jaxp.debug.ui.internal.tabs.processor.InstallStandin;
-import org.eclipse.wst.xsl.jaxp.debug.ui.internal.tabs.processor.JarContentProvider;
-import org.eclipse.wst.xsl.jaxp.debug.ui.internal.tabs.processor.JarLabelProvider;
-import org.eclipse.wst.xsl.jaxp.launching.IProcessorInstall;
-import org.eclipse.wst.xsl.jaxp.launching.IProcessorJar;
-import org.eclipse.wst.xsl.jaxp.launching.IProcessorType;
-import org.eclipse.wst.xsl.jaxp.launching.JAXPRuntime;
-
-public class ProcessorLibraryBlock implements SelectionListener, ISelectionChangedListener
-{
- protected static final String LAST_PATH_SETTING = "LAST_PATH_SETTING"; //$NON-NLS-1$
- protected static final String LAST_WORKSPACE_PATH_SETTING = "LAST_WORKSPACE_PATH_SETTING"; //$NON-NLS-1$
- protected static final String DIALOG_SETTINGS_PREFIX = "ProcessorLibraryBlock"; //$NON-NLS-1$
- protected InstallStandin install;
- protected IProcessorType installType;
- protected AddProcessorDialog addDialog = null;
- protected TableViewer tableViewer;
- private Button removeButton;
- private Button addButton;
- private Button addWorkspaceButton;
-
- private final ISelectionStatusValidator validator = new ISelectionStatusValidator()
- {
- public IStatus validate(Object[] selection)
- {
- if (selection.length == 0)
- {
- return new Status(IStatus.ERROR, XSLDebugUIPlugin.PLUGIN_ID, 0, "", null); //$NON-NLS-1$
- }
- for (Object element : selection)
- {
- if (element instanceof IFolder)
- return new Status(IStatus.ERROR, XSLDebugUIPlugin.PLUGIN_ID, 0, "", null); //$NON-NLS-1$
- else if (element instanceof IFile)
- {
- // IFile file = (IFile) selection[i];
- // TODO check that the file is not already on the classpath
- }
- }
- return new Status(IStatus.OK, XSLDebugUIPlugin.PLUGIN_ID, 0, "", null); //$NON-NLS-1$
- }
- };
-
- public ProcessorLibraryBlock(AddProcessorDialog dialog)
- {
- addDialog = dialog;
- }
-
- public Control createControl(Composite parent)
- {
- Font font = parent.getFont();
-
- Composite comp = new Composite(parent, SWT.NONE);
- GridLayout topLayout = new GridLayout();
- topLayout.numColumns = 2;
- topLayout.marginHeight = 0;
- topLayout.marginWidth = 0;
- comp.setLayout(topLayout);
- GridData gd = new GridData(GridData.FILL_BOTH);
- comp.setLayoutData(gd);
-
- tableViewer = new TableViewer(comp);
- gd = new GridData(GridData.FILL_BOTH);
- gd.heightHint = 6;
- tableViewer.getControl().setLayoutData(gd);
- JarContentProvider fLibraryContentProvider = new JarContentProvider();
- tableViewer.setContentProvider(fLibraryContentProvider);
- tableViewer.setLabelProvider(new JarLabelProvider());
- tableViewer.addSelectionChangedListener(this);
-
- Composite pathButtonComp = new Composite(comp, SWT.NONE);
- GridLayout pathButtonLayout = new GridLayout();
- pathButtonLayout.marginHeight = 0;
- pathButtonLayout.marginWidth = 0;
- pathButtonComp.setLayout(pathButtonLayout);
- gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.HORIZONTAL_ALIGN_FILL);
- pathButtonComp.setLayoutData(gd);
- pathButtonComp.setFont(font);
-
- addWorkspaceButton = createPushButton(pathButtonComp, Messages.ProcessorLibraryBlock_AddWorkspaceButton);
- addWorkspaceButton.addSelectionListener(this);
-
- addButton = createPushButton(pathButtonComp, Messages.ProcessorLibraryBlock_AddButton);
- addButton.addSelectionListener(this);
-
- removeButton = createPushButton(pathButtonComp, Messages.ProcessorLibraryBlock_RemoveButton);
- removeButton.addSelectionListener(this);
-
- return comp;
- }
-
- protected Button createPushButton(Composite parent, String label)
- {
- Button button = new Button(parent, SWT.PUSH);
- button.setFont(parent.getFont());
- button.setText(label);
- addDialog.setButtonLayoutData(button);
- return button;
- }
-
- protected void createVerticalSpacer(Composite comp, int colSpan)
- {
- Label label = new Label(comp, SWT.NONE);
- GridData gd = new GridData();
- gd.horizontalSpan = colSpan;
- label.setLayoutData(gd);
- }
-
- public void initializeFrom(InstallStandin standin, IProcessorType type)
- {
- install = standin;
- installType = type;
- if (install != null)
- tableViewer.setInput(install);
- update();
- }
-
- /**
- * Updates buttons and status based on current libraries
- */
- public void update()
- {
- updateButtons();
- IStatus status = Status.OK_STATUS;
- if (install != null && install.getProcessorJars().length == 0)
- {
- status = new Status(IStatus.INFO, XSLDebugUIPlugin.PLUGIN_ID, 0, Messages.ProcessorLibraryBlock_6, null);
- }
- addDialog.setSystemLibraryStatus(status);
- addDialog.updateStatusLine();
- }
-
- public void performApply(InstallStandin standin)
- {
- standin.setProcessorJars(install.getProcessorJars());
- }
-
- protected IProcessorInstall getVMInstall()
- {
- return install;
- }
-
- protected IProcessorType getVMInstallType()
- {
- return installType;
- }
-
- public void widgetSelected(SelectionEvent e)
- {
- Object source = e.getSource();
- if (source == removeButton)
- {
- remove((IStructuredSelection) tableViewer.getSelection());
- }
- else if (source == addButton)
- {
- addExternal((IStructuredSelection) tableViewer.getSelection());
- }
- else if (source == addWorkspaceButton)
- {
- addWorkspace((IStructuredSelection) tableViewer.getSelection());
- }
- update();
- }
-
- public void widgetDefaultSelected(SelectionEvent e)
- {
- }
-
- private void addExternal(IStructuredSelection selection)
- {
- IDialogSettings dialogSettings = XSLDebugUIPlugin.getDefault().getDialogSettings();
- String lastUsedPath = dialogSettings.get(LAST_PATH_SETTING);
- if (lastUsedPath == null)
- {
- lastUsedPath = ""; //$NON-NLS-1$
- }
- FileDialog dialog = new FileDialog(tableViewer.getControl().getShell(), SWT.MULTI);
- dialog.setText(Messages.ProcessorLibraryBlock_FileDialog_Title);
- dialog.setFilterExtensions(new String[]
- { "*.jar;*.zip" }); //$NON-NLS-1$
- dialog.setFilterPath(lastUsedPath);
- String res = dialog.open();
- if (res == null)
- {
- return;
- }
- String[] fileNames = dialog.getFileNames();
- int nChosen = fileNames.length;
-
- IPath filterPath = new Path(dialog.getFilterPath());
- IProcessorJar[] libs = new IProcessorJar[nChosen];
- for (int i = 0; i < nChosen; i++)
- {
- libs[i] = JAXPRuntime.createProcessorJar(filterPath.append(fileNames[i]).makeAbsolute());
- }
- dialogSettings.put(LAST_PATH_SETTING, filterPath.toOSString());
-
- IProcessorJar[] currentJars = install.getProcessorJars();
- IProcessorJar[] newJars = new IProcessorJar[currentJars.length + libs.length];
- System.arraycopy(currentJars, 0, newJars, 0, currentJars.length);
- System.arraycopy(libs, 0, newJars, currentJars.length, libs.length);
- install.setProcessorJars(newJars);
-
- tableViewer.add(libs);
- }
-
- private void addWorkspace(IStructuredSelection selection)
- {
- IDialogSettings dialogSettings = XSLDebugUIPlugin.getDefault().getDialogSettings();
- String lastUsedPath = dialogSettings.get(LAST_WORKSPACE_PATH_SETTING);
- IPath lastPath = null;
- if (lastUsedPath != null)
- {
- lastPath = Path.fromPortableString(lastUsedPath);
- }
-
- // IResource currentResource = getResource();
- ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(tableViewer.getControl().getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider());
- dialog.setTitle(Messages.ProcessorLibraryBlock_WorkspaceFileDialog_Title);
- dialog.setMessage(Messages.ProcessorLibraryBlock_WorkspaceFileDialog_Message);
- dialog.setValidator(validator);
- dialog.addFilter(new ViewerFilter()
- {
- @Override
- public boolean select(Viewer viewer, Object parentElement, Object element)
- {
- if (element instanceof IContainer)
- return true;
- else if (element instanceof IFile)
- {
- IFile file = (IFile) element;
- String extension = file.getFileExtension();
- if (extension == null)
- return false;
- return extension.equals("jar"); //$NON-NLS-1$
- }
- return false;
- }
- });
- dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
- if (lastPath != null)
- dialog.setInitialSelection(lastPath);
- dialog.setComparator(new ResourceComparator(ResourceComparator.NAME));
- dialog.setAllowMultiple(true);
-
- if (dialog.open() == Window.OK)
- {
- Object[] elements = dialog.getResult();
- if (elements.length > 0)
- {
- IProcessorJar[] libs = new IProcessorJar[elements.length];
- for (int i = 0; i < elements.length; i++)
- {
- IFile jar = (IFile) elements[i];
- libs[i] = JAXPRuntime.createProcessorJar(jar.getFullPath());
- }
- IProcessorJar[] currentJars = install.getProcessorJars();
- IProcessorJar[] newJars = new IProcessorJar[currentJars.length + libs.length];
- System.arraycopy(currentJars, 0, newJars, 0, currentJars.length);
- System.arraycopy(libs, 0, newJars, currentJars.length, libs.length);
- install.setProcessorJars(newJars);
-
- tableViewer.add(libs);
-
- lastPath = libs[0].getPath();
- lastPath = lastPath.uptoSegment(lastPath.segmentCount());
- dialogSettings.put(LAST_WORKSPACE_PATH_SETTING, lastPath.toPortableString());
- }
- }
- }
-
- private void remove(IStructuredSelection selection)
- {
- List<IProcessorJar> currentJars = new ArrayList<IProcessorJar>(Arrays.asList(install.getProcessorJars()));
- for (Iterator<?> iter = selection.iterator(); iter.hasNext();)
- {
- currentJars.remove(iter.next());
- }
- install.setProcessorJars(currentJars.toArray(new IProcessorJar[0]));
- tableViewer.remove(selection.toArray());
- }
-
- public void selectionChanged(SelectionChangedEvent event)
- {
- updateButtons();
- }
-
- private void updateButtons()
- {
- IStructuredSelection selection = (IStructuredSelection) tableViewer.getSelection();
- removeButton.setEnabled(!selection.isEmpty());
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/preferences/ProcessorsPreferencePage.java b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/preferences/ProcessorsPreferencePage.java
deleted file mode 100644
index 53e4eef..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/preferences/ProcessorsPreferencePage.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.ui.internal.preferences;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.wst.xsl.internal.debug.ui.XSLDebugUIPlugin;
-import org.eclipse.wst.xsl.jaxp.launching.IProcessorInstall;
-import org.eclipse.wst.xsl.jaxp.launching.JAXPRuntime;
-
-public class ProcessorsPreferencePage extends PreferencePage implements IWorkbenchPreferencePage
-{
- private InstalledProcessorsBlock processorsBlock;
-
- public ProcessorsPreferencePage()
- {
- super();
- // only used when page is shown programatically
- setTitle(Messages.ProcessorsPreferencePage_0);
- setDescription(Messages.ProcessorsPreferencePage_1);
- }
-
- public void init(IWorkbench workbench)
- {
- }
-
- @Override
- protected Control createContents(Composite ancestor)
- {
- initializeDialogUnits(ancestor);
-
- noDefaultAndApplyButton();
-
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- ancestor.setLayout(layout);
-
- processorsBlock = new InstalledProcessorsBlock();
- processorsBlock.createControl(ancestor);
- Control control = processorsBlock.getControl();
- GridData data = new GridData(GridData.FILL_BOTH);
- data.horizontalSpan = 1;
- control.setLayoutData(data);
-
- // TODO PlatformUI.getWorkbench().getHelpSystem().setHelp...
-
- initDefaultInstall();
- processorsBlock.addSelectionChangedListener(new ISelectionChangedListener()
- {
- public void selectionChanged(SelectionChangedEvent event)
- {
- IProcessorInstall install = getCurrentDefaultProcessor();
- if (install == null)
- {
- setValid(false);
- setErrorMessage(Messages.ProcessorsPreferencePage_2);
- }
- else
- {
- setValid(true);
- setErrorMessage(null);
- }
- }
- });
- applyDialogFont(ancestor);
- return ancestor;
- }
-
- @Override
- public boolean performOk()
- {
- processorsBlock.saveColumnSettings();
- final boolean[] ok = new boolean[1];
- try
- {
- final IProcessorInstall[] installs = processorsBlock.getProcessors();
- final IProcessorInstall defaultProcessor = getCurrentDefaultProcessor();
- IRunnableWithProgress runnable = new IRunnableWithProgress()
- {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException
- {
- try
- {
- JAXPRuntime.saveProcessorPreferences(installs,defaultProcessor,monitor);
- }
- catch (CoreException e)
- {
- XSLDebugUIPlugin.log(e);
- }
- ok[0] = !monitor.isCanceled();
- }
- };
- XSLDebugUIPlugin.getDefault().getWorkbench().getProgressService().busyCursorWhile(runnable);
- }
- catch (InvocationTargetException e)
- {
- XSLDebugUIPlugin.log(e);
- }
- catch (InterruptedException e)
- {
- XSLDebugUIPlugin.log(e);
- }
- return ok[0];
- }
-
- private void initDefaultInstall()
- {
- IProcessorInstall realDefault = JAXPRuntime.getDefaultProcessor();
- if (realDefault != null)
- {
- IProcessorInstall[] installs = processorsBlock.getProcessors();
- for (IProcessorInstall fakeInstall : installs)
- {
- if (fakeInstall.getId().equals(realDefault.getId()))
- {
- verifyDefaultVM(fakeInstall);
- break;
- }
- }
- }
- }
-
- private void verifyDefaultVM(IProcessorInstall install)
- {
- if (install != null)
- {
- processorsBlock.setCheckedInstall(install);
- }
- else
- {
- processorsBlock.setCheckedInstall(null);
- }
- }
-
- private IProcessorInstall getCurrentDefaultProcessor()
- {
- return processorsBlock.getCheckedInstall();
- }
-
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/preferences/messages.properties b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/preferences/messages.properties
deleted file mode 100644
index cfd4e7f..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/preferences/messages.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-AddProcessorDialog_1=Supported versions:
-AddProcessorDialog_7=Processor must support at least one XSLT version
-AddProcessorDialog_Edit_Title=Edit Processor
-AddProcessorDialog_Add_Title=Add Processor
-AddProcessorDialog_processorName=Processor Name:
-AddProcessorDialog_processorType=Processor Type:
-AddProcessorDialog_jars=Libraries:
-AddProcessorDialog_attributes=Attributes:
-AddProcessorDialog_enterName=A name must be entered for this processor
-AddProcessorDialog_duplicateName=The name has already been used
-InstalledProcessorsBlock_0=Installed Java XSLT Processors:
-InstalledProcessorsBlock_1=Name
-InstalledProcessorsBlock_2=Type
-InstalledProcessorsBlock_3=XSLT Versions
-InstalledProcessorsBlock_4=Debugger
-InstalledProcessorsBlock_5=Add
-InstalledProcessorsBlock_6=Edit
-InstalledProcessorsBlock_7=Remove
-InstalledProcessorsBlock_8=None
-
-ProcessorLibraryBlock_6=One or more jar files must be specified
-ProcessorLibraryBlock_AddButton=Add External JARs
-ProcessorLibraryBlock_AddWorkspaceButton=Add Workspace JARs
-ProcessorLibraryBlock_RemoveButton=Remove
-ProcessorLibraryBlock_FileDialog_Title=External JARs
-ProcessorLibraryBlock_WorkspaceFileDialog_Title=Workspace JARs
-ProcessorLibraryBlock_WorkspaceFileDialog_Message=Select the JARs that make up the XSLT processor
-
-ProcessorsPreferencePage_0=Java XSLT Processors
-ProcessorsPreferencePage_1=Add, remove or edit XSLT processor definitions.\nBy default, the checked Processor is used for all transformations.
-ProcessorsPreferencePage_2=Select a default XSLT Processor
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/AttributeDialog.java b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/AttributeDialog.java
deleted file mode 100644
index 885ec53..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/AttributeDialog.java
+++ /dev/null
@@ -1,161 +0,0 @@
-package org.eclipse.wst.xsl.jaxp.debug.ui.internal.tabs.processor;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.StatusDialog;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.wst.xsl.jaxp.launching.IAttribute;
-import org.eclipse.wst.xsl.jaxp.launching.IProcessorType;
-import org.eclipse.wst.xsl.jaxp.launching.JAXPRuntime;
-import org.eclipse.wst.xsl.jaxp.launching.LaunchAttributes;
-import org.eclipse.wst.xsl.launching.config.LaunchAttribute;
-
-public class AttributeDialog extends StatusDialog
-{
- private Table table;
- private TableViewer tViewer;
- private Text text;
- private List<IAttribute> attributes = new ArrayList<IAttribute>();
- private List<IAttribute> selectedAttributes = new ArrayList<IAttribute>();
-
- public AttributeDialog(Shell parent, LaunchAttributes launchAttributes)
- {
- super(parent);
- setTitle("Select Processor Attributes");
-
- Set<String> attributeSet = new HashSet<String>();
- for (LaunchAttribute att : launchAttributes.getAttributes())
- {
- attributeSet.add(att.uri);
- }
- for (IProcessorType type : JAXPRuntime.getProcessorTypes())
- {
- for (IAttribute attribute : type.getAttributes())
- {
- if (!attributeSet.contains(attribute.getURI()))
- {
- attributeSet.add(attribute.getURI());
- attributes.add(attribute);
- }
- }
- }
- }
-
- @Override
- protected Control createDialogArea(Composite parent)
- {
- Composite comp = new Composite(parent,SWT.NONE);
- GridData gd = new GridData(SWT.FILL,SWT.FILL,true,true);
- gd.widthHint = 400;
- comp.setLayoutData(gd);
- comp.setLayout(new GridLayout());
-
- Label label = new Label(comp,SWT.NONE);
- label.setText("Select one or more attributes to set on the XSLT processor.");
-
-
- table = new Table(comp,SWT.BORDER | SWT.FULL_SELECTION | SWT.V_SCROLL | SWT.MULTI);
- table.setHeaderVisible(false);
- gd = new GridData(SWT.FILL,SWT.FILL,true,true);
- gd.verticalIndent = 10;
- gd.heightHint = 200;
- table.setLayoutData(gd);
-
- tViewer = new TableViewer(table);
- tViewer.setContentProvider(new IStructuredContentProvider()
- {
- public Object[] getElements(Object inputElement)
- {
- return attributes.toArray(new IAttribute[0]);
- }
-
- public void dispose()
- {
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput)
- {
- }
- });
- tViewer.setLabelProvider(new LabelProvider(){
- @Override
- public String getText(Object element)
- {
- IAttribute attribute = (IAttribute)element;
- return attribute.getURI();
- }
- });
- tViewer.setSorter(new ViewerSorter()
- {
- @Override
- public int compare(Viewer viewer, Object e1, Object e2)
- {
- IAttribute a1 = (IAttribute) e1;
- IAttribute a2 = (IAttribute) e2;
- return a1.getURI().compareTo(a2.getURI());
- }
- });
- tViewer.addSelectionChangedListener(new ISelectionChangedListener(){
- public void selectionChanged(SelectionChangedEvent event)
- {
- IStructuredSelection sel = (IStructuredSelection)event.getSelection();
- selectedAttributes = sel.toList();
- if (sel.isEmpty())
- text.setText("");
- else
- {
- IAttribute attribute = (IAttribute)sel.getFirstElement();
- text.setText(attribute.getDescription());
- }
- }
- });
- tViewer.addDoubleClickListener(new IDoubleClickListener(){
- public void doubleClick(DoubleClickEvent event)
- {
- buttonPressed(IDialogConstants.OK_ID);
- }
- });
- tViewer.setInput(attributes);
-
- text = new Text(comp,SWT.BORDER | SWT.WRAP | SWT.READ_ONLY | SWT.V_SCROLL);
- text.setEditable(false);
- gd = new GridData(SWT.FILL,SWT.FILL,true,false);
- gd.heightHint = 80;
- text.setLayoutData(gd);
-
- if (attributes.size() > 0)
- {
- tViewer.setSelection(new StructuredSelection(tViewer.getElementAt(0)), true);
- }
-
- return comp;
- }
-
- public List<IAttribute> getAttributes()
- {
- return selectedAttributes;
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/AttributesBlock.java b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/AttributesBlock.java
deleted file mode 100644
index fbe1111..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/AttributesBlock.java
+++ /dev/null
@@ -1,367 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.ui.internal.tabs.processor;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.TransformerException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.jface.viewers.CellLabelProvider;
-import org.eclipse.jface.viewers.EditingSupport;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.TableViewerColumn;
-import org.eclipse.jface.viewers.TextCellEditor;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerCell;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.TabFolder;
-import org.eclipse.swt.widgets.TabItem;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.wst.xsl.internal.debug.ui.AbstractTableBlock;
-import org.eclipse.wst.xsl.internal.debug.ui.XSLDebugUIPlugin;
-import org.eclipse.wst.xsl.jaxp.debug.ui.internal.JAXPDebugUIPlugin;
-import org.eclipse.wst.xsl.jaxp.launching.IAttribute;
-import org.eclipse.wst.xsl.jaxp.launching.IProcessorType;
-import org.eclipse.wst.xsl.jaxp.launching.JAXPLaunchConfigurationConstants;
-import org.eclipse.wst.xsl.jaxp.launching.JAXPRuntime;
-import org.eclipse.wst.xsl.jaxp.launching.LaunchAttributes;
-import org.eclipse.wst.xsl.launching.config.LaunchAttribute;
-
-public class AttributesBlock extends AbstractTableBlock
-{
- private Table table;
- private TableViewer tViewer;
- private LaunchAttributes attributes;
- private Button removeButton;
- private Map<String,IAttribute> attributeUris = new HashMap<String,IAttribute>();
-
- public AttributesBlock()
- {
- for (IProcessorType type : JAXPRuntime.getProcessorTypes())
- {
- for (IAttribute attribute : type.getAttributes())
- {
- attributeUris.put(attribute.getURI(), attribute);
- }
- }
- }
-
- @Override
- protected IDialogSettings getDialogSettings()
- {
- return XSLDebugUIPlugin.getDefault().getDialogSettings();
- }
-
- @Override
- protected String getQualifier()
- {
- return JAXPDebugUIPlugin.PLUGIN_ID+"."+getClass().getCanonicalName();
- }
-
- @Override
- protected Table getTable()
- {
- return table;
- }
-
- public void createControl(Composite parent)
- {
- TabItem item = new TabItem((TabFolder)parent,SWT.NONE);
- item.setText("Attributes");
-
- Composite composite = new Composite(parent,SWT.NONE);
- GridLayout layout = new GridLayout(2,false);
- layout.marginBottom = 0;
- layout.marginWidth = 0;
- composite.setLayout(layout);
- item.setControl(composite);
-
- table = new Table(composite,SWT.BORDER | SWT.FULL_SELECTION | SWT.V_SCROLL | SWT.MULTI);
- table.setHeaderVisible(true);
- table.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
- table.addKeyListener(new KeyAdapter() {
- @Override
- public void keyPressed(KeyEvent event) {
- if (event.character == SWT.DEL && event.stateMask == 0) {
- performRemove();
- }
- }
- });
-
- TableColumn tc1 = new TableColumn(table,SWT.NONE);
- tc1.setText("Name");
- tc1.setWidth(350);
- tc1.setResizable(true);
-
- TableColumn tc2 = new TableColumn(table,SWT.NONE);
- tc2.setText("Value");
- tc2.setWidth(50);
- tc2.setResizable(true);
-
- Composite buttonComp = new Composite(composite,SWT.FILL);
- buttonComp.setLayoutData(new GridData(SWT.FILL,SWT.TOP,false,false));
- GridLayout gl = new GridLayout();
- gl.marginWidth = 0;
- buttonComp.setLayout(gl);
-
- Button addButton = new Button(buttonComp,SWT.PUSH);
- addButton.setText("Add");
- addButton.setLayoutData(new GridData(SWT.FILL,SWT.TOP,false,false));
- addButton.addSelectionListener(new SelectionListener(){
- public void widgetDefaultSelected(SelectionEvent e)
- {
- }
- public void widgetSelected(SelectionEvent e)
- {
- AttributeDialog dialog = new AttributeDialog(getShell(),attributes);
- if (dialog.open() == Window.OK)
- {
- List<IAttribute> newAttributes = dialog.getAttributes();
- LaunchAttribute first = null;
- for (IAttribute attribute : newAttributes)
- {
- LaunchAttribute att = new LaunchAttribute(attribute.getURI(),"string",null);
- if (first == null)
- first = att;
- attributes.addAttribute(att);
- }
- if (newAttributes.size() > 0)
- {
- tViewer.refresh();
- tViewer.setSelection(new StructuredSelection(first), true);
- tViewer.editElement(first, 1);
- updateLaunchConfigurationDialog();
- }
- }
- }
- });
-
- removeButton = new Button(buttonComp,SWT.PUSH);
- removeButton.setText("Remove");
- removeButton.setLayoutData(new GridData(SWT.FILL,SWT.TOP,false,false));
- removeButton.addSelectionListener(new SelectionListener(){
- public void widgetDefaultSelected(SelectionEvent e)
- {
- }
- public void widgetSelected(SelectionEvent e)
- {
- performRemove();
- }
- });
-
- setControl(table);
-
- tViewer = new TableViewer(table);
- tViewer.setContentProvider(new IStructuredContentProvider()
- {
- public Object[] getElements(Object inputElement)
- {
- return attributes.getAttributes().toArray(new LaunchAttribute[0]);
- }
-
- public void dispose()
- {
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput)
- {
- attributes = (LaunchAttributes) newInput;
- }
- });
- tViewer.setSorter(new ViewerSorter()
- {
- @Override
- public int compare(Viewer viewer, Object e1, Object e2)
- {
- LaunchAttribute a1 = (LaunchAttribute) e1;
- LaunchAttribute a2 = (LaunchAttribute) e2;
- return a1.uri.compareTo(a2.uri);
- }
- });
- tViewer.addSelectionChangedListener(new ISelectionChangedListener(){
- public void selectionChanged(SelectionChangedEvent event)
- {
- updateRemoveButton();
- }
- });
-
- TableViewerColumn tvc1 = new TableViewerColumn(tViewer,tc1);
- tvc1.setLabelProvider(new CellLabelProvider(){
- @Override
- public void update(ViewerCell cell)
- {
- LaunchAttribute tv = (LaunchAttribute) cell.getElement();
- cell.setText(tv.uri);
- }
-
- @Override
- public int getToolTipTimeDisplayed(Object object)
- {
- return 5000;
- }
-
- @Override
- public String getToolTipText(Object element)
- {
- LaunchAttribute tv = (LaunchAttribute) element;
- return attributeUris.get(tv.uri).getDescription();
- }
-
- });
-
-// ColumnViewerToolTipSupport.enableFor(tViewer);
-
- TableViewerColumn tvc2 = new TableViewerColumn(tViewer,tc2);
- tvc2.setLabelProvider(new CellLabelProvider(){
- @Override
- public void update(ViewerCell cell)
- {
- LaunchAttribute tv = (LaunchAttribute) cell.getElement();
- cell.setText(tv.value);
- }
- });
-
- tvc2.setEditingSupport(new EditingSupport(tViewer){
-
- @Override
- protected boolean canEdit(Object element)
- {
- return true;
- }
-
- @Override
- protected CellEditor getCellEditor(Object element)
- {
- return new TextCellEditor(table);
- }
-
- @Override
- protected Object getValue(Object element)
- {
- LaunchAttribute tv = (LaunchAttribute)element;
- return tv.value == null ? "" : tv.value;
- }
-
- @Override
- protected void setValue(Object element, Object value)
- {
- LaunchAttribute tv = (LaunchAttribute)element;
- tv.setValue((String)value);
- updateLaunchConfigurationDialog();
- tViewer.update(tv, null);
- }
-
- });
-
- restoreColumnSettings();
- }
-
- protected void updateRemoveButton()
- {
- removeButton.setEnabled(!tViewer.getSelection().isEmpty());
- }
-
- public String getName()
- {
- return Messages.getString("AttributesBlock.16"); //$NON-NLS-1$
- }
-
- public void setDefaults(ILaunchConfigurationWorkingCopy configuration)
- {
- }
-
- private void initializeAttributesFromStorage(ILaunchConfiguration configuration) throws CoreException
- {
- String s = configuration.getAttribute(JAXPLaunchConfigurationConstants.ATTR_ATTRIBUTES, (String) null);
- if (s != null && s.length() > 0)
- {
- attributes = LaunchAttributes.fromXML(new ByteArrayInputStream(s.getBytes()));
- }
- else
- {
- attributes = new LaunchAttributes();
- }
- tViewer.setInput(attributes);
- updateRemoveButton();
- }
-
- public void initializeFrom(ILaunchConfiguration configuration)
- {
- try
- {
- initializeAttributesFromStorage(configuration);
- }
- catch (CoreException e)
- {
- XSLDebugUIPlugin.log(e);
- }
- }
-
- public void performApply(ILaunchConfigurationWorkingCopy configuration)
- {
- try
- {
- String xml = attributes.toXML();
- configuration.setAttribute(JAXPLaunchConfigurationConstants.ATTR_ATTRIBUTES, xml);
- }
- catch (ParserConfigurationException e)
- {
- XSLDebugUIPlugin.log(e);
- }
- catch (IOException e)
- {
- XSLDebugUIPlugin.log(e);
- }
- catch (TransformerException e)
- {
- XSLDebugUIPlugin.log(e);
- }
- }
-
- private void performRemove()
- {
- IStructuredSelection sel = (IStructuredSelection)tViewer.getSelection();
- for (Iterator iterator = sel.iterator(); iterator.hasNext();)
- {
- LaunchAttribute att = (LaunchAttribute) iterator.next();
- attributes.removeAtribute(att.uri);
- }
- tViewer.refresh();
- updateLaunchConfigurationDialog();
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/InstallStandin.java b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/InstallStandin.java
deleted file mode 100644
index 35b3927..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/InstallStandin.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.ui.internal.tabs.processor;
-
-import org.eclipse.wst.xsl.jaxp.launching.IProcessorInstall;
-import org.eclipse.wst.xsl.jaxp.launching.IProcessorJar;
-import org.eclipse.wst.xsl.jaxp.launching.ProcessorInstall;
-
-public class InstallStandin extends ProcessorInstall
-{
- public InstallStandin(IProcessorInstall install)
- {
- super(install.getId(), install.getName(), install.getProcessorType().getId(), install.getProcessorJars(), install.getDebugger() != null ? install.getDebugger().getId() : null, install
- .getSupports(), install.isContributed());
- }
-
- public InstallStandin(String id, String name, String typeId, String debuggerId, IProcessorJar[] jars)
- {
- super(id, name, typeId, jars, debuggerId, "", false); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/JarContentProvider.java b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/JarContentProvider.java
deleted file mode 100644
index f37a0de..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/JarContentProvider.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.ui.internal.tabs.processor;
-
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.wst.xsl.jaxp.launching.IProcessorInstall;
-
-public class JarContentProvider implements IStructuredContentProvider
-{
- private IProcessorInstall install;
-
- public Object[] getElements(Object inputElement)
- {
- return install.getProcessorJars();
- }
-
- public void dispose()
- {
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput)
- {
- install = (IProcessorInstall) newInput;
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/JarLabelProvider.java b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/JarLabelProvider.java
deleted file mode 100644
index 5ded313..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/JarLabelProvider.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.ui.internal.tabs.processor;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.wst.xsl.jaxp.launching.IProcessorJar;
-
-public class JarLabelProvider extends LabelProvider
-{
- @Override
- public String getText(Object element)
- {
- IProcessorJar jar = (IProcessorJar) element;
- IPath path = jar.getPath();
- return path.lastSegment() + " - " + path.removeLastSegments(1).toOSString() + ""; //$NON-NLS-1$ //$NON-NLS-2$
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/Messages.java b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/Messages.java
deleted file mode 100644
index ea96ce6..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/Messages.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.eclipse.wst.xsl.jaxp.debug.ui.internal.tabs.processor;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-class Messages {
- private static final String BUNDLE_NAME = "org.eclipse.wst.xsl.jaxp.debug.ui.internal.tabs.processor.messages"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
-
- private Messages() {
- }
-
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/OutputPropertiesBlock.java b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/OutputPropertiesBlock.java
deleted file mode 100644
index 82ad964..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/OutputPropertiesBlock.java
+++ /dev/null
@@ -1,378 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.ui.internal.tabs.processor;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.TransformerException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.jface.viewers.CellLabelProvider;
-import org.eclipse.jface.viewers.EditingSupport;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.TableViewerColumn;
-import org.eclipse.jface.viewers.TextCellEditor;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerCell;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.TabFolder;
-import org.eclipse.swt.widgets.TabItem;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.wst.xsl.internal.debug.ui.AbstractTableBlock;
-import org.eclipse.wst.xsl.internal.debug.ui.XSLDebugUIPlugin;
-import org.eclipse.wst.xsl.jaxp.debug.ui.internal.JAXPDebugUIPlugin;
-import org.eclipse.wst.xsl.jaxp.launching.IOutputProperty;
-import org.eclipse.wst.xsl.jaxp.launching.IProcessorType;
-import org.eclipse.wst.xsl.jaxp.launching.JAXPLaunchConfigurationConstants;
-import org.eclipse.wst.xsl.jaxp.launching.JAXPRuntime;
-import org.eclipse.wst.xsl.jaxp.launching.LaunchProperties;
-
-public class OutputPropertiesBlock extends AbstractTableBlock
-{
- private Table table;
- private TableViewer tViewer;
- private LaunchProperties properties;
- private Button removeButton;
- private Map<String,IOutputProperty> propertyUris = new HashMap<String,IOutputProperty>();
-
- public OutputPropertiesBlock()
- {
- for (IProcessorType type : JAXPRuntime.getProcessorTypes())
- {
- for (IOutputProperty property : type.getOutputProperties())
- {
- propertyUris.put(property.getURI(), property);
- }
- }
- }
-
- @Override
- protected IDialogSettings getDialogSettings()
- {
- return XSLDebugUIPlugin.getDefault().getDialogSettings();
- }
-
- @Override
- protected String getQualifier()
- {
- return JAXPDebugUIPlugin.PLUGIN_ID+"."+getClass().getCanonicalName();
- }
-
- @Override
- protected Table getTable()
- {
- return table;
- }
-
- public void createControl(Composite parent)
- {
- TabItem item = new TabItem((TabFolder)parent,SWT.NONE);
- item.setText("Output Properties");
-
- Composite composite = new Composite(parent,SWT.NONE);
- GridLayout layout = new GridLayout(2,false);
- layout.marginBottom = 0;
- layout.marginWidth = 0;
- composite.setLayout(layout);
- item.setControl(composite);
-
- table = new Table(composite,SWT.BORDER | SWT.FULL_SELECTION | SWT.V_SCROLL | SWT.MULTI);
- table.setHeaderVisible(true);
- table.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
- table.addKeyListener(new KeyAdapter() {
- @Override
- public void keyPressed(KeyEvent event) {
- if (event.character == SWT.DEL && event.stateMask == 0) {
- performRemove();
- }
- }
- });
-
-
- TableColumn tc1 = new TableColumn(table,SWT.NONE);
- tc1.setText("Name");
- tc1.setWidth(350);
- tc1.setResizable(true);
-
- TableColumn tc2 = new TableColumn(table,SWT.NONE);
- tc2.setText("Value");
- tc2.setWidth(50);
- tc2.setResizable(true);
-
- Composite buttonComp = new Composite(composite,SWT.FILL);
- buttonComp.setLayoutData(new GridData(SWT.FILL,SWT.TOP,false,false));
- GridLayout gl = new GridLayout();
- gl.marginWidth = 0;
- buttonComp.setLayout(gl);
-
- Button addButton = new Button(buttonComp,SWT.PUSH);
- addButton.setText("Add");
- addButton.setLayoutData(new GridData(SWT.FILL,SWT.TOP,false,false));
- addButton.addSelectionListener(new SelectionListener(){
- public void widgetDefaultSelected(SelectionEvent e)
- {
- }
- public void widgetSelected(SelectionEvent e)
- {
- OutputPropertyDialog dialog = new OutputPropertyDialog(getShell(),properties);
- if (dialog.open() == Window.OK)
- {
- List<IOutputProperty> newProperties = dialog.getOutpuProperties();
- String first = null;
- for (IOutputProperty property : newProperties)
- {
- String att = property.getURI();
- if (first == null)
- first = att;
- properties.setProperty(property.getURI(), null);
- }
- if (newProperties.size() > 0)
- {
- tViewer.refresh();
- tViewer.setSelection(new StructuredSelection(first), true);
- tViewer.editElement(first, 1);
- updateLaunchConfigurationDialog();
- }
- }
- }
- });
-
- removeButton = new Button(buttonComp,SWT.PUSH);
- removeButton.setText("Remove");
- removeButton.setLayoutData(new GridData(SWT.FILL,SWT.TOP,false,false));
- removeButton.addSelectionListener(new SelectionListener(){
- public void widgetDefaultSelected(SelectionEvent e)
- {
- }
- public void widgetSelected(SelectionEvent e)
- {
- performRemove();
- }
- });
-
- setControl(table);
-
- tViewer = new TableViewer(table);
- tViewer.setContentProvider(new IStructuredContentProvider()
- {
- public Object[] getElements(Object inputElement)
- {
- return properties.getProperties().keySet().toArray(new String[0]);
- }
-
- public void dispose()
- {
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput)
- {
- }
- });
- tViewer.setSorter(new ViewerSorter());
- tViewer.addSelectionChangedListener(new ISelectionChangedListener(){
- public void selectionChanged(SelectionChangedEvent event)
- {
- updateRemoveButton();
- }
- });
-
- TableViewerColumn tvc1 = new TableViewerColumn(tViewer,tc1);
- tvc1.setLabelProvider(new CellLabelProvider(){
- @Override
- public void update(ViewerCell cell)
- {
- String tv = (String) cell.getElement();
- cell.setText(tv);
- }
-
- @Override
- public int getToolTipTimeDisplayed(Object object)
- {
- return 5000;
- }
-
- @Override
- public String getToolTipText(Object element)
- {
- String tv = (String) element;
- return propertyUris.get(tv).getDescription();
- }
-
- });
-
-// ColumnViewerToolTipSupport.enableFor(tViewer);
-
- TableViewerColumn tvc2 = new TableViewerColumn(tViewer,tc2);
- tvc2.setLabelProvider(new CellLabelProvider(){
- @Override
- public void update(ViewerCell cell)
- {
- String tv = (String) cell.getElement();
- String val = properties.getProperty(tv);
- cell.setText(val == null ? "" : val);
- }
- });
-
- tvc2.setEditingSupport(new EditingSupport(tViewer){
-
- @Override
- protected boolean canEdit(Object element)
- {
- return true;
- }
-
- @Override
- protected CellEditor getCellEditor(Object element)
- {
- return new TextCellEditor(table);
- }
-
- @Override
- protected Object getValue(Object element)
- {
- String tv = (String)element;
- String val = properties.getProperty(tv);
- return val == null ? "" : val;
- }
-
- @Override
- protected void setValue(Object element, Object value)
- {
- String tv = (String)element;
- properties.setProperty(tv, (String)value);
- updateLaunchConfigurationDialog();
- tViewer.update(tv, null);
- }
-
- });
-
- restoreColumnSettings();
- }
-
- protected void updateRemoveButton()
- {
- removeButton.setEnabled(!tViewer.getSelection().isEmpty());
- }
-
- public String getName()
- {
- return Messages.getString("AttributesBlock.16"); //$NON-NLS-1$
- }
-
- public void setDefaults(ILaunchConfigurationWorkingCopy configuration)
- {
-// LaunchProperties p = new LaunchProperties();
-// p.setProperty("indent", "yes");
-// try
-// {
-// String xml = p.toXML();
-// configuration.setAttribute(JAXPLaunchConfigurationConstants.ATTR_OUTPUT_PROPERTIES, xml);
-// }
-// catch (ParserConfigurationException e)
-// {
-// XSLDebugUIPlugin.log(e);
-// }
-// catch (IOException e)
-// {
-// XSLDebugUIPlugin.log(e);
-// }
-// catch (TransformerException e)
-// {
-// XSLDebugUIPlugin.log(e);
-// }
- }
-
- private void initializePropertiesFromStorage(ILaunchConfiguration configuration) throws CoreException
- {
- String s = configuration.getAttribute(JAXPLaunchConfigurationConstants.ATTR_OUTPUT_PROPERTIES, (String) null);
- if (s != null && s.length() > 0)
- {
- properties = LaunchProperties.fromXML(new ByteArrayInputStream(s.getBytes()));
- }
- else
- {
- properties = new LaunchProperties();
- }
- tViewer.setInput(properties);
- updateRemoveButton();
- }
-
- public void initializeFrom(ILaunchConfiguration configuration)
- {
- try
- {
- initializePropertiesFromStorage(configuration);
- }
- catch (CoreException e)
- {
- XSLDebugUIPlugin.log(e);
- }
- }
-
- public void performApply(ILaunchConfigurationWorkingCopy configuration)
- {
- try
- {
- String xml = properties.toXML();
- configuration.setAttribute(JAXPLaunchConfigurationConstants.ATTR_OUTPUT_PROPERTIES, xml);
- }
- catch (ParserConfigurationException e)
- {
- XSLDebugUIPlugin.log(e);
- }
- catch (IOException e)
- {
- XSLDebugUIPlugin.log(e);
- }
- catch (TransformerException e)
- {
- XSLDebugUIPlugin.log(e);
- }
- }
-
- private void performRemove()
- {
- IStructuredSelection sel = (IStructuredSelection)tViewer.getSelection();
- for (Iterator iterator = sel.iterator(); iterator.hasNext();)
- {
- String att = (String) iterator.next();
- properties.removeProperty(att);
- }
- tViewer.refresh();
- updateLaunchConfigurationDialog();
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/OutputPropertyDialog.java b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/OutputPropertyDialog.java
deleted file mode 100644
index 2fc7b7c..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/OutputPropertyDialog.java
+++ /dev/null
@@ -1,160 +0,0 @@
-package org.eclipse.wst.xsl.jaxp.debug.ui.internal.tabs.processor;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.StatusDialog;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.wst.xsl.jaxp.launching.IOutputProperty;
-import org.eclipse.wst.xsl.jaxp.launching.IProcessorType;
-import org.eclipse.wst.xsl.jaxp.launching.JAXPRuntime;
-import org.eclipse.wst.xsl.jaxp.launching.LaunchProperties;
-
-public class OutputPropertyDialog extends StatusDialog
-{
- private Table table;
- private TableViewer tViewer;
- private Text text;
- private List<IOutputProperty> properties = new ArrayList<IOutputProperty>();
- private List<IOutputProperty> selectedProperties = new ArrayList<IOutputProperty>();
-
- public OutputPropertyDialog(Shell parent, LaunchProperties launchProperties)
- {
- super(parent);
- setTitle("Select Output Properties");
-
- Set<String> propertySet = new HashSet<String>();
- for (String att : launchProperties.getProperties().keySet())
- {
- propertySet.add(att);
- }
- for (IProcessorType type : JAXPRuntime.getProcessorTypes())
- {
- for (IOutputProperty property : type.getOutputProperties())
- {
- if (!propertySet.contains(property.getURI()))
- {
- propertySet.add(property.getURI());
- properties.add(property);
- }
- }
- }
- }
-
- @Override
- protected Control createDialogArea(Composite parent)
- {
- Composite comp = new Composite(parent,SWT.NONE);
- GridData gd = new GridData(SWT.FILL,SWT.FILL,true,true);
- gd.widthHint = 400;
- comp.setLayoutData(gd);
- comp.setLayout(new GridLayout());
-
- Label label = new Label(comp,SWT.NONE);
- label.setText("Select one or more output properties for the transformation.");
-
-
- table = new Table(comp,SWT.BORDER | SWT.FULL_SELECTION | SWT.V_SCROLL | SWT.MULTI);
- table.setHeaderVisible(false);
- gd = new GridData(SWT.FILL,SWT.FILL,true,true);
- gd.verticalIndent = 10;
- gd.heightHint = 200;
- table.setLayoutData(gd);
-
- tViewer = new TableViewer(table);
- tViewer.setContentProvider(new IStructuredContentProvider()
- {
- public Object[] getElements(Object inputElement)
- {
- return properties.toArray(new IOutputProperty[0]);
- }
-
- public void dispose()
- {
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput)
- {
- }
- });
- tViewer.setLabelProvider(new LabelProvider(){
- @Override
- public String getText(Object element)
- {
- IOutputProperty property = (IOutputProperty)element;
- return property.getURI();
- }
- });
- tViewer.setSorter(new ViewerSorter()
- {
- @Override
- public int compare(Viewer viewer, Object e1, Object e2)
- {
- IOutputProperty a1 = (IOutputProperty) e1;
- IOutputProperty a2 = (IOutputProperty) e2;
- return a1.getURI().compareTo(a2.getURI());
- }
- });
- tViewer.addSelectionChangedListener(new ISelectionChangedListener(){
- public void selectionChanged(SelectionChangedEvent event)
- {
- IStructuredSelection sel = (IStructuredSelection)event.getSelection();
- selectedProperties = sel.toList();
- if (sel.isEmpty())
- text.setText("");
- else
- {
- IOutputProperty property = (IOutputProperty)sel.getFirstElement();
- text.setText(property.getDescription());
- }
- }
- });
- tViewer.addDoubleClickListener(new IDoubleClickListener(){
- public void doubleClick(DoubleClickEvent event)
- {
- buttonPressed(IDialogConstants.OK_ID);
- }
- });
- tViewer.setInput(properties);
-
- text = new Text(comp,SWT.BORDER | SWT.WRAP | SWT.READ_ONLY | SWT.V_SCROLL);
- text.setEditable(false);
- gd = new GridData(SWT.FILL,SWT.FILL,true,false);
- gd.heightHint = 80;
- text.setLayoutData(gd);
-
- if (properties.size() > 0)
- {
- tViewer.setSelection(new StructuredSelection(tViewer.getElementAt(0)), true);
- }
-
- return comp;
- }
-
- public List<IOutputProperty> getOutpuProperties()
- {
- return selectedProperties;
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/ProcessorBlock.java b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/ProcessorBlock.java
deleted file mode 100644
index ab72b9c..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/ProcessorBlock.java
+++ /dev/null
@@ -1,373 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.ui.internal.tabs.processor;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
-import org.eclipse.jface.preference.IPreferencePage;
-import org.eclipse.jface.viewers.ComboViewer;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.wst.xsl.internal.debug.ui.XSLDebugUIPlugin;
-import org.eclipse.wst.xsl.jaxp.debug.ui.internal.preferences.ProcessorsPreferencePage;
-import org.eclipse.wst.xsl.jaxp.launching.IProcessorInstall;
-import org.eclipse.wst.xsl.jaxp.launching.IProcessorType;
-import org.eclipse.wst.xsl.jaxp.launching.ITransformerFactory;
-import org.eclipse.wst.xsl.jaxp.launching.JAXPLaunchConfigurationConstants;
-import org.eclipse.wst.xsl.jaxp.launching.JAXPRuntime;
-
-public class ProcessorBlock extends AbstractLaunchConfigurationTab
-{
- private Button usePreferencesRadio;
- private Button alterPreferencesButton;
- private Button overridePreferencesRadio;
- private Combo runCombo;
- private Button installedProcessorsButton;
- private ComboViewer runComboViewer;
- private ComboViewer factoryComboViewer;
- private ITransformerFactory currentFactory;
-
- public ProcessorBlock()
- {
- }
-
- public void createControl(Composite parent)
- {
- Font font = parent.getFont();
-
- Composite group = new Composite(parent, SWT.NULL);
- setControl(group);
- group.setLayout(new GridLayout(2, false));
- group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- group.setFont(font);
-// group.setText(ProcessorMessages.ProcessorBlock_0);
-
- usePreferencesRadio = new Button(group, SWT.RADIO);
- usePreferencesRadio.setText(ProcessorMessages.ProcessorBlock_1);
- usePreferencesRadio.addSelectionListener(new SelectionAdapter()
- {
- @Override
- public void widgetSelected(SelectionEvent e)
- {
- preferencesSelected();
- updateLaunchConfigurationDialog();
- }
- });
-
- alterPreferencesButton = new Button(group, SWT.PUSH);
- alterPreferencesButton.setText(ProcessorMessages.ProcessorBlock_2);
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_END);
- gd.widthHint = 150;
- alterPreferencesButton.setLayoutData(gd);
- alterPreferencesButton.addSelectionListener(new SelectionAdapter()
- {
- @Override
- public void widgetSelected(SelectionEvent e)
- {
- IPreferencePage page = new ProcessorsPreferencePage();
- showPrefPage("org.eclipse.wst.xslt.launching.ui.preferences.ProcessorPreferencePage", page); //$NON-NLS-1$
- }
- });
-
- overridePreferencesRadio = new Button(group, SWT.RADIO);
- overridePreferencesRadio.setText(ProcessorMessages.ProcessorBlock_4);
- overridePreferencesRadio.addSelectionListener(new SelectionAdapter()
- {
- @Override
- public void widgetSelected(SelectionEvent e)
- {
- overrideSelected();
- updateLaunchConfigurationDialog();
- }
- });
-
- installedProcessorsButton = new Button(group, SWT.PUSH);
- installedProcessorsButton.setText(ProcessorMessages.ProcessorsComboBlock_1);
- gd = new GridData(GridData.HORIZONTAL_ALIGN_END);
- gd.widthHint = 150;
- installedProcessorsButton.setLayoutData(gd);
- installedProcessorsButton.addSelectionListener(new SelectionAdapter()
- {
- @Override
- public void widgetSelected(SelectionEvent e)
- {
- IPreferencePage page = new ProcessorsPreferencePage();
- showPrefPage("org.eclipse.wst.xslt.launching.ui.preferences.ProcessorPreferencePage", page); //$NON-NLS-1$
- }
- });
-
- Composite settingsComp = new Composite(group, SWT.NONE);
- GridLayout gl = new GridLayout(3, false);
- gl.marginHeight = 2;
- settingsComp.setLayout(gl);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalIndent = 15;
- gd.horizontalSpan = 2;
- settingsComp.setLayoutData(gd);
- settingsComp.setFont(font);
-
- Label label = new Label(settingsComp, SWT.NONE);
- label.setText(ProcessorMessages.ProcessorBlock_6);
- runCombo = new Combo(settingsComp, SWT.READ_ONLY | SWT.SINGLE);
- runCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- runComboViewer = new ComboViewer(runCombo);
- runComboViewer.setContentProvider(new ComboContentProvider());
- runComboViewer.setLabelProvider(new ComboLabelProvider());
- runComboViewer.setInput(JAXPRuntime.getProcessors());
- runComboViewer.addSelectionChangedListener(new ISelectionChangedListener()
- {
-
- public void selectionChanged(SelectionChangedEvent event)
- {
- IStructuredSelection sel = (IStructuredSelection) event.getSelection();
- if (!sel.isEmpty())
- {
- IProcessorInstall processor = (IProcessorInstall) sel.getFirstElement();
-
- if (processor.getProcessorType().getTransformerFactories().length > 1)
- factoryComboViewer.getCombo().setVisible(true);
- else
- factoryComboViewer.getCombo().setVisible(false);
-
- factoryComboViewer.setInput(processor.getProcessorType());
-
- boolean found = false;
- for (ITransformerFactory tf : processor.getProcessorType().getTransformerFactories())
- {
- if (tf.equals(currentFactory))
- {
- found = true;
- break;
- }
- }
- if (!found)
- {
- currentFactory = processor.getProcessorType().getDefaultTransformerFactory();
- if (currentFactory!=null)
- factoryComboViewer.setSelection(new StructuredSelection(currentFactory));
- }
- }
- updateLaunchConfigurationDialog();
- }
- });
-
- Combo factoryCombo = new Combo(settingsComp, SWT.READ_ONLY | SWT.SINGLE);
- factoryCombo.setLayoutData(new GridData(80,SWT.DEFAULT));
- factoryComboViewer = new ComboViewer(factoryCombo);
- factoryComboViewer.setContentProvider(new IStructuredContentProvider(){
-
- private IProcessorType type;
-
- public Object[] getElements(Object inputElement)
- {
- return type.getTransformerFactories();
- }
-
- public void dispose()
- {
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput)
- {
- this.type = (IProcessorType)newInput;
- }
-
- });
- factoryComboViewer.setLabelProvider(new LabelProvider(){
- @Override
- public String getText(Object element)
- {
- ITransformerFactory f = (ITransformerFactory)element;
- return f.getName(); // + " - " + f.getFactoryClass();
- }
- });
- factoryComboViewer.addSelectionChangedListener(new ISelectionChangedListener()
- {
-
- public void selectionChanged(SelectionChangedEvent event)
- {
- currentFactory = (ITransformerFactory)((IStructuredSelection)event.getSelection()).getFirstElement();
- updateLaunchConfigurationDialog();
- }
- });
-
-// overridePreferencesButton = new Button(group,SWT.CHECK);
-// overridePreferencesButton.setText("Override preferences");
-// gd = new GridData(SWT.NONE,SWT.NONE,false,false);
-// overridePreferencesButton.setLayoutData(gd);
-// overridePreferencesButton.addSelectionListener(new SelectionListener(){
-// public void widgetDefaultSelected(SelectionEvent e)
-// {}
-//
-// public void widgetSelected(SelectionEvent e)
-// {
-// firePreferenceProcessorChanged(overridePreferencesButton.getSelection());
-// }
-// });
- }
-
-
- private void preferencesSelected()
- {
- alterPreferencesButton.setEnabled(true);
- installedProcessorsButton.setEnabled(false);
- runCombo.setEnabled(false);
- factoryComboViewer.getCombo().setEnabled(false);
- runComboViewer.setSelection(new StructuredSelection(getRunProcessorPreference()), true);
- }
-
- private void overrideSelected()
- {
- alterPreferencesButton.setEnabled(false);
- installedProcessorsButton.setEnabled(true);
- factoryComboViewer.getCombo().setEnabled(true);
- runCombo.setEnabled(true);
- }
-
- private void showPrefPage(String id, IPreferencePage page)
- {
- XSLDebugUIPlugin.showPreferencePage(id, page);
- // now refresh everything
- runComboViewer.setInput(JAXPRuntime.getProcessors());
- runComboViewer.setSelection(new StructuredSelection(getRunProcessorPreference()), true);
- // preferencesSelected();
- }
-
- public String getName()
- {
- return ProcessorMessages.ProcessorBlock_7;
- }
-
- public void initializeFrom(ILaunchConfiguration configuration)
- {
- try
- {
- boolean useDefaultProcessor = configuration.getAttribute(JAXPLaunchConfigurationConstants.ATTR_USE_DEFAULT_PROCESSOR, true);
- if (useDefaultProcessor)
- {
- usePreferencesRadio.setSelection(true);
- overridePreferencesRadio.setSelection(false);
- preferencesSelected();
- }
- else
- {
- usePreferencesRadio.setSelection(false);
- overridePreferencesRadio.setSelection(true);
- overrideSelected();
-
- IProcessorInstall runInstall = null;
- String runId = configuration.getAttribute(JAXPLaunchConfigurationConstants.ATTR_PROCESSOR, (String) null);
- if (runId != null)
- runInstall = JAXPRuntime.getProcessor(runId);
- if (runInstall == null)
- runInstall = getRunProcessorPreference();
- runComboViewer.setSelection(new StructuredSelection(runInstall));
-
-
- String factoryId = configuration.getAttribute(JAXPLaunchConfigurationConstants.ATTR_TRANSFORMER_FACTORY, (String) null);
- if (factoryId == null)
- {
- currentFactory = runInstall.getProcessorType().getDefaultTransformerFactory();
- }
- else
- {
- for (ITransformerFactory tf : runInstall.getProcessorType().getTransformerFactories())
- {
- if (tf.getFactoryClass().equals(factoryId))
- {
- currentFactory = tf;
- break;
- }
- }
- }
-
- if (currentFactory == null)
- {
- currentFactory = runInstall.getProcessorType().getDefaultTransformerFactory();
- }
- if (currentFactory != null)
- {
- factoryComboViewer.setSelection(new StructuredSelection(currentFactory), true);
- }
- }
- }
- catch (CoreException e)
- {
- XSLDebugUIPlugin.log(e);
- }
- }
-
- private IProcessorInstall getRunProcessorPreference()
- {
- return JAXPRuntime.getDefaultProcessor();
- }
-
- public void performApply(ILaunchConfigurationWorkingCopy configuration)
- {
- boolean usePreferences = usePreferencesRadio.getSelection();
- configuration.setAttribute(JAXPLaunchConfigurationConstants.ATTR_USE_DEFAULT_PROCESSOR, usePreferences);
- if (!usePreferences)
- {
- IProcessorInstall runprocessor = (IProcessorInstall) ((IStructuredSelection) runComboViewer.getSelection()).getFirstElement();
- configuration.setAttribute(JAXPLaunchConfigurationConstants.ATTR_PROCESSOR, runprocessor.getId());
- configuration.setAttribute(JAXPLaunchConfigurationConstants.ATTR_TRANSFORMER_FACTORY, currentFactory == null ? null : currentFactory.getFactoryClass());
- }
- }
-
- public void setDefaults(ILaunchConfigurationWorkingCopy configuration)
- {
- configuration.setAttribute(JAXPLaunchConfigurationConstants.ATTR_USE_DEFAULT_PROCESSOR, true);
- configuration.setAttribute(JAXPLaunchConfigurationConstants.ATTR_PROCESSOR, (String) null);
- }
-
- private class ComboContentProvider implements IStructuredContentProvider
- {
- public Object[] getElements(Object inputElement)
- {
- return JAXPRuntime.getProcessors();
- }
-
- public void dispose()
- {
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput)
- {
- }
- }
-
- private class ComboLabelProvider extends LabelProvider
- {
- @Override
- public String getText(Object element)
- {
- IProcessorInstall install = (IProcessorInstall) element;
- return install.getName();
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/ProcessorDescriptor.java b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/ProcessorDescriptor.java
deleted file mode 100644
index 83bf92f..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/ProcessorDescriptor.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.ui.internal.tabs.processor;
-
-public abstract class ProcessorDescriptor
-{
- public abstract String getDescription();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/ProcessorDetailsDialog.java b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/ProcessorDetailsDialog.java
deleted file mode 100644
index e0621f5..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/ProcessorDetailsDialog.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.ui.internal.tabs.processor;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.wst.xsl.internal.debug.ui.XSLDebugUIPlugin;
-import org.eclipse.wst.xsl.jaxp.launching.IProcessorInstall;
-
-public class ProcessorDetailsDialog extends Dialog
-{
- private final IProcessorInstall install;
-
- public ProcessorDetailsDialog(Shell shell, IProcessorInstall install)
- {
- super(shell);
- setShellStyle(getShellStyle() | SWT.RESIZE);
- this.install = install;
- }
-
- @Override
- protected void configureShell(Shell newShell)
- {
- super.configureShell(newShell);
- newShell.setText(ProcessorMessages.ProcessorDetailsDialog_Title);
- // TODO PlatformUI.getWorkbench().getHelpSystem().setHelp...
- }
-
- @Override
- protected Control createDialogArea(Composite ancestor)
- {
- Composite parent = (Composite) super.createDialogArea(ancestor);
- GridLayout layout = new GridLayout(2, false);
- parent.setLayout(layout);
-
- // type
- createLabel(parent, ProcessorMessages.ProcessorDetailsDialog_installType);
- createLabel(parent, install.getProcessorType().getLabel());
-
- // name
- createLabel(parent, ProcessorMessages.ProcessorDetailsDialog_installName);
- createLabel(parent, install.getName());
-
- // jars
- Label label = createLabel(parent, ProcessorMessages.ProcessorDetailsDialog_installClasspath);
- GridData gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.HORIZONTAL_ALIGN_BEGINNING);
- label.setLayoutData(gd);
- TableViewer libraryViewer = new TableViewer(parent);
- gd = new GridData(GridData.FILL_BOTH);
- gd.heightHint = 6;
- libraryViewer.getControl().setLayoutData(gd);
- libraryViewer.setContentProvider(new JarContentProvider());
- libraryViewer.setLabelProvider(new JarLabelProvider());
- libraryViewer.setInput(install);
-
- applyDialogFont(parent);
- return parent;
- }
-
- private Label createLabel(Composite parent, String text)
- {
- Label label = new Label(parent, SWT.NONE);
- label.setText(text);
- return label;
- }
-
- /**
- * Returns the name of the section that this dialog stores its settings in
- *
- * @return String
- */
- protected String getDialogSettingsSectionName()
- {
- return "XSL_DETAILS_DIALOG_SECTION"; //$NON-NLS-1$
- }
-
- @Override
- protected IDialogSettings getDialogBoundsSettings()
- {
- IDialogSettings settings = XSLDebugUIPlugin.getDefault().getDialogSettings();
- IDialogSettings section = settings.getSection(getDialogSettingsSectionName());
- if (section == null)
- {
- section = settings.addNewSection(getDialogSettingsSectionName());
- }
- return section;
- }
-
- @Override
- protected void createButtonsForButtonBar(Composite parent)
- {
- // create OK and Cancel buttons by default
- createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
- }
-
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/ProcessorMessages.java b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/ProcessorMessages.java
deleted file mode 100644
index ba4e159..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/ProcessorMessages.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.ui.internal.tabs.processor;
-
-import org.eclipse.osgi.util.NLS;
-
-class ProcessorMessages extends NLS
-{
- private static final String BUNDLE_NAME = "org.eclipse.wst.xsl.jaxp.debug.ui.internal.tabs.processor.ProcessorMessages"; //$NON-NLS-1$
-
- public static String ProcessorBlock_0;
- public static String ProcessorBlock_1;
- public static String ProcessorBlock_2;
- public static String ProcessorBlock_4;
- public static String ProcessorBlock_6;
- public static String ProcessorBlock_7;
- public static String ProcessorsComboBlock_1;
- public static String ProcessorDetailsDialog_Title;
- public static String ProcessorDetailsDialog_installName;
- public static String ProcessorDetailsDialog_installType;
- public static String ProcessorDetailsDialog_installClasspath;
-
- static
- {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, ProcessorMessages.class);
- }
-
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/ProcessorMessages.properties b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/ProcessorMessages.properties
deleted file mode 100644
index caa7275..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/ProcessorMessages.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-ProcessorBlock_0=XSLT Processor
-ProcessorBlock_1=Use processor from preferences
-ProcessorBlock_2=Change preferences...
-ProcessorBlock_4=Use specific processor
-ProcessorBlock_6=Processor:
-ProcessorBlock_7=Processor
-ProcessorsComboBlock_1=&Installed processors...
-
-ProcessorDetailsDialog_Title=Built-in XSLT Processor
-ProcessorDetailsDialog_installName=Name:
-ProcessorDetailsDialog_installType=Type:
-ProcessorDetailsDialog_installClasspath=Libraries:
-
-
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/XSLProcessorTab2.java b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/XSLProcessorTab2.java
deleted file mode 100644
index 5d648c4..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/XSLProcessorTab2.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- * David Carver - bug 223557 - Added images contributed by Holger Voormann
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.ui.internal.tabs.processor;
-
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.ui.ILaunchConfigurationTab;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.TabFolder;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.wst.xsl.internal.debug.ui.XSLLaunchConfigurationTab;
-import org.eclipse.wst.xsl.jaxp.debug.ui.internal.JAXPDebugUIPlugin;
-import org.eclipse.wst.xsl.jaxp.launching.IProcessorInvoker;
-import org.eclipse.wst.xsl.jaxp.launching.JAXPLaunchConfigurationConstants;
-import org.eclipse.wst.xsl.jaxp.launching.JAXPRuntime;
-
-public class XSLProcessorTab2 extends XSLLaunchConfigurationTab
-{
- private final ProcessorBlock processorBlock;
- private final AttributesBlock attributesBlock;
- private final OutputPropertiesBlock outputPropertiesBlock;
- private Image image;
-
- public XSLProcessorTab2()
- {
- attributesBlock = new AttributesBlock();
- outputPropertiesBlock = new OutputPropertiesBlock();
- processorBlock = new ProcessorBlock();
-
- setBlocks(new ILaunchConfigurationTab[]
- { processorBlock , attributesBlock, outputPropertiesBlock });
- }
-
- @Override
- public void createControl(Composite parent)
- {
- super.createControl(parent);
- Composite comp = (Composite) getControl();
-
- processorBlock.createControl(comp);
-
- TabFolder tabFolder = new TabFolder(comp,SWT.NONE);
- tabFolder.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
-
- outputPropertiesBlock.createControl(tabFolder);
- attributesBlock.createControl(tabFolder);
- }
-
- @Override
- public void performApply(ILaunchConfigurationWorkingCopy configuration)
- {
- super.performApply(configuration);
- IProcessorInvoker invoker = JAXPRuntime.getProcessorInvokers()[0];
- configuration.setAttribute(JAXPLaunchConfigurationConstants.INVOKER_DESCRIPTOR, invoker.getId());
- }
-
- public String getName()
- {
- return Messages.getString("XSLProcessorTab.0"); //$NON-NLS-1$
- }
-
- @Override
- public String getId()
- {
- return "org.eclipse.wst.xsl.debug.ui.jaxp.tabs.processor";
- }
-
- @Override
- public Image getImage()
- {
- if (image == null)
- {
- ImageDescriptor id = AbstractUIPlugin.imageDescriptorFromPlugin(JAXPDebugUIPlugin.PLUGIN_ID, "icons/xslt_processor.gif");
- image = id.createImage();
- }
- return image;
- }
-
- @Override
- public void dispose()
- {
- if (image != null)
- image.dispose();
- super.dispose();
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/messages.properties b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/messages.properties
deleted file mode 100644
index 1cebef7..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/tabs/processor/messages.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-AttributesBlock.1=Change Preferences...
-AttributesBlock.10=type
-AttributesBlock.11=value
-AttributesBlock.12=value
-AttributesBlock.16=Processor Attributes
-AttributesBlock.3=Use specific attributes
-AttributesBlock.4=Attribute
-AttributesBlock.5=Type
-AttributesBlock.6=Value
-AttributesBlock.9=name
-XSLProcessorTab.0=Processor
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/views/ResultRunnable.java b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/views/ResultRunnable.java
deleted file mode 100644
index 4d5932b..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/views/ResultRunnable.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Carver - initial API and implementation
- * Kevin Sawicki bug 259053 - NPE for document results.
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.ui.internal.views;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.source.SourceViewer;
-import org.eclipse.ui.IWorkbenchPartSite;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.text.JobSafeStructuredDocument;
-import org.eclipse.wst.xsl.internal.debug.ui.XSLDebugUIPlugin;
-
-public class ResultRunnable implements Runnable {
- private static final String XML_PROCESSING_INSTRUCTION = "<?xml";
- private static final String DOCTYPE_HTML = "<!DOCTYPE html";
- private static final String HTML_CONTENT_TYPE_ID = "org.eclipse.wst.html.core.htmlsource";
- private static final String XML_CONTENT_TYPE_ID = "org.eclipse.core.runtime.xml";
- private SourceViewer sourceViewer = null;
- private final String results;
- private IWorkbenchPartSite viewSite = null;
-
- public ResultRunnable(SourceViewer viewer, String results, IWorkbenchPartSite site) {
- sourceViewer = viewer;
- this.results = results;
- viewSite = site;
- }
-
- public void run()
- {
- // if this is the first lot of data, determine the correct content type and set the appropriate document
- if (sourceViewer.getDocument() == null)
- {
- IDocument document = createDocument();
- sourceViewer.setDocument(document);
- }
- try
- {
- IDocument document = sourceViewer.getDocument();
- document.replace(document.getLength(), 0, results);
- }
- catch (BadLocationException e)
- {
- XSLDebugUIPlugin.log(e);
- }
- sourceViewer.revealRange(sourceViewer.getDocument().getLength(),0);
- viewSite.getPage().activate(viewSite.getPart());
- }
-
- protected IDocument createDocument() {
- IDocument document;
- if (results.startsWith(DOCTYPE_HTML))
- {
- document = createStructuredDocument(HTML_CONTENT_TYPE_ID);
- }
- else if (results.startsWith(XML_PROCESSING_INSTRUCTION))
- {
- document = createStructuredDocument(XML_CONTENT_TYPE_ID);
- }
- else
- {
- document = new JobSafeStructuredDocument();
- }
- return document;
- }
-
- protected IDocument createStructuredDocument(String contentType) {
- IDocument document;
- IStructuredModel scratchModel = StructuredModelManager.getModelManager().createUnManagedStructuredModelFor(contentType);
- document = scratchModel.getStructuredDocument();
- return document;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/views/ResultView.java b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/views/ResultView.java
deleted file mode 100644
index 2bc92fe..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/views/ResultView.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.ui.internal.views;
-
-import java.io.IOException;
-import java.io.Reader;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IDebugEventSetListener;
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.jface.text.source.SourceViewer;
-import org.eclipse.jface.text.source.SourceViewerConfiguration;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.ViewPart;
-import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.text.JobSafeStructuredDocument;
-import org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration;
-import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
-import org.eclipse.wst.sse.ui.internal.provisional.style.LineStyleProvider;
-import org.eclipse.wst.xsl.internal.debug.ui.XSLDebugUIPlugin;
-import org.eclipse.wst.xsl.jaxp.launching.model.JAXPDebugTarget;
-import org.eclipse.wst.xsl.ui.internal.StructuredTextViewerConfigurationXSL;
-
-/**
- * TODO handle multiple concurrent debugging processes (and bring the current results to the top depending on which selected in Debug view)
- *
- * @author Doug Satchwell
- */
-public class ResultView extends ViewPart implements IDebugEventSetListener
-{
- private SourceViewer sv;
-
- @Override
- public void dispose()
- {
- DebugPlugin.getDefault().removeDebugEventListener(this);
- super.dispose();
- }
-
- @Override
- public void createPartControl(Composite parent)
- {
- this.sv = createViewer(parent);
-
- // handle any launches already added
- IDebugTarget[] targets = DebugPlugin.getDefault().getLaunchManager().getDebugTargets();
- for (IDebugTarget debugTarget : targets)
- {
- if (debugTarget instanceof JAXPDebugTarget)
- {
- handleDebugTarget((JAXPDebugTarget)debugTarget);
- }
- }
- // listen to further launches
- DebugPlugin.getDefault().addDebugEventListener(this);
- }
-
- private SourceViewer createViewer(Composite parent)
- {
- SourceViewerConfiguration sourceViewerConfiguration = new StructuredTextViewerConfiguration() {
- StructuredTextViewerConfiguration baseConfiguration = new StructuredTextViewerConfigurationXSL();
-
- @Override
- public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
- return baseConfiguration.getConfiguredContentTypes(sourceViewer);
- }
-
- @Override
- public LineStyleProvider[] getLineStyleProviders(ISourceViewer sourceViewer, String partitionType) {
- return baseConfiguration.getLineStyleProviders(sourceViewer, partitionType);
- }
- };
- SourceViewer viewer = new StructuredTextViewer(parent, null, null, false, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
- ((StructuredTextViewer) viewer).getTextWidget().setFont(JFaceResources.getFont("org.eclipse.wst.sse.ui.textfont")); //$NON-NLS-1$
- viewer.configure(sourceViewerConfiguration);
- viewer.setEditable(false);
- return viewer;
- }
-
- @Override
- public void setFocus()
- {}
-
- public void handleDebugEvents(DebugEvent[] events)
- {
- for (DebugEvent debugEvent : events)
- {
- if (debugEvent.getKind() == DebugEvent.CREATE && debugEvent.getSource() instanceof JAXPDebugTarget)
- {
- handleDebugTarget((JAXPDebugTarget)debugEvent.getSource());
- }
- }
- }
-
- private void handleDebugTarget(JAXPDebugTarget xdt)
- {
- // first, clear the viewer
- sv.setDocument(null);
- IWorkbenchSiteProgressService service = (IWorkbenchSiteProgressService)getSite().getService(IWorkbenchSiteProgressService.class);
- service.schedule(new ResultViewJob("Result view job", getSite(), xdt, sv));
- }
-
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/views/ResultViewJob.java b/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/views/ResultViewJob.java
deleted file mode 100644
index 6a75a8c..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug.ui/src/org/eclipse/wst/xsl/jaxp/debug/ui/internal/views/ResultViewJob.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Standards for Technology in Automotive Retail and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * David Carver - refactored from ResultView.
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.ui.internal.views;
-
-import java.io.IOException;
-import java.io.Reader;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.source.SourceViewer;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchPartSite;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.text.JobSafeStructuredDocument;
-import org.eclipse.wst.xsl.internal.debug.ui.XSLDebugUIPlugin;
-import org.eclipse.wst.xsl.jaxp.launching.model.JAXPDebugTarget;
-
-public class ResultViewJob extends Job {
-
- private IWorkbenchPartSite viewSite = null;
- final Reader reader;
- private SourceViewer sourceViewer = null;
-
- public ResultViewJob(String name, IWorkbenchPartSite site,
- JAXPDebugTarget xdt, SourceViewer viewer) {
- super(name);
- viewSite = site;
- reader = xdt.getGenerateReader();
- sourceViewer = viewer;
- }
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- IStatus status = Status.OK_STATUS;
- try {
- // this is the default BufferedWriter
- // size, so we will usually get chunks
- // of this size
-
- char[] c = new char[8192];
- int size;
- while ((size = reader.read(c)) != -1) {
- writeString(new String(c, 0, size));
- }
- } catch (IOException e) {
- // ignore
- } finally {
- monitor.done();
- }
- return status;
- }
-
- private void writeString(final String s) {
- Shell shell = viewSite.getShell();
- Display display = shell.getDisplay();
- display.syncExec(new ResultRunnable(sourceViewer, s, viewSite));
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug/.classpath b/bundles/org.eclipse.wst.xsl.jaxp.debug/.classpath
deleted file mode 100644
index 2fbb7a2..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug/.project b/bundles/org.eclipse.wst.xsl.jaxp.debug/.project
deleted file mode 100644
index 96358c2..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.xsl.jaxp.debug</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.wst.xsl.jaxp.debug/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f915f19..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,20 +0,0 @@
-#Tue Feb 10 05:26:11 GMT 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.xsl.jaxp.debug/META-INF/MANIFEST.MF
deleted file mode 100644
index 21dd829..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,11 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.wst.xsl.jaxp.debug
-Bundle-Version: 1.0.0.qualifier
-Bundle-Vendor: %vendorName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Require-Bundle: org.apache.commons.logging;bundle-version="1.0.4";visibility:=reexport
-Export-Package: org.eclipse.wst.xsl.jaxp.debug.debugger,
- org.eclipse.wst.xsl.jaxp.debug.invoker
-Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug/about.html b/bundles/org.eclipse.wst.xsl.jaxp.debug/about.html
deleted file mode 100644
index ed30003..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug/about.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<HTML>
-
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-
-<BODY lang="EN-US">
-
-<H3>About This Content</H3>
-
-<P>August, 2008</P>
-
-<H3>License</H3>
-
-<P>The Eclipse Foundation makes available all content in this plug-in
-("Content"). Unless otherwise indicated below, the Content is provided to you
-under the terms and conditions of the Eclipse Public License Version 1.0
-("EPL"). A copy of the EPL is available at
-<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
-For purposes of the EPL, "Program" will mean the Content.</P>
-
-<P>If you did not receive this Content directly from the Eclipse Foundation, the
-Content is being redistributed by another party ("Redistributor") and different
-terms and conditions may apply to your use of any object code in the Content.
-Check the Redistributor’s license that was provided with the Content. If no such
-license exists, contact the Redistributor. Unless otherwise indicated below, the
-terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at
-<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P>
-
-</BODY>
-</HTML>
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug/build.properties b/bundles/org.eclipse.wst.xsl.jaxp.debug/build.properties
deleted file mode 100644
index d944674..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug/build.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug/plugin.properties b/bundles/org.eclipse.wst.xsl.jaxp.debug/plugin.properties
deleted file mode 100644
index a2b6f8c..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug/plugin.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-#Properties file for org.eclipse.wst.xsl.jaxp.debug
-vendorName = Eclipse.org
-pluginName = XSL JAXP Debugger \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/log4j.properties b/bundles/org.eclipse.wst.xsl.jaxp.debug/src/log4j.properties
deleted file mode 100644
index 09bb551..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/log4j.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-# Set root logger level to DEBUG and its appenders are A1 and A2
-log4j.rootLogger=DEBUG, A2
-
-# A2 is set to be a ConsoleAppender
-log4j.appender.A2=org.apache.log4j.ConsoleAppender
-
-# A2 uses PatternLayout.
-log4j.appender.A2.layout=org.apache.log4j.PatternLayout
-log4j.appender.A2.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p [%t] %c{1} %x - %m%n
-
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/debugger/AbstractDebugger.java b/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/debugger/AbstractDebugger.java
deleted file mode 100644
index c099904..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/debugger/AbstractDebugger.java
+++ /dev/null
@@ -1,406 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.debugger;
-
-import java.io.IOException;
-import java.io.Writer;
-import java.net.URL;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-import java.util.Stack;
-
-import javax.xml.transform.Result;
-import javax.xml.transform.stream.StreamResult;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.eclipse.wst.xsl.jaxp.debug.invoker.IProcessorInvoker;
-import org.eclipse.wst.xsl.jaxp.debug.invoker.TransformationException;
-
-/**
- * An implementation of <code>IXSLDebugger</code>.
- *
- * This class can be subclassed in order to provide debugging for a particular XSLT processor.
- *
- * @author Doug Satchwell
- */
-public abstract class AbstractDebugger implements IXSLDebugger
-{
- private static final Log log = LogFactory.getLog(AbstractDebugger.class);
-
- private static final int ACTION_DO_NOTHING = 0;
- private static final int ACTION_STOP = 1;
- private static final int ACTION_QUIT = 2;
- private static final int ACTION_SUSPEND = 3;
- private static final int ACTION_RESUME = 4;
- private static final int ACTION_STEP_INTO = 5;
- private static final int ACTION_STEP_OVER = 6;
- private static final int ACTION_STEP_RETURN = 7;
-
- private static final String EVENT_STARTED = "started"; //$NON-NLS-1$
- private static final String EVENT_STOPPED = "stopped"; //$NON-NLS-1$
- private static final String EVENT_SUSPENDED = "suspended client"; //$NON-NLS-1$
- private static final String EVENT_SUSPENDED_STEP = "suspended step"; //$NON-NLS-1$
- private static final String EVENT_RESUMED = "resumed client"; //$NON-NLS-1$
- private static final String EVENT_RESUMED_STEP = "resumed step"; //$NON-NLS-1$
-
- private IProcessorInvoker invoker;
- private int action;
- private Writer eventWriter;
- private Writer generatedWriter;
- private final Set breakpoints = Collections.synchronizedSet(new HashSet());
- private final Stack stack = new Stack();
- private StyleFrame stepOverFrame;
- private BreakPoint breakpoint;
- private URL sourceURL;
- private Result result;
-
- private int stepOverStackSize;
-
- public void setInvoker(IProcessorInvoker invoker)
- {
- this.invoker = invoker;
- }
-
- public void setEventWriter(Writer writer)
- {
- eventWriter = writer;
- }
-
- public void setGeneratedWriter(Writer writer)
- {
- this.generatedWriter = writer;
- }
-
- public void setSource(URL sourceURL)
- {
- this.sourceURL = sourceURL;
- }
-
- public void setTarget(final Writer writer)
- {
- result = new StreamResult(new Writer(){
- public void write(char[] cbuf, int off, int len) throws IOException
- {
- writer.write(cbuf, off, len);
- generatedWriter.write(cbuf,off,len);
- }
-
- public void close() throws IOException
- {
- writer.close();
- generatedWriter.close();
- }
-
- public void flush() throws IOException
- {
- writer.flush();
- generatedWriter.flush();
- }
- });
- }
-
- public void run()
- {
- if (action != ACTION_QUIT)
- {
- debuggerStarted();
- try
- {
- invoker.transform(sourceURL, result);
- }
- catch (TransformationException e)
- {
- log.error("Transform failed", e); //$NON-NLS-1$
- }
- debuggerStopped();
- }
- }
-
- public synchronized void suspend()
- {
- action = ACTION_SUSPEND;
- notify();
- }
-
- public synchronized void resume()
- {
- action = ACTION_RESUME;
- notify();
- }
-
- public synchronized void stepInto()
- {
- action = ACTION_STEP_INTO;
- notify();
- }
-
- public synchronized void stepOver()
- {
- action = ACTION_STEP_OVER;
- stepOverFrame = peekStyleFrame();
- stepOverStackSize = stack.size();
- notify();
- }
-
- public synchronized void stepReturn()
- {
- action = ACTION_STEP_RETURN;
- stepOverStackSize = stack.size();
- notify();
- }
-
- public synchronized void quit()
- {
- action = ACTION_QUIT;
- }
-
- public String stack()
- {
- StringBuffer sb = new StringBuffer();
- synchronized (stack)
- {
- for (Iterator iter = stack.iterator(); iter.hasNext();)
- {
- StyleFrame frame = (StyleFrame) iter.next();
- sb.append(frame.toString());
- for (Iterator iter2 = frame.getVariableStack().iterator(); iter2.hasNext();)
- {
- sb.append("|"); //$NON-NLS-1$
- Variable v = (Variable) iter2.next();
- sb.append(v.getId());
- }
- if (iter.hasNext())
- sb.append("$$$"); //$NON-NLS-1$
- }
- }
- return sb.toString();
- }
-
- /**
- * Check whether the debugger has been stopped and perform the appropriate action if so.
- */
- public synchronized void checkStopped()
- {
- if (action == ACTION_QUIT)
- debuggerQuit();
- else if (action == ACTION_STOP)
- debuggerStopped();
- }
-
- /**
- * Check whether the debugger is currently suspended or stepping at the given breakpoint and style frame,
- * and perform the appropriate action if so.
- *
- * @param styleFrame the styleframe to check
- * @param breakpoint the current location
- */
- public synchronized void checkSuspended(StyleFrame styleFrame, BreakPoint breakpoint)
- {
- // do not suspend unless the line actually changed
- if (breakpoint.equals(this.breakpoint))
- return;
- int stackSize;
- synchronized (stack)
- {
- stackSize = stack.size();
- }
- // do not suspend if there is nothing in the stack
- if (stackSize == 0)
- return;
- switch (action)
- {
- case ACTION_SUSPEND:
- debuggerSuspendedClient(breakpoint);
- break;
- case ACTION_STEP_OVER:
- // suspend if we are in the same template or we are moving up the stack
- if (styleFrame.equals(stepOverFrame) || stackSize < stepOverStackSize)
- debuggerSuspendedStep(breakpoint);
- break;
- case ACTION_STEP_INTO:
- debuggerSuspendedStep(breakpoint);
- break;
- case ACTION_STEP_RETURN:
- // suspend if we moved up the stack
- if (stackSize < stepOverStackSize)
- debuggerSuspendedStep(breakpoint);
- break;
- default:
- checkBreakpoint(breakpoint);
- }
- }
-
- private synchronized void checkBreakpoint(BreakPoint breakpoint)
- {
- if (isBreakpoint(breakpoint))
- debuggerSuspendedBreakpoint(breakpoint);
- }
-
- /**
- * Called when the next transform in the pipeline has begun.
- */
- public synchronized void debuggerTransformStarted()
- {
- stack.clear();
- }
-
- protected synchronized void debuggerStarted()
- {
- action = ACTION_DO_NOTHING;
- sendEvent(EVENT_STARTED);
- }
-
- protected synchronized void debuggerStopped()
- {
- action = ACTION_DO_NOTHING;
- sendEvent(EVENT_STOPPED);
- }
-
- private synchronized void debuggerQuit()
- {
- // just wait here indefinitely until the JVM exists, just to make sure
- // we don't send any further events
- try
- {
- wait();
- }
- catch (InterruptedException e)
- {
- }
- }
-
- private synchronized void debuggerSuspendedBreakpoint(BreakPoint breakpoint)
- {
- sendEvent("suspended breakpoint " + breakpoint); //$NON-NLS-1$
- debuggerSuspended(breakpoint);
- }
-
- private synchronized void debuggerSuspendedStep(BreakPoint breakpoint)
- {
- sendEvent(EVENT_SUSPENDED_STEP);
- debuggerSuspended(breakpoint);
- }
-
- private synchronized void debuggerSuspendedClient(BreakPoint breakpoint)
- {
- sendEvent(EVENT_SUSPENDED);
- debuggerSuspended(breakpoint);
- }
-
- public synchronized void debuggerSuspended(BreakPoint breakpoint)
- {
- this.breakpoint = breakpoint;
- do
- {
- try
- {
- wait();
- }
- catch (InterruptedException e)
- {
- }
- }
- while (action != ACTION_RESUME && action != ACTION_STEP_INTO && action != ACTION_STEP_OVER && action != ACTION_STEP_RETURN && action != ACTION_STOP);
- debuggerResumed();
- }
-
- private synchronized void debuggerResumed()
- {
- if (action == ACTION_STEP_INTO || action == ACTION_STEP_OVER || action == ACTION_STEP_RETURN)
- sendEvent(EVENT_RESUMED_STEP);
- else
- sendEvent(EVENT_RESUMED);
- }
-
- private synchronized void sendEvent(String event)
- {
- try
- {
- log.info("Sending event: " + event+" eventWriter="+eventWriter); //$NON-NLS-1$//$NON-NLS-2$
- eventWriter.write(event + "\n"); //$NON-NLS-1$
- eventWriter.flush();
- }
- catch (IOException e)
- {
- log.error("Error sending event", e); //$NON-NLS-1$
- }
- }
-
- public void addBreakpoint(BreakPoint breakpoint)
- {
- log.info("Adding breakpoint: " + breakpoint); //$NON-NLS-1$
- breakpoints.add(breakpoint);
- }
-
- public void removeBreakpoint(BreakPoint breakpoint)
- {
- log.info("Removing breakpoint: " + breakpoint); //$NON-NLS-1$
- breakpoints.remove(breakpoint);
- }
-
- private boolean isBreakpoint(BreakPoint breakpoint)
- {
- // do not check for breakpoint unless the line or filename actually changed
- if (breakpoint.equals(this.breakpoint))
- return false;
- this.breakpoint = null;
- return breakpoints.contains(breakpoint);
- }
-
- /**
- * Pop a style frame from the stack.
- *
- * @return the popped style frame
- */
- public StyleFrame popStyleFrame()
- {
- synchronized (stack)
- {
- StyleFrame styleFrame = (StyleFrame) stack.pop();
- if (styleFrame.getParent() != null)
- styleFrame.getParent().removeChild(styleFrame);
- log.trace("Popped frame: " + styleFrame + " (size after pop=" + stack.size() + ")"); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
- return styleFrame;
- }
- }
-
- /**
- * Push a style frame onto the stack.
- *
- * @param styleFrame
- */
- public void pushStyleFrame(StyleFrame styleFrame)
- {
- synchronized (stack)
- {
- stack.push(styleFrame);
- log.trace("Pushed frame: " + styleFrame + " (size after push=" + stack.size() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
-
- /**
- * Peek a style frame from the stack.
- *
- * @return the peeked style frame
- */
- public StyleFrame peekStyleFrame()
- {
- synchronized (stack)
- {
- if (stack.size() > 0)
- return (StyleFrame) stack.peek();
- return null;
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/debugger/BreakPoint.java b/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/debugger/BreakPoint.java
deleted file mode 100644
index 0b6000d..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/debugger/BreakPoint.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.debugger;
-
-/**
- * A line number in a file.
- *
- * @author Doug Satchwell
- */
-public class BreakPoint
-{
- private String file;
- private final int line;
-
- /**
- * Construct a new instance of this for the given file and line number.
- *
- * @param file the file path
- * @param line the line number
- */
- public BreakPoint(String file, int line)
- {
- this.file = file;
- this.line = line;
- }
-
- /**
- * Get the file location.
- *
- * @return the file
- */
- public String getFile()
- {
- return file;
- }
-
- /**
- * Get the line number
- *
- * @return the line number
- */
- public int getLine()
- {
- return line;
- }
-
- public int hashCode()
- {
- int hash = 3 * file.hashCode() + 5 * line;
- return hash;
- }
-
- public boolean equals(Object obj)
- {
- if (obj == this)
- return true;
- if (obj instanceof BreakPoint)
- {
- BreakPoint b = (BreakPoint) obj;
- return b.file.equals(file) && b.line == line;
- }
- return false;
- }
-
- public String toString()
- {
- return file + " " + line; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/debugger/DebugConstants.java b/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/debugger/DebugConstants.java
deleted file mode 100644
index 2383a29..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/debugger/DebugConstants.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.debugger;
-
-/**
- * Constants used by the debugger.
- *
- * <p>
- * Note that class is loaded both on the Eclipse classpath and the
- * launched transformation process, such that they can use exactly the same constants
- * for communication.
- * </p>
- *
- * @author Doug Satchwell
- */
-public class DebugConstants
-{
- /**
- * The constant used to notify the debugger to start.
- */
- public static final String REQUEST_START = "start"; //$NON-NLS-1$
- /**
- * The constant used to signify addition of a breakpoint.
- */
- public static final String REQUEST_ADD_BREAKPOINT = "add"; //$NON-NLS-1$
- /**
- * The constant used to signify removal of a breakpoint.
- */
- public static final String REQUEST_REMOVE_BREAKPOINT = "remove"; //$NON-NLS-1$
- /**
- * The constant used to signify step into.
- */
- public static final String REQUEST_STEP_INTO = "step into"; //$NON-NLS-1$
- /**
- * The constant used to signify step over.
- */
- public static final String REQUEST_STEP_OVER = "step over"; //$NON-NLS-1$
- /**
- * The constant used to signify suspension.
- */
- public static final String REQUEST_SUSPEND = "suspend"; //$NON-NLS-1$
- /**
- * The constant used to signify resume.
- */
- public static final String REQUEST_RESUME = "resume"; //$NON-NLS-1$
- /**
- * The constant used to request the stack.
- */
- public static final String REQUEST_STACK = "stack"; //$NON-NLS-1$
- /**
- * The constant used to request a variable.
- */
- public static final String REQUEST_VARIABLE = "var"; //$NON-NLS-1$
- /**
- * The constant used to request a variable value.
- */
- public static final String REQUEST_VALUE = "value"; //$NON-NLS-1$
- /**
- * The constant used to signify step return.
- */
- public static final String REQUEST_STEP_RETURN = "step return"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/debugger/DebugRunner.java b/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/debugger/DebugRunner.java
deleted file mode 100644
index 1be1ce2..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/debugger/DebugRunner.java
+++ /dev/null
@@ -1,400 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.debugger;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.PrintWriter;
-import java.io.Writer;
-import java.net.InetAddress;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.net.URL;
-import java.util.Map;
-import java.util.Properties;
-
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.URIResolver;
-import javax.xml.transform.sax.SAXSource;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.eclipse.wst.xsl.jaxp.debug.invoker.IProcessorInvoker;
-import org.eclipse.wst.xsl.jaxp.debug.invoker.PipelineDefinition;
-import org.eclipse.wst.xsl.jaxp.debug.invoker.TransformationException;
-import org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker;
-import org.xml.sax.InputSource;
-
-/**
- * The entry point to the debug process which is responsible for configuring a debugger
- * and then communicating with the Eclipse process via sockets using a common set of commands.
- *
- * <ul>
- * <li>instantiates an implementation of <code>IXSLDebugger</code>
- * <li>configures the debugger with the transformation pipeline
- * <li>starts the debugger in a separate thread
- * <li>the main thread is then used to listen to incoming requests and call the appropriate debugger methods
- * </ul>
- *
- * @author Doug Satchwell
- */
-public class DebugRunner
-{
- private static final Log log = LogFactory.getLog(DebugRunner.class);
-
- private final BufferedReader requestIn;
- private final Writer requestOut;
- private final Writer eventOut;
- private final Writer generatedStream;
- private Socket eventSocket;
- private Socket requestSocket;
- private Socket generateSocket;
-
- /**
- * Create a new instance of this using the supplied readers and writers.
- *
- * @param requestIn the reader for reading incoming requests
- * @param requestOut the writer for acknowledging requests
- * @param eventOut the writer for publishing debug events
- */
- public DebugRunner(BufferedReader requestIn, PrintWriter requestOut, PrintWriter eventOut, PrintWriter generatedStream)
- {
- this.requestOut = requestOut;
- this.requestIn = requestIn;
- this.eventOut = eventOut;
- this.generatedStream = generatedStream;
- }
-
- /**
- * Create a new instance of this given a request port and an event port.
- *
- * @param requestPort the port to listen to requests and send acknowledgements
- * @param eventPort the port for publishing debug events
- * @throws IOException if there was a problem opening a socket
- */
- public DebugRunner(int requestPort, int eventPort, int generatePort) throws IOException
- {
- requestSocket = getSocket(requestPort);
- eventSocket = getSocket(eventPort);
- generateSocket = getSocket(generatePort);
- requestIn = new BufferedReader(new InputStreamReader(requestSocket.getInputStream()));
- requestOut = new PrintWriter(requestSocket.getOutputStream(), true);
- eventOut = new PrintWriter(eventSocket.getOutputStream(), true);
- generatedStream = new BufferedWriter(new PrintWriter(generateSocket.getOutputStream(), true));
- }
-
- /**
- * This method starts the given debugger in its own thread, and blocks while waiting
- * for incoming requests from the request port, until there are no more requests.
- *
- * @param debugger the debugger to start in a thread
- * @throws TransformationException if a problem occurred while transforming
- * @throws IOException
- */
- public void loop(IXSLDebugger debugger) throws TransformationException, IOException
- {
- debugger.setEventWriter(eventOut);
- debugger.setGeneratedWriter(generatedStream);
- String inputLine, response;
- // signal we are ready to receive requests
- eventOut.write("ready\n"); //$NON-NLS-1$
- eventOut.flush();
- log.debug("entering loop"); //$NON-NLS-1$
- try
- {
- while ((inputLine = requestIn.readLine()) != null)
- {
- response = inputLine;
- log.debug("REQUEST:" + inputLine); //$NON-NLS-1$
- Thread debuggerThread = null;
- if (DebugConstants.REQUEST_START.equals(inputLine))
- {
- debuggerThread = new Thread(debugger, "debugger"); //$NON-NLS-1$
- debuggerThread.start();
- }
- /*
- * else if (REQUEST_QUIT.equals(inputLine)) { }
- */
- else if (DebugConstants.REQUEST_STEP_INTO.equals(inputLine))
- {
- debugger.stepInto();
- }
- else if (DebugConstants.REQUEST_STEP_OVER.equals(inputLine))
- {
- debugger.stepOver();
- }
- else if (DebugConstants.REQUEST_STEP_RETURN.equals(inputLine))
- {
- debugger.stepReturn();
- }
- else if (DebugConstants.REQUEST_SUSPEND.equals(inputLine))
- {
- debugger.suspend();
- }
- else if (DebugConstants.REQUEST_RESUME.equals(inputLine))
- {
- debugger.resume();
- }
- else if (DebugConstants.REQUEST_STACK.equals(inputLine))
- {
- response = debugger.stack();
- }
- else if (inputLine.startsWith(DebugConstants.REQUEST_VARIABLE))
- {
- String data = inputLine.substring(DebugConstants.REQUEST_VARIABLE.length() + 1);
- int id = Integer.parseInt(data);
- Variable var = debugger.getVariable(id);
- log.debug("var "+id+" = "+var); //$NON-NLS-1$ //$NON-NLS-2$
- response = var.getScope() + "&" + var.getName(); //$NON-NLS-1$
- }
- else if (inputLine.startsWith(DebugConstants.REQUEST_VALUE))
- {
- String data = inputLine.substring(DebugConstants.REQUEST_VALUE.length() + 1);
- int id = Integer.parseInt(data);
- Variable var = debugger.getVariable(id);
- response = var.getType() + "&" + var.getValueFirstLine(); //$NON-NLS-1$
- }
- else if (inputLine.startsWith(DebugConstants.REQUEST_ADD_BREAKPOINT))
- {
- int index = inputLine.lastIndexOf(' ');
- String file = inputLine.substring(DebugConstants.REQUEST_ADD_BREAKPOINT.length() + 1, index);
- String line = inputLine.substring(index + 1);
- BreakPoint breakpoint = new BreakPoint(file, Integer.parseInt(line));
- debugger.addBreakpoint(breakpoint);
- }
- else if (inputLine.startsWith(DebugConstants.REQUEST_REMOVE_BREAKPOINT))
- {
- int index = inputLine.lastIndexOf(' ');
- String file = inputLine.substring(DebugConstants.REQUEST_REMOVE_BREAKPOINT.length() + 1, index);
- String line = inputLine.substring(index + 1);
- BreakPoint breakpoint = new BreakPoint(file, Integer.parseInt(line));
- debugger.removeBreakpoint(breakpoint);
- }
- else
- {
- response = "What?"; //$NON-NLS-1$
- }
- // confirm request
- log.debug("RESPONSE:" + response); //$NON-NLS-1$
- requestOut.write(response + "\n"); //$NON-NLS-1$
- requestOut.flush();
-
- /*
- * if (REQUEST_QUIT.equals(inputLine)) { waitForFinish(debuggerThread); break; }
- */
- }
- }
- catch (Exception e)
- {
- throw new TransformationException(e.getMessage(), e);
- }
- log.debug("exited loop"); //$NON-NLS-1$
- eventOut.write("terminated\n"); //$NON-NLS-1$
- eventOut.flush();
- }
-
- /**
- * Dispose of this - close all open sockets.
- * @throws IOException
- */
- public void dispose() throws IOException
- {
- if (requestIn != null)
- {
- try
- {
- requestIn.close();
- }
- catch (IOException e)
- {
- log.error("Could not close request input stream", e); //$NON-NLS-1$
- }
- }
- if (requestOut != null)
- {
- requestOut.close();
- }
- if (eventOut != null)
- {
- eventOut.close();
- }
- if (requestSocket != null)
- {
- try
- {
- requestSocket.close();
- }
- catch (IOException e)
- {
- log.error("Could not close request socket", e); //$NON-NLS-1$
- }
- }
- if (eventSocket != null)
- {
- try
- {
- eventSocket.close();
- }
- catch (IOException e)
- {
- log.error("Could not close event socket", e); //$NON-NLS-1$
- }
- }
- }
-
- private static Socket getSocket(int port) throws IOException
- {
- InetAddress localhost = InetAddress.getByName("localhost"); //$NON-NLS-1$
- ServerSocket serverSocket = new ServerSocket(port, 5, localhost);
- Socket clientSocket = serverSocket.accept();
- serverSocket.close();
- return clientSocket;
- }
-
- /**
- * Expected arguments:
- *
- * <ol>
- * <li>the class name of the invoker
- * <li>the file name of the XML launch configuration file
- * <li>the URL of the source document
- * <li>the file of the output document
- * <li>not used (anything)
- * <li>the class name of the <code>IXSLDebugger</code> instance
- * <li>the port used for requests
- * <li>the port used for debug events
- * <li>the port used for generate events
- * </ol>
- *
- * @param args
- */
- public static void main(String[] args)
- {
- log.info("javax.xml.transform.TransformerFactory=" + System.getProperty("javax.xml.transform.TransformerFactory")); //$NON-NLS-1$//$NON-NLS-2$
- log.info("java.endorsed.dirs=" + System.getProperty("java.endorsed.dirs")); //$NON-NLS-1$//$NON-NLS-2$
-
- String invokerClassName = args[0];
- File launchFile = new File(args[1]);
- String src = args[2];
- String target = args[3];
- String debuggerClassName = args[5];
-
- log.info("src: " + src); //$NON-NLS-1$
- log.info("target: " + target); //$NON-NLS-1$
- log.info("launchFile: " + launchFile); //$NON-NLS-1$
- log.info("debugger: " + debuggerClassName); //$NON-NLS-1$
-
- DebugRunner debugRunner = null;
- try
- {
- final IXSLDebugger debugger = createDebugger(debuggerClassName);
- // create the invoker
- IProcessorInvoker invoker = new JAXPSAXProcessorInvoker()
- {
-
- protected TransformerFactory createTransformerFactory()
- {
- TransformerFactory tFactory = super.createTransformerFactory();
- debugger.setTransformerFactory(tFactory);
- return tFactory;
- }
-
- public void addStylesheet(URL stylesheet, Map parameters, Properties outputProperties, URIResolver resolver) throws TransformerConfigurationException
- {
- InputSource inputsource = new InputSource(stylesheet.toString());
- // if required in future, parse the document with line numbers (to get the end line numbers)
-// XMLReaderWrapper reader = new XMLReaderWrapper(createReader());
-// SAXSource source = new SAXSource(reader,inputsource);
- addStylesheet(new SAXSource(inputsource), resolver, parameters, outputProperties);
- }
-
- protected Transformer addStylesheet(Source source, URIResolver resolver, Map parameters, Properties outputProperties) throws TransformerConfigurationException
- {
- Transformer transformer = super.addStylesheet(source, resolver, parameters, outputProperties);
- debugger.addTransformer(transformer);
- return transformer;
- }
- };
-
- if (args.length == 9)
- {
- int requestPort = Integer.parseInt(args[6]);
- int eventPort = Integer.parseInt(args[7]);
- int generatePort = Integer.parseInt(args[8]);
-
- log.debug("requestPort: " + requestPort); //$NON-NLS-1$
- log.debug("eventPort: " + eventPort); //$NON-NLS-1$
- log.debug("generatePort: " + generatePort); //$NON-NLS-1$
-
- try
- {
- debugRunner = new DebugRunner(requestPort, eventPort, generatePort);
- }
- catch (Exception e)
- {
- handleFatalError("Could not instantiate invoker: " + invokerClassName, e); //$NON-NLS-1$
- }
- }
- else
- {
- BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
- debugRunner = new DebugRunner(br, new PrintWriter(System.out), new PrintWriter(System.err), null);
- System.out.println("xsl>"); //$NON-NLS-1$
- }
-
- PipelineDefinition pipeline = new PipelineDefinition(launchFile);
- pipeline.configure(invoker);
-
- debugger.setInvoker(invoker);
- debugger.setSource(new URL(src));
- debugger.setTarget(new FileWriter(new File(target)));
-
- debugRunner.loop(debugger);
- }
- catch (Exception e)
- {
- handleFatalError(e.getMessage(), e);
- }
- finally
- {
- if (debugRunner != null)
- {
- try
- {
- debugRunner.dispose();
- }
- catch (IOException e)
- {
- handleFatalError(e.getMessage(), e);
- }
- }
- }
- }
-
- private static IXSLDebugger createDebugger(String classname) throws ClassNotFoundException, InstantiationException, IllegalAccessException
- {
- Class clazz = Class.forName(classname);
- return (IXSLDebugger) clazz.newInstance();
- }
-
- private static void handleFatalError(String msg, Throwable t)
- {
- log.fatal(msg, t);
- System.exit(1);
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/debugger/IXSLDebugger.java b/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/debugger/IXSLDebugger.java
deleted file mode 100644
index b4f0b0e..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/debugger/IXSLDebugger.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.debugger;
-
-import java.io.Writer;
-import java.net.URL;
-
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerFactory;
-
-import org.eclipse.wst.xsl.jaxp.debug.invoker.IProcessorInvoker;
-
-/**
- * An interface to XSL debugger instances.
- *
- * @author Doug Satchwell
- */
-public interface IXSLDebugger extends Runnable
-{
- /**
- * Set the invoker to use.
- *
- * @param invoker the invoker to set
- */
- void setInvoker(IProcessorInvoker invoker);
-
- /**
- * Set the transformer factory to use.
- *
- * @param factory the factory to use
- */
- void setTransformerFactory(TransformerFactory factory);
-
- /**
- * Add a transformer to this.
- *
- * @param transformer
- */
- void addTransformer(Transformer transformer);
-
- /**
- * Set the Writer for this to write events to.
- *
- * @param writer the writer to write events to
- */
- void setEventWriter(Writer writer);
-
- /**
- * Set the ObjectOutputStream for this to write generated events to.
- *
- * @param writer the stream to write generate events to
- */
- void setGeneratedWriter(Writer writer);
-
- /**
- * Set the URL of the transformation source file.
- *
- * @param sourceURL the source URL
- */
- void setSource(URL sourceURL);
-
- /**
- * Set the transformation Result.
- *
- * @param writer the result
- */
- void setTarget(Writer writer);
-
- /**
- * Add a breakpoint to this.
- *
- * @param breakpoint
- */
- void addBreakpoint(BreakPoint breakpoint);
-
- /**
- * Remove a breakpoint from this.
- *
- * @param breakpoint
- */
- void removeBreakpoint(BreakPoint breakpoint);
-
- /**
- * Perform a 'step into' operation.
- */
- void stepInto();
-
- /**
- * Perform a 'step over' operation.
- */
- void stepOver();
-
- /**
- * Perform a 'step return' operation.
- */
- void stepReturn();
-
- /**
- * Perform a 'suspend' operation.
- */
- void suspend();
-
- /**
- * Perform a 'resume' operation.
- */
- void resume();
-
- /**
- * Quit debugging.
- */
- void quit();
-
- /**
- * Generate a string that represents the current call stack of frames and their variables.
- * <p>
- * Frames are generated with the following format: <i>file</i>|<i>frameId</i>|<i>lineNumber</i>|<i>name</i>
- * This is immediately followed with the id's of the frame's variables (each variable id being unique for the whole process).
- * </p>
- * <p>
- * The separator for frames is $$$. Within a frame, the separator for variable id's is |.
- * </p>
- * <p>
- * e.g. file:/tran1.xsl|1|12|xsl:template name="temp1"|1|2|3$$$file:/tran2.xsl|2|34|xsl:template name="temp2"|4|5|6
- *
- * This defines 2 frames with id's 1 and 2, which are occur in files tran1.xsl and tran2.xsl respectively.
- * Frame 1 is currently at line 12, in a template with name temp1, and it defines 3 variables with id's 1, 2 and 3.
- * </p>
- *
- * @return the generated string
- */
- String stack();
-
- /**
- * Get the variable with the given id.
- *
- * @param id the id of the variable
- * @return the variable
- */
- Variable getVariable(int id);
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/debugger/StyleFrame.java b/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/debugger/StyleFrame.java
deleted file mode 100644
index f77ef9a..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/debugger/StyleFrame.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.debugger;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * An <code>xsl:template</code> that forms part of the call stack.
- *
- * @author Doug Satchwell
- */
-public abstract class StyleFrame
-{
- private static int nextId;
- private final StyleFrame parent;
- private final List children = new ArrayList();
- private final int id;
-
- /**
- * Create a new instance of this using the given frame as its parent (may be null if this is the root frame).
- *
- * @param parent the parent frame
- */
- public StyleFrame(StyleFrame parent)
- {
- this.id = nextId++;
- this.parent = parent;
- if (parent != null)
- parent.addChild(this);
- }
-
- /**
- * A unique id for this frame
- *
- * @return a unique id for this frame
- */
- public int getId()
- {
- return id;
- }
-
- /**
- * Get the name of this frame.
- *
- * @return the name of this
- */
- public abstract String getName();
-
- /**
- * Get the file in which this frame is found.
- *
- * @return the filename for this
- */
- public abstract String getFilename();
-
- /**
- * Get the line number at which the frame is currently located.
- *
- * @return the line number at which this is held
- */
- public abstract int getCurrentLine();
-
- /**
- * Get a list of <code>Variables</code>'s
- *
- * @return the list of variables for this frame
- */
- public abstract List getVariableStack();
-
- /**
- * Get the parent of this.
- *
- * @return the parent frame
- */
- public StyleFrame getParent()
- {
- return parent;
- }
-
- /**
- * Add a child frame to this.
- *
- * @param child the frame to add
- */
- public void addChild(StyleFrame child)
- {
- children.add(child);
- }
-
- /**
- * Remove a child frame from this.
- *
- * @param child the frame to remove
- */
- public void removeChild(StyleFrame child)
- {
- children.remove(child);
- }
-
- /**
- * Get the children of this
- *
- * @return a list of <code>StyleFrame</code>'s
- */
- public List getChildren()
- {
- return children;
- }
-
- /**
- * Creates a string in the format <i>file</i>|<i>frameId</i>|<i>lineNumber</i>|<i>name</i>.
- * Since pipe is used as a separator, the name has any pipe (|) characters replaced with the literal '%@_PIPE_@%'
- */
- public String toString()
- {
- String safename = getName().replaceAll("\\|", "%@_PIPE_@%"); //$NON-NLS-1$//$NON-NLS-2$
- return getFilename() + "|" + getId() + "|" + getCurrentLine() + "|" + safename; //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/debugger/Variable.java b/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/debugger/Variable.java
deleted file mode 100644
index ace25eb..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/debugger/Variable.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- * David Carver (STAR) - bug 214235 - Changed max value size to 2meg.
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.debugger;
-
-/**
- * An abstract class that XSL processor implementations can subclass for their variables.
- *
- * @author Doug Satchwell
- * @author David Carver
- */
-public abstract class Variable
-{
- private static int idSequence = 0;
-
- /**
- * The constant denoting a local scope variable.
- */
- public static final String LOCAL_SCOPE = "L"; //$NON-NLS-1$
- /**
- * The constant denoting a tunnel scope variable.
- */
- public static final String TUNNEL_SCOPE = "T"; //$NON-NLS-1$
- /**
- * The constant denoting a global scope variable.
- */
- public static final String GLOBAL_SCOPE = "G"; //$NON-NLS-1$
-
- protected final static int MAXIMUM_VALUE_SIZE = 2097152;
-
- protected static final String UNRESOLVED = "unresolved"; //$NON-NLS-1$
- protected static final String BOOLEAN = "boolean"; //$NON-NLS-1$
- protected static final String NUMBER = "number"; //$NON-NLS-1$
- protected static final String STRING = "string"; //$NON-NLS-1$
- protected static final String NODESET = "nodeset"; //$NON-NLS-1$
- protected static final String OBJECT = "object"; //$NON-NLS-1$
- protected static final String UNKNOWN = "unknown"; //$NON-NLS-1$
-
- protected final String name;
- protected final String scope;
- protected final int slotNumber;
-
- private int id;
-
- /**
- * Create a new instance of this with the given name, scope and slot number.
- *
- * @param name the name of this
- * @param scope the scope of this
- * @param slotNumber the slot number of this
- */
- public Variable(String name, String scope, int slotNumber)
- {
- this.name = name;
- this.scope = scope;
- this.slotNumber = slotNumber;
- this.id = idSequence++;
- }
-
- /**
- * Get the id used for this.
- *
- * @return the variable id
- */
- public int getId()
- {
- return id;
- }
-
- /**
- * Get the variable name.
- *
- * @return the variable name
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * Get the type of this variable e.g. string, or node
- *
- * @return the variable type
- */
- public abstract String getType();
-
- /**
- * Get the scope of this variable - one of <code>LOCAL_SCOPE</code>, <code>TUNNEL_SCOPE</code> or <code>GLOBAL_SCOPE</code>.
- *
- * @return the variable scope
- */
- public String getScope()
- {
- return scope;
- }
-
- /**
- * Get the current value of this variable as a String.
- *
- * @return the value of this
- */
- public abstract String getValue();
-
- /**
- * Get the first line of the value truncating to <code>MAXIMUM_VALUE_SIZE</code> where necessary.
- *
- * @return the first line of the value
- */
- public String getValueFirstLine()
- {
- String value = getValue();
- if (value != null)
- {
- // make sure it is not too long
- value = value.replace('\n', '.');
- if (value.length() > MAXIMUM_VALUE_SIZE)
- value = value.substring(0, MAXIMUM_VALUE_SIZE);
- }
- else
- value = ""; //$NON-NLS-1$
- return value;
- }
-
- /**
- * Get the slot number for this.
- *
- * @return the slot number
- */
- public int getSlotNumber()
- {
- return slotNumber;
- }
-
- public int hashCode()
- {
- return 3 * scope.hashCode() + 5 * slotNumber;
- }
-
- public boolean equals(Object obj)
- {
- if (obj == this)
- return true;
- if (obj instanceof Variable)
- {
- Variable v = (Variable) obj;
- return v.scope.equals(scope) && slotNumber == v.slotNumber;
- }
- return false;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/IProcessorInvoker.java b/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/IProcessorInvoker.java
deleted file mode 100644
index 21b657b..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/IProcessorInvoker.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.invoker;
-
-import java.net.URL;
-import java.util.Map;
-import java.util.Properties;
-
-import javax.xml.transform.Result;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.URIResolver;
-
-
-/**
- * Interface used by the launched process to define the XSL transformation pipeline.
- * The <code>setAttributes</code> and <code>addStylesheet</code> methods should be called
- * before calling <code>transform</code> to do the actual transformation.
- *
- * <p>
- * If <code>addStylesheet</code> is not called before <code>transform</code>, then
- * it is assumed that the source document contains and embedded stylesheet instruction.
- * </p>
- *
- * @author Doug Satchwell
- */
-public interface IProcessorInvoker
-{
- /**
- * Set the processor-specific attributes to use.
- *
- * @param attributes a map of String v. String attributes
- */
- void setAttributes(Map attributes);
-
- /**
- * Add a stylesheet to the pipeline (order is important).
- *
- * @param stylesheet the URL of the stylesheet to add
- * @param parameters the map of parameters for the stylesheet
- * @param outputProperties the output properties
- * @param resolver the <code>URIResolver</code> to use
- * @throws TransformerConfigurationException if stylesheet could not be added
- */
- void addStylesheet(URL stylesheet, Map parameters, Properties outputProperties, URIResolver resolver) throws TransformerConfigurationException;
-
- /**
- * Perform the actual transformation.
- *
- * @param source the URL of the XML source document
- * @param res the transformation result
- * @throws TransformationException if the transformation failed
- */
- void transform(URL source, Result res) throws TransformationException;
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/Messages.java b/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/Messages.java
deleted file mode 100644
index 9e6942a..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/Messages.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.invoker;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * Messages for the configuration.
- *
- * @author Doug Satchwell
- */
-class Messages
-{
- private static final String BUNDLE_NAME = "org.eclipse.wst.xsl.jaxp.debug.invoker.messages"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
-
- private Messages()
- {
- }
-
- /**
- * Get a message for the given key.
- *
- * @param key the message key
- * @return the message
- */
- public static String getString(String key)
- {
- try
- {
- return RESOURCE_BUNDLE.getString(key);
- }
- catch (MissingResourceException e)
- {
- return '!' + key + '!';
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/PipelineDefinition.java b/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/PipelineDefinition.java
deleted file mode 100644
index 198f999..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/PipelineDefinition.java
+++ /dev/null
@@ -1,301 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.invoker;
-
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.TransformerConfigurationException;
-
-import org.eclipse.wst.xsl.jaxp.debug.invoker.internal.ConfigurationException;
-import org.eclipse.wst.xsl.jaxp.debug.invoker.internal.CreationException;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-import org.xml.sax.SAXException;
-
-/**
- * The definition of the transformation pipeline.
- * <p>
- * This class is loaded on both the Eclipse classpath and the transformation process's classpath.
- * The whole definition is serialized to an XML document by the Eclipse launcher, and is then
- * read by the transformation process when launched.
- * </p>
- *
- * @author Doug Satchwell
- */
-public class PipelineDefinition
-{
- private String sourceURL;
- private String targetFile;
- private final List transformDefs = new ArrayList();
- private final Set attributes = new HashSet();
- private boolean useEmbedded;
-
- /**
- * Create a new empty instance of this.
- */
- public PipelineDefinition()
- {
- }
-
- /**
- * Create a new instance of this by reading the specified XML file.
- *
- * @param launchFile the XSL file to load
- * @throws SAXException if problems occur during parsing
- * @throws IOException if problems occur during parsing
- * @throws ParserConfigurationException if problems occur during parsing
- */
- public PipelineDefinition(File launchFile) throws SAXException, IOException, ParserConfigurationException
- {
- this(DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new BufferedInputStream(new FileInputStream(launchFile))));
- }
-
- /**
- * Create a new instance of this from the specified document
- *
- * @param doc the Document to create this from
- */
- public PipelineDefinition(Document doc)
- {
- Element rootEl = doc.getDocumentElement();
-
- Element attributesEl = (Element) rootEl.getElementsByTagName("Attributes").item(0); //$NON-NLS-1$
- NodeList attributeEls = attributesEl.getElementsByTagName("Attribute"); //$NON-NLS-1$
- for (int i = 0; i < attributeEls.getLength(); i++)
- {
- Element attributeEl = (Element) attributeEls.item(i);
- String name = attributeEl.getAttribute("name"); //$NON-NLS-1$
- String type = attributeEl.getAttribute("type"); //$NON-NLS-1$
- String value = attributeEl.getAttribute("value"); //$NON-NLS-1$
- addAttribute(new TypedValue(name, type, value));
- }
-
- Element transformsEl = (Element) rootEl.getElementsByTagName("Transforms").item(0); //$NON-NLS-1$
- String useEmbedded = transformsEl.getAttribute("useEmbedded"); //$NON-NLS-1$
- boolean embedded = Boolean.getBoolean(useEmbedded);
- setUseEmbedded(embedded);
- if (!embedded)
- {
- NodeList transformEls = transformsEl.getElementsByTagName("Transform"); //$NON-NLS-1$
- for (int i = 0; i < transformEls.getLength(); i++)
- {
- Element transformEl = (Element) transformEls.item(i);
- TransformDefinition tdef = TransformDefinition.fromXML(transformEl);
- addTransformDef(tdef);
- }
- }
- }
-
- /**
- * Configure the invoker from this.
- *
- * @param invoker the invoker to configure
- * @throws ConfigurationException if an exception occurs during configuration
- */
- public void configure(IProcessorInvoker invoker) throws ConfigurationException
- {
- Map attVals = new HashMap();
- for (Iterator iter = attributes.iterator(); iter.hasNext();)
- {
- TypedValue att = (TypedValue) iter.next();
- Object value;
- try
- {
- value = att.createValue();
- }
- catch (CreationException e)
- {
- throw new ConfigurationException(e.getMessage(), e);
- }
- attVals.put(att.uri, value);
- }
- invoker.setAttributes(attVals);
-
- for (Iterator iter = transformDefs.iterator(); iter.hasNext();)
- {
- TransformDefinition tdef = (TransformDefinition) iter.next();
- Map params = null;
- try
- {
- params = tdef.getParametersAsMap();
- }
- catch (CreationException e)
- {
- throw new ConfigurationException(Messages.getString("PipelineDefinition.8"), e); //$NON-NLS-1$
- }
- URL url = null;
- try
- {
- url = new URL(tdef.getStylesheetURL());
- }
- catch (MalformedURLException e)
- {
- throw new ConfigurationException(Messages.getString("PipelineDefinition.9") + tdef.getStylesheetURL(), e); //$NON-NLS-1$
- }
- Properties properties = tdef.getOutputProperties();
- try
- {
- invoker.addStylesheet(url, params, properties, null);
- }
- catch (TransformerConfigurationException e)
- {
- throw new ConfigurationException(Messages.getString("PipelineDefinition.10") + tdef.getStylesheetURL(), null); //$NON-NLS-1$
- }
- }
- }
-
- /**
- * Get the set of attributes defined.
- *
- * @return the set of attributes
- */
- public Set getAttributes()
- {
- return attributes;
- }
-
- /**
- * Add a attribute to this configuration
- *
- * @param attribute the attribute to add
- */
- public void addAttribute(TypedValue attribute)
- {
- attributes.add(attribute);
- }
-
- /**
- * Remove a attribute from the set of attributes
- *
- * @param attribute the attribute to remove
- */
- public void removeAttribute(TypedValue attribute)
- {
- attributes.remove(attribute);
- }
-
- /**
- * Get the list of <code>TransformDefinition</code>'s.
- *
- * @return the list of transform definitions
- */
- public List getTransformDefs()
- {
- return transformDefs;
- }
-
- /**
- * Add a transform definition to this.
- *
- * @param tdef the transform definition to add
- */
- public void addTransformDef(TransformDefinition tdef)
- {
- transformDefs.add(tdef);
- }
-
- /**
- * Remove a transform definition from this.
- *
- * @param tdef the transform definition to remove
- */
- public void removeTransformDef(TransformDefinition tdef)
- {
- transformDefs.remove(tdef);
- }
-
- /**
- * Set whether to use an XSL declaration embedded in the XML file
- *
- * @param embedded true to use embedded
- */
- public void setUseEmbedded(boolean embedded)
- {
- useEmbedded = embedded;
- }
-
- /**
- * Get whether to use an XSL declaration embedded in the XML file
- *
- * @return true if embedded
- */
- public boolean useEmbedded()
- {
- return useEmbedded;
- }
-
- /**
- * Serialize this to a DOM Document.
- *
- * @return the serialized document
- * @throws ParserConfigurationException if a problem occurs during serialization
- */
- public Document toXML() throws ParserConfigurationException
- {
- Document doc = newDocument();
- Element rootEl = doc.createElement("Pipeline"); //$NON-NLS-1$
- rootEl.setAttribute("source", sourceURL); //$NON-NLS-1$
- rootEl.setAttribute("target", targetFile); //$NON-NLS-1$
- doc.appendChild(rootEl);
-
- Element attributesEl = doc.createElement("Attributes"); //$NON-NLS-1$
- rootEl.appendChild(attributesEl);
- for (Iterator iter = attributes.iterator(); iter.hasNext();)
- {
- TypedValue attribute = (TypedValue) iter.next();
- Element attributeEl = doc.createElement("Attribute"); //$NON-NLS-1$
- attributeEl.setAttribute("name", attribute.uri); //$NON-NLS-1$
- attributeEl.setAttribute("type", attribute.type); //$NON-NLS-1$
- attributeEl.setAttribute("value", attribute.value); //$NON-NLS-1$
- attributesEl.appendChild(attributeEl);
- }
-
- rootEl.setAttribute("useEmbedded", String.valueOf(useEmbedded)); //$NON-NLS-1$
- if (!useEmbedded)
- {
- Element transformsEl = doc.createElement("Transforms"); //$NON-NLS-1$
- rootEl.appendChild(transformsEl);
- for (Iterator iter = transformDefs.iterator(); iter.hasNext();)
- {
- TransformDefinition tdef = (TransformDefinition) iter.next();
- Element tdefEl = tdef.asXML(doc);
- transformsEl.appendChild(tdefEl);
- }
- }
-
- return doc;
- }
-
- private static Document newDocument() throws ParserConfigurationException
- {
- DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
- DocumentBuilder docBuilder = dfactory.newDocumentBuilder();
- Document doc = docBuilder.newDocument();
- return doc;
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/TransformDefinition.java b/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/TransformDefinition.java
deleted file mode 100644
index 8679d90..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/TransformDefinition.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.invoker;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import org.eclipse.wst.xsl.jaxp.debug.invoker.internal.CreationException;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
-/**
- * A definition of a particular step in the transformation pipeline.
- *
- * @author Doug Satchwell
- */
-public class TransformDefinition
-{
- private String stylesheetURL;
- private String resolverClass;
- private Properties outputProperties = new Properties();
- private final Set parameters = new HashSet();
-
- /**
- * Get the parameters as a map of name (<code>String</code>) v. value <code>TypedValue</code>.
- *
- * @return a map of names and values
- * @throws CreationException if an exception occurred during object creation
- */
- public Map getParametersAsMap() throws CreationException
- {
- Map m = new HashMap();
- for (Iterator iter = parameters.iterator(); iter.hasNext();)
- {
- TypedValue tv = (TypedValue) iter.next();
- String key = tv.uri;
- Object value = tv.createValue();
- m.put(key, value);
- }
- return m;
- }
-
- /**
- * The set of parameters
- *
- * @return a set of <code>TypedValue</code>'s
- */
- public Set getParameters()
- {
- return parameters;
- }
-
- /**
- * Add a parameter to the set of parameters
- *
- * @param parameter the parameter to add
- */
- public void addParameter(TypedValue parameter)
- {
- parameters.add(parameter);
- }
-
- /**
- * Remove a parameter.
- *
- * @param parameter the parameter to remove
- */
- public void removeParameter(TypedValue parameter)
- {
- parameters.remove(parameter);
- }
-
- /**
- * Get the output properties for this.
- *
- * @return the output properties
- */
- public Properties getOutputProperties()
- {
- return outputProperties;
- }
-
- /**
- * Set the output properties for this.
- *
- * @param outputProperties the output properties to set
- */
- public void setOutputProperties(Properties outputProperties)
- {
- this.outputProperties = outputProperties;
- }
-
- /**
- * Set the value of a specific output property.
- *
- * @param name the output property
- * @param value the value
- */
- public void setOutputProperty(String name, String value)
- {
- outputProperties.put(name, value);
- }
-
- /**
- * Remove an output property.
- *
- * @param name the output property to remove
- */
- public void removeOutputProperty(String name)
- {
- outputProperties.remove(name);
- }
-
- /**
- * Get the name of the <code>URIResolver</code> class to use.
- *
- * @return the resolver's class name
- */
- public String getResolverClass()
- {
- return resolverClass;
- }
-
- /**
- * Set the name of the <code>URIResolver</code> class to use.
- *
- * @param resolver the resolver's class name
- */
- public void setResolverClass(String resolver)
- {
- resolverClass = resolver;
- }
-
- /**
- * Get the URL of the stylesheet.
- *
- * @return the stylesheet URL
- */
- public String getStylesheetURL()
- {
- return stylesheetURL;
- }
-
- /**
- * Set the URL of the stylesheet.
- *
- * @param stylesheet the stylesheet URL
- */
- public void setStylesheetURL(String stylesheet)
- {
- stylesheetURL = stylesheet;
- }
-
- /**
- * Serialize this to a Document fragment.
- *
- * @param doc the document to attach to
- * @return the root element of the fragment
- */
- public Element asXML(Document doc)
- {
- Element tdefEl = doc.createElement("Transform"); //$NON-NLS-1$
- tdefEl.setAttribute(Messages.getString("TransformDefinition.1"), stylesheetURL); //$NON-NLS-1$
- if (resolverClass != null)
- tdefEl.setAttribute("uriResolver", resolverClass); //$NON-NLS-1$
- Element opEl = doc.createElement("OutputProperties"); //$NON-NLS-1$
- tdefEl.appendChild(opEl);
- for (Iterator iter = outputProperties.entrySet().iterator(); iter.hasNext();)
- {
- Map.Entry entry = (Map.Entry) iter.next();
- Element propEl = doc.createElement("Property"); //$NON-NLS-1$
- propEl.setAttribute("name", (String) entry.getKey()); //$NON-NLS-1$
- propEl.setAttribute("value", (String) entry.getValue()); //$NON-NLS-1$
- opEl.appendChild(propEl);
- }
- Element paramsEl = doc.createElement("Parameters"); //$NON-NLS-1$
- tdefEl.appendChild(paramsEl);
- for (Iterator iter = parameters.iterator(); iter.hasNext();)
- {
- Element propEl = doc.createElement("Parameter"); //$NON-NLS-1$
- TypedValue param = (TypedValue) iter.next();
- propEl.setAttribute("name", param.uri); //$NON-NLS-1$
- propEl.setAttribute("type", param.type); //$NON-NLS-1$
- propEl.setAttribute("value", param.value); //$NON-NLS-1$
- paramsEl.appendChild(propEl);
- }
- return tdefEl;
- }
-
- /**
- * Create a new instance of this from its serialized form.
- *
- * @param transformEl the element to create this from
- * @return a new instance of this
- */
- public static TransformDefinition fromXML(Element transformEl)
- {
- TransformDefinition tdef = new TransformDefinition();
- String url = transformEl.getAttribute("url"); //$NON-NLS-1$
- tdef.setStylesheetURL(url);
- String uriResolver = transformEl.getAttribute("uriResolver"); //$NON-NLS-1$
- tdef.setResolverClass(uriResolver);
-
- Element opEl = (Element) transformEl.getElementsByTagName("OutputProperties").item(0); //$NON-NLS-1$
- if (opEl != null)
- {
- NodeList propEls = opEl.getElementsByTagName("Property"); //$NON-NLS-1$
- for (int i = 0; i < propEls.getLength(); i++)
- {
- Element propEl = (Element) propEls.item(i);
- String name = propEl.getAttribute("name"); //$NON-NLS-1$
- String value = propEl.getAttribute("value"); //$NON-NLS-1$
- tdef.setOutputProperty(name, value);
- }
- }
-
- Element paramsEl = (Element) transformEl.getElementsByTagName(Messages.getString("TransformDefinition.18")).item(0); //$NON-NLS-1$
- if (paramsEl != null)
- {
- NodeList paramEls = paramsEl.getElementsByTagName(Messages.getString("TransformDefinition.19")); //$NON-NLS-1$
- for (int i = 0; i < paramEls.getLength(); i++)
- {
- Element paramEl = (Element) paramEls.item(i);
- String name = paramEl.getAttribute(Messages.getString("TransformDefinition.20")); //$NON-NLS-1$
- String type = paramEl.getAttribute(Messages.getString("TransformDefinition.21")); //$NON-NLS-1$
- String value = paramEl.getAttribute(Messages.getString("TransformDefinition.22")); //$NON-NLS-1$
- tdef.addParameter(new TypedValue(name, type, value));
- }
- }
-
- return tdef;
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/TransformationException.java b/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/TransformationException.java
deleted file mode 100644
index aa0acaf..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/TransformationException.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.invoker;
-
-/**
- * Checked Exception for transformation errors.
- *
- * @author Doug Satchwell
- */
-public class TransformationException extends Exception
-{
- private static final long serialVersionUID = 1L;
-
- /**
- * Create a new instance of this with the given message.
- *
- * @param message the message
- */
- public TransformationException(String message)
- {
- super(message);
- }
-
- /**
- * Create a new instance of this with the given message and cause.
- *
- * @param message the message
- * @param cause the cause
- */
- public TransformationException(String message, Throwable cause)
- {
- super(message, cause);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/TypedValue.java b/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/TypedValue.java
deleted file mode 100644
index ad51c4d..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/TypedValue.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.invoker;
-
-import org.eclipse.wst.xsl.jaxp.debug.invoker.internal.CreationException;
-
-/**
- * A value that is to be instantiated from a particular type e.g. Double, Object.
- *
- * @author Doug Satchwell
- */
-public class TypedValue
-{
- public static final String TYPE_STRING = "string"; //$NON-NLS-1$
- private static final String TYPE_BOOLEAN = "boolean"; //$NON-NLS-1$
- private static final String TYPE_INT = "int"; //$NON-NLS-1$
- private static final String TYPE_DOUBLE = "double"; //$NON-NLS-1$
- private static final String TYPE_FLOAT = "float"; //$NON-NLS-1$
- private static final String TYPE_CLASS = "class"; //$NON-NLS-1$
- private static final String TYPE_OBJECT = "object"; //$NON-NLS-1$
-
- final String uri;
- final String type;
- final String value;
-
- /**
- * Create a new instance of this from the given information.
- *
- * @param uri the URI
- * @param type the type of value
- * @param value the value
- */
- public TypedValue(String uri, String type, String value)
- {
- this.uri = uri;
- this.type = type;
- this.value = value;
- }
-
- /**
- * Create the type of object defined by this.
- *
- * @return the value
- * @throws CreationException if a problem occurred
- */
- public Object createValue() throws CreationException
- {
- Object o = null;
- if (TYPE_STRING.equals(type))
- {
- o = value;
- }
- else if (TYPE_BOOLEAN.equals(type))
- {
- boolean b = "yes".equalsIgnoreCase(value) || "true".equalsIgnoreCase(value); //$NON-NLS-1$ //$NON-NLS-2$
- o = new Boolean(b);
- }
- else if (TYPE_INT.equals(type))
- {
- try
- {
- o = new Integer(value);
- }
- catch (NumberFormatException e)
- {
- throw new CreationException(Messages.getString("TypedValue.9") + value + Messages.getString("TypedValue.10"), e); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- else if (TYPE_DOUBLE.equals(type))
- {
- try
- {
- o = new Double(value);
- }
- catch (NumberFormatException e)
- {
- throw new CreationException(Messages.getString("TypedValue.11") + value + Messages.getString("TypedValue.12"), e); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- else if (TYPE_FLOAT.equals(type))
- {
- try
- {
- o = new Float(value);
- }
- catch (NumberFormatException e)
- {
- throw new CreationException(Messages.getString("TypedValue.13") + value + Messages.getString("TypedValue.14"), e); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- else if (TYPE_CLASS.equals(type))
- {
- try
- {
- o = Class.forName(value);
- }
- catch (ClassNotFoundException e)
- {
- throw new CreationException(Messages.getString("TypedValue.15") + value + Messages.getString("TypedValue.16"), e); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- else if (TYPE_OBJECT.equals(type))
- {
- try
- {
- Class c = Class.forName(value);
- o = c.newInstance();
- }
- catch (ClassNotFoundException e)
- {
- throw new CreationException(Messages.getString("TypedValue.17") + value + Messages.getString("TypedValue.18"), e); //$NON-NLS-1$ //$NON-NLS-2$
- }
- catch (InstantiationException e)
- {
- throw new CreationException(Messages.getString("TypedValue.19") + value + Messages.getString("TypedValue.20"), e); //$NON-NLS-1$ //$NON-NLS-2$
- }
- catch (IllegalAccessException e)
- {
- throw new CreationException(Messages.getString("TypedValue.21") + value + Messages.getString("TypedValue.22"), e); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- else
- {
- throw new CreationException(Messages.getString("TypedValue.23") + type + Messages.getString("TypedValue.24")); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return o;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/internal/ConfigurationException.java b/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/internal/ConfigurationException.java
deleted file mode 100644
index 7526c73..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/internal/ConfigurationException.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.invoker.internal;
-
-/**
- * An exception thrown when configuration of an XSL transform pipeline fails.
- *
- * @author Doug Satchwell
- */
-public class ConfigurationException extends Exception
-{
- private static final long serialVersionUID = 1L;
-
- /**
- * Create the exception.
- *
- * @param msg the exception message
- * @param t the underlying cause
- */
- public ConfigurationException(String msg, Throwable t)
- {
- super(msg, t);
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/internal/CreationException.java b/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/internal/CreationException.java
deleted file mode 100644
index bba07bf..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/internal/CreationException.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.invoker.internal;
-
-/**
- * Checked Exception for object creation errors.
- *
- * @author Doug Satchwell
- */
-public class CreationException extends Exception
-{
- private static final long serialVersionUID = 1L;
-
- /**
- * Create a new instance of this with the given message.
- *
- * @param message the message
- */
- public CreationException(String message)
- {
- super(message);
- }
-
- /**
- * Create a new instance of this with the given message and cause.
- *
- * @param message the message
- * @param cause the cause
- */
- public CreationException(String message, Throwable cause)
- {
- super(message, cause);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/internal/JAXPSAXProcessorInvoker.java b/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/internal/JAXPSAXProcessorInvoker.java
deleted file mode 100644
index 40c424c..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/internal/JAXPSAXProcessorInvoker.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.invoker.internal;
-
-import java.net.URL;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParserFactory;
-import javax.xml.transform.ErrorListener;
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.TransformerFactoryConfigurationError;
-import javax.xml.transform.URIResolver;
-import javax.xml.transform.sax.SAXResult;
-import javax.xml.transform.sax.SAXSource;
-import javax.xml.transform.sax.SAXTransformerFactory;
-import javax.xml.transform.sax.TransformerHandler;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.eclipse.wst.xsl.jaxp.debug.invoker.IProcessorInvoker;
-import org.eclipse.wst.xsl.jaxp.debug.invoker.TransformationException;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
-import org.xml.sax.XMLReader;
-
-/**
- * An implementation of <code>IProcessorInvoker</code> that uses JAXP as the underlying
- * transformation mechanism.
- *
- * @author Doug Satchwell
- */
-public class JAXPSAXProcessorInvoker implements IProcessorInvoker
-{
- private static final Log log = LogFactory.getLog(JAXPSAXProcessorInvoker.class);
-
- private XMLReader reader;
- private SAXTransformerFactory tFactory;
- private TransformerHandler th;
-
- /**
- * Create a new instance of this.
- *
- * @throws SAXException if errors occur while creating an <code>XMLReader</code>
- * @throws ParserConfigurationException if errors occur while creating an <code>XMLReader</code>
- */
- public JAXPSAXProcessorInvoker() throws SAXException, ParserConfigurationException
- {
- reader = createReader();
- }
-
- protected XMLReader createReader() throws SAXException, ParserConfigurationException
- {
- SAXParserFactory spf = SAXParserFactory.newInstance();
- spf.setNamespaceAware(true);
- return spf.newSAXParser().getXMLReader();
- }
-
- public void setAttributes(Map attributes) throws TransformerFactoryConfigurationError
- {
- createTransformerFactory();
- for (Iterator iter = attributes.entrySet().iterator(); iter.hasNext();)
- {
- Map.Entry entry = (Map.Entry) iter.next();
- String uri = (String) entry.getKey();
- Object value = entry.getValue();
- log.info(Messages.getString("JAXPSAXProcessorInvoker.0") + uri + Messages.getString("JAXPSAXProcessorInvoker.1") + value); //$NON-NLS-1$ //$NON-NLS-2$
- tFactory.setAttribute(uri, value);
- }
- }
-
- protected TransformerFactory createTransformerFactory()
- {
- tFactory = (SAXTransformerFactory) TransformerFactory.newInstance();
- tFactory.setErrorListener(new ErrorListener()
- {
-
- public void error(TransformerException exception) throws TransformerException
- {
- log.error(exception.getMessageAndLocation());
- }
-
- public void fatalError(TransformerException exception) throws TransformerException
- {
- log.error(exception.getMessageAndLocation(), exception);
- throw exception;
- }
-
- public void warning(TransformerException exception) throws TransformerException
- {
- log.warn(exception.getMessageAndLocation());
- }
-
- });
- return tFactory;
- }
-
- public void addStylesheet(URL stylesheet, Map parameters, Properties outputProperties, URIResolver resolver) throws TransformerConfigurationException
- {
- InputSource inputsource = new InputSource(stylesheet.toString());
-
- // TODO parse document with linenumbers
-
- // XMLReader reader = createReader();
- // LineReadingContentHandler ch = new LineReadingContentHandler();
- // reader.setContentHandler(ch);
- SAXSource source = new SAXSource(inputsource);
-
- addStylesheet(source, resolver, parameters, outputProperties);
-
- }
-
- protected Transformer addStylesheet(Source source, URIResolver resolver, Map parameters, Properties outputProperties) throws TransformerConfigurationException
- {
- if (tFactory == null)
- createTransformerFactory();
-
- TransformerHandler newTh = tFactory.newTransformerHandler(source);
- Transformer transformer = newTh.getTransformer();
-
- if (resolver != null)
- transformer.setURIResolver(resolver);
-
- if (parameters != null)
- {
- for (Iterator iter = parameters.entrySet().iterator(); iter.hasNext();)
- {
- Map.Entry entry = (Map.Entry) iter.next();
- String name = (String) entry.getKey();
- Object value = entry.getValue();
- log.info(Messages.getString("JAXPSAXProcessorInvoker.2") + name + Messages.getString("JAXPSAXProcessorInvoker.3") + value); //$NON-NLS-1$ //$NON-NLS-2$
- transformer.setParameter(name, value);
- }
- }
- if (outputProperties != null)
- {
- StringBuffer sb = new StringBuffer();
- for (Iterator iter = outputProperties.entrySet().iterator(); iter.hasNext();)
- {
- Map.Entry entry = (Map.Entry) iter.next();
- sb.append(entry.getKey()).append("=").append(entry.getValue()).append(" "); //$NON-NLS-1$ //$NON-NLS-2$
- }
- if (outputProperties.size() > 0)
- {
- log.info(Messages.getString("JAXPSAXProcessorInvoker.6") + sb.toString()); //$NON-NLS-1$
- transformer.setOutputProperties(outputProperties);
- }
- }
-
- if (th != null)
- th.setResult(new SAXResult(newTh));
- else {
- reader.setContentHandler(newTh);
- try {
- reader.setProperty("http://xml.org/sax/properties/lexical-handler", newTh);
- } catch (SAXNotRecognizedException ex) {
- log.warn("Unable to set lexical content handler. Comments and Processing instructions may be skipped");
- } catch (SAXNotSupportedException e) {
- log.warn("Lexical property not supported. Comments and Processing instructions may be skipped");
- }
- }
- th = newTh;
- return th.getTransformer();
- }
-
- public void transform(URL sourceURL, Result res) throws TransformationException
- {
- transform(new InputSource(sourceURL.toExternalForm()), res);
- }
-
- /**
- * Transform using an InputSource rather than a URL
- *
- * @param inputsource the InputSource to use
- * @param res the Result
- * @throws TransformationException if an error occurred during transformation
- */
- public void transform(InputSource inputsource, Result res) throws TransformationException
- {
- try
- {
- if (th == null)
- {// no stylesheets have been added, so try to use embedded...
- SAXSource saxSource = new SAXSource(inputsource);
- Source src = saxSource;
- String media = null, title = null, charset = null;
- while (true)
- {
- src = tFactory.getAssociatedStylesheet(src, media, title, charset);
- if (src != null)
- {
- addStylesheet(saxSource, null, Collections.EMPTY_MAP, new Properties());
- }
- else
- {
- throw new TransformationException(Messages.getString("JAXPSAXProcessorInvoker.7") + inputsource.getSystemId()); //$NON-NLS-1$
- }
- }
- }
- th.setResult(res);
- log.info(Messages.getString("JAXPSAXProcessorInvoker.8")); //$NON-NLS-1$
- reader.parse(inputsource);
- log.info(Messages.getString("JAXPSAXProcessorInvoker.9")); //$NON-NLS-1$
- }
- catch (Exception e)
- {
- throw new TransformationException(e.getMessage(), e);
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/internal/Main.java b/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/internal/Main.java
deleted file mode 100644
index 1ccdce8..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/internal/Main.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.invoker.internal;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.net.URL;
-
-import javax.xml.transform.stream.StreamResult;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.eclipse.wst.xsl.jaxp.debug.invoker.IProcessorInvoker;
-import org.eclipse.wst.xsl.jaxp.debug.invoker.PipelineDefinition;
-
-/**
- * The class whose <code>main</code> method is called when launching the transformation process from
- * Eclipse.
- *
- * @author Doug Satchwell
- */
-public class Main
-{
- private static final Log log = LogFactory.getLog(Main.class);
-
- /**
- * The <code>main</code> method called when launching the transformation process.
- * There are 4 required arguments:
- * <ol>
- * <li>The class name of the <code>IProcessorInvoker</code> to use
- * <li>The launch file (serialized <code>PipelineDefinition</code>)
- * <li>The URL of the source XML document
- * <li>The file where output will be written
- * </ol>
- *
- * @param args the 4 required arguments
- */
- public static void main(String[] args)
- {
- log.info("javax.xml.transform.TransformerFactory=" + System.getProperty("javax.xml.transform.TransformerFactory")); //$NON-NLS-1$ //$NON-NLS-2$
- log.info("java.endorsed.dirs=" + System.getProperty("java.endorsed.dirs")); //$NON-NLS-1$ //$NON-NLS-2$
-
- String invokerClassName = args[0];
- File launchFile = new File(args[1]);
- String src = args[2];
- String target = args[3];
-
- log.info(Messages.getString("Main.4") + launchFile); //$NON-NLS-1$
-
- // create the invoker
- IProcessorInvoker invoker = null;
- try
- {
- Class clazz = Class.forName(invokerClassName);
- invoker = (IProcessorInvoker) clazz.newInstance();
- }
- catch (Exception e)
- {
- handleFatalError(Messages.getString("Main.5") + invokerClassName, e); //$NON-NLS-1$
- }
- try
- {
- PipelineDefinition pipeline = new PipelineDefinition(launchFile);
- pipeline.configure(invoker);
- invoker.transform(new URL(src), new StreamResult(new FileOutputStream(new File(target))));
- }
- catch (Exception e)
- {
- handleFatalError(e.getMessage(), e);
- }
- }
-
- private static void handleFatalError(String msg, Throwable t)
- {
- log.fatal(msg, t);
- System.exit(1);
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/internal/Messages.java b/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/internal/Messages.java
deleted file mode 100644
index 7ee3995..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/internal/Messages.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.debug.invoker.internal;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * Messages for the transformation.
- *
- * @author Doug Satchwell
- */
-public class Messages
-{
- private static final String BUNDLE_NAME = "org.eclipse.wst.xsl.jaxp.debug.invoker.internal.messages"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
-
- private Messages()
- {
- }
-
- /**
- * Get a message for the given key.
- *
- * @param key the message key
- * @return the message
- */
- public static String getString(String key)
- {
- try
- {
- return RESOURCE_BUNDLE.getString(key);
- }
- catch (MissingResourceException e)
- {
- return '!' + key + '!';
- }
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/internal/messages.properties b/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/internal/messages.properties
deleted file mode 100644
index ff8f9a1..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/internal/messages.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-JAXPSAXProcessorInvoker.0=Setting attribute '
-JAXPSAXProcessorInvoker.1=' to value
-JAXPSAXProcessorInvoker.2=Setting parameter '
-JAXPSAXProcessorInvoker.3=' to value
-JAXPSAXProcessorInvoker.6=Setting properties:
-JAXPSAXProcessorInvoker.7=No embedded stylesheet instruction for file:
-JAXPSAXProcessorInvoker.8=Transforming...
-JAXPSAXProcessorInvoker.9=Done.
-Main.4=launchFile:
-Main.5=Could not instantiate invoker:
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/messages.properties b/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/messages.properties
deleted file mode 100644
index fea9b3c..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.debug/src/org/eclipse/wst/xsl/jaxp/debug/invoker/messages.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-PipelineDefinition.10=Error with stylesheet:
-PipelineDefinition.8=Could not instantiate parameter
-PipelineDefinition.9=Invalid stylesheet URL:
-TransformDefinition.1=url
-TransformDefinition.18=Parameters
-TransformDefinition.19=Parameter
-TransformDefinition.20=name
-TransformDefinition.21=type
-TransformDefinition.22=value
-TypedValue.10=' to an Integer
-TypedValue.11=Could not convert value '
-TypedValue.12=' to a Double
-TypedValue.13=Could not convert value '
-TypedValue.14=' to a Float
-TypedValue.15=Class '
-TypedValue.16=' could not be located (check the classpath)
-TypedValue.17=Class '
-TypedValue.18=' could not be located (check the classpath)
-TypedValue.19=Object '
-TypedValue.20=' could not be instantiated
-TypedValue.21=Object '
-TypedValue.22=\ could not be instantiated
-TypedValue.23=Attribute type '
-TypedValue.24=' is not recognised
-TypedValue.9=Could not convert value '
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.launching/.classpath b/bundles/org.eclipse.wst.xsl.jaxp.launching/.classpath
deleted file mode 100644
index 64c5e31..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.launching/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.launching/.project b/bundles/org.eclipse.wst.xsl.jaxp.launching/.project
deleted file mode 100644
index 8dea7ec..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.launching/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.xsl.jaxp.launching</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.launching/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.wst.xsl.jaxp.launching/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index c96ca37..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.launching/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,25 +0,0 @@
-#Tue Feb 10 05:25:45 GMT 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.launching/JREDefaultAttributes.properties b/bundles/org.eclipse.wst.xsl.jaxp.launching/JREDefaultAttributes.properties
deleted file mode 100644
index 9c244d2..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.launching/JREDefaultAttributes.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Doug Satchwell (Chase Technology Ltd) - initial API and implementation
-############################################################################### \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.launching/JREDefaultOutputProperties.properties b/bundles/org.eclipse.wst.xsl.jaxp.launching/JREDefaultOutputProperties.properties
deleted file mode 100644
index ad23e9d..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.launching/JREDefaultOutputProperties.properties
+++ /dev/null
@@ -1,40 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Doug Satchwell (Chase Technology Ltd) - initial API and implementation
-###############################################################################
-
-method=method
-method.DESC="xml" | "html" | "text" | qname-but-not-ncname
-
-version=version
-version.DESC=specifies the version of the output method
-
-indent=indent
-indent.DESC=specifies whether the XSLT processor may add additional whitespace when outputting the result tree; the value must be yes or no
-
-encoding=encoding
-encoding.DESC=specifies the preferred character encoding that the XSLT processor should use to encode sequences of characters as sequences of bytes; the value of the attribute should be treated case-insensitively; the value must contain only characters in the range #x21 to #x7E (i.e. printable ASCII characters); the value should either be a charset registered with the Internet Assigned Numbers Authority [IANA], [RFC2278] or start with X-
-
-media-type=media-type
-media-type.DESC=specifies the media type (MIME content type) of the data that results from outputting the result tree; the charset parameter should not be specified explicitly; instead, when the top-level media type is text, a charset parameter should be added according to the character encoding actually used by the output method
-
-doctype-system=doctype-system
-doctype-system.DESC=specifies the system identifier to be used in the document type declaration
-
-doctype-public=doctype-public
-doctype-public.DESC=specifies the public identifier to be used in the document type declaration
-
-omit-xml-declaration=omit-xml-declaration
-omit-xml-declaration.DESC=specifies whether the XSLT processor should output an XML declaration; the value must be yes or no
-
-standalone=standalone
-standalone.DESC=specifies whether the XSLT processor should output a standalone document declaration; the value must be yes or no
-
-cdata-section-elements=cdata-section-elements
-cdata-section-elements.DESC=specifies a list of the names of elements whose text node children should be output using CDATA sections \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.launching/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.xsl.jaxp.launching/META-INF/MANIFEST.MF
deleted file mode 100644
index b9bbf16..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.launching/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,23 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name.0
-Bundle-SymbolicName: org.eclipse.wst.xsl.jaxp.launching;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.wst.xsl.jaxp.launching.internal.JAXPLaunchingPlugin
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.variables;bundle-version="[3.2.100,4.0.0)",
- org.eclipse.debug.core;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.jdt.launching;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.wst.xsl.launching;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.wst.xsl.jaxp.debug;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.jface;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.ui;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.osgi.util;bundle-version="[3.2.0,4.0.0)"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-Vendor: %Bundle-Vendor.0
-Export-Package: org.eclipse.wst.xsl.jaxp.launching,
- org.eclipse.wst.xsl.jaxp.launching.internal;x-internal:=true,
- org.eclipse.wst.xsl.jaxp.launching.internal.registry;x-internal:=true,
- org.eclipse.wst.xsl.jaxp.launching.model
-Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.launching/about.html b/bundles/org.eclipse.wst.xsl.jaxp.launching/about.html
deleted file mode 100644
index ed30003..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.launching/about.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<HTML>
-
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-
-<BODY lang="EN-US">
-
-<H3>About This Content</H3>
-
-<P>August, 2008</P>
-
-<H3>License</H3>
-
-<P>The Eclipse Foundation makes available all content in this plug-in
-("Content"). Unless otherwise indicated below, the Content is provided to you
-under the terms and conditions of the Eclipse Public License Version 1.0
-("EPL"). A copy of the EPL is available at
-<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
-For purposes of the EPL, "Program" will mean the Content.</P>
-
-<P>If you did not receive this Content directly from the Eclipse Foundation, the
-Content is being redistributed by another party ("Redistributor") and different
-terms and conditions may apply to your use of any object code in the Content.
-Check the Redistributor’s license that was provided with the Content. If no such
-license exists, contact the Redistributor. Unless otherwise indicated below, the
-terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at
-<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P>
-
-</BODY>
-</HTML>
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.launching/build.properties b/bundles/org.eclipse.wst.xsl.jaxp.launching/build.properties
deleted file mode 100644
index cfc36a5..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.launching/build.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- about.html,\
- schema/,\
- JREDefaultAttributes.properties,\
- JREDefaultOutputProperties.properties,\
- plugin.properties
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.launching/log4j.debug.properties b/bundles/org.eclipse.wst.xsl.jaxp.launching/log4j.debug.properties
deleted file mode 100644
index 62dfb61..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.launching/log4j.debug.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-# Set root logger level to DEBUG and its appenders are A1 and A2
-log4j.rootLogger=ERROR, A2
-
-# A2 is set to be a ConsoleAppender
-log4j.appender.A2=org.apache.log4j.ConsoleAppender
-
-# A2 uses PatternLayout.
-log4j.appender.A2.layout=org.apache.log4j.PatternLayout
-log4j.appender.A2.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p [%t] %c{1} %x - %m%n
-
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.launching/plugin.properties b/bundles/org.eclipse.wst.xsl.jaxp.launching/plugin.properties
deleted file mode 100644
index 872a2ca..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.launching/plugin.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-Bundle-Vendor.0 = Eclipse.org
-Bundle-Name.0 = XSL JAXP Launching
-launchDelegate.name.0 = Java
-processorType.label.1 = JRE Default
-processor.label.1 = JRE Instance Default
-debugger = debugger
-invoke = invoke
-processor = processor
-processorType = processorType \ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.launching/plugin.xml b/bundles/org.eclipse.wst.xsl.jaxp.launching/plugin.xml
deleted file mode 100644
index e52549f..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.launching/plugin.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension-point id="debugger" name="%debugger" schema="schema/debugger.exsd"/>
- <extension-point id="invoke" name="%invoke" schema="schema/invoke.exsd"/>
- <extension-point id="processor" name="%processor" schema="schema/processor.exsd"/>
- <extension-point id="processorType" name="%processorType" schema="schema/processorType.exsd"/>
- <extension
- point="org.eclipse.debug.core.launchDelegates">
- <launchDelegate
- delegate="org.eclipse.wst.xsl.jaxp.launching.internal.JAXPJavaLaunchConfigurationDelegate"
- delegateDescription="The XSLT Launcher for JAXP supports running and debugging transformations using JAXP-compliant XSLT processors"
- id="org.eclipse.wst.xsl.launching.internal.jaxp.JAXPLaunchConfigurationDelegate"
- modes="run, debug"
- name="%launchDelegate.name.0"
- type="org.eclipse.wst.xsl.launching.launchConfigurationType">
- </launchDelegate>
- </extension>
-
- <extension point="org.eclipse.core.runtime.preferences">
- <initializer
- class="org.eclipse.wst.xsl.jaxp.launching.internal.PreferenceInitializer">
- </initializer>
- </extension>
-
- <extension point="org.eclipse.wst.xsl.jaxp.launching.invoke">
- <invoker id="org.eclipse.wst.xsl.launching.jaxp.invoke"
- class="org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker"
- classpath="${eclipse_orbit:org.eclipse.wst.xsl.jaxp.debug};${eclipse_orbit:org.apache.commons.logging};${eclipse_orbit:org.apache.log4j}" />
- </extension>
-
- <extension
- point="org.eclipse.wst.xsl.jaxp.launching.processorType">
- <processorType
- attributeProperties="JREDefaultAttributes.properties"
- id="org.eclipse.wst.xsl.launching.processorType.jreDefault"
- label="%processorType.label.1"
- outputProperties="JREDefaultOutputProperties.properties" />
- </extension>
-
- <extension
- point="org.eclipse.wst.xsl.jaxp.launching.processor">
- <processor
- classpath=""
- id="org.eclipse.wst.xsl.launching.jre.default"
- label="%processor.label.1"
- processorTypeId="org.eclipse.wst.xsl.launching.processorType.jreDefault"
- supports="1.0"/>
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.launching/schema/debugger.exsd b/bundles/org.eclipse.wst.xsl.jaxp.launching/schema/debugger.exsd
deleted file mode 100644
index ef80f04..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.launching/schema/debugger.exsd
+++ /dev/null
@@ -1,145 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.wst.xsl.launching.jaxp" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.wst.xsl.launching.jaxp" id="debugger" name="XSLT Debugger"/>
- </appinfo>
- <documentation>
- Contribute a debugger for a particular JAXP processor type (e.g. Saxon). The extension point primarily defines the classpath and transformer factory to be used when debugging.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="debugger" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="debugger">
- <annotation>
- <documentation>
- A debugger for a processor type
- </documentation>
- </annotation>
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- A unique id for this debugger
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- A name to be displayed in the UI
- </documentation>
- </annotation>
- </attribute>
- <attribute name="classpath" type="string" use="required">
- <annotation>
- <documentation>
- A &apos;;&apos;-separated classpath required to run the debugger (in addition to that already added by the processor itself).
- </documentation>
- </annotation>
- </attribute>
- <attribute name="processorTypeId" type="string" use="required">
- <annotation>
- <documentation>
- The processor type that this debugger works with
- </documentation>
- </annotation>
- </attribute>
- <attribute name="className" type="string" use="required">
- <annotation>
- <documentation>
- A fully-qualified class that implement the IXSLDebugger interface. It is easier to extend AbstractXSLDebugger.
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.wst.xsl.jaxp.debug.debugger.IXSLDebugger"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="transformerFactoryClass" type="string" use="required">
- <annotation>
- <documentation>
- The fully-qualified class name of the transformer factory to use for debugging. This must be one of the transformer factories belonging to the processor type.
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn="javax.xml.transform.TransformerFactory:"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- &lt;pre&gt;
- &lt;extension
- point=&quot;org.eclipse.wst.xsl.jaxp.launching.debugger&quot;&gt;
- &lt;debugger
- className=&quot;org.eclipse.wst.xsl.xalan.debugger.XalanDebugger&quot;
- classpath=&quot;${eclipse_orbit:org.eclipse.wst.xsl.xalan}&quot;
- id=&quot;org.eclipse.wst.xsl.xalan.debugger&quot;
- name=&quot;Xalan 2.5.1 or greater&quot;
- processorTypeId=&quot;org.eclipse.wst.xsl.xalan.processorType&quot;
- transformerFactoryClass=&quot;org.apache.xalan.processor.TransformerFactoryImpl&quot;&gt;
- &lt;/debugger&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
- </documentation>
- </annotation>
-
-
-
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- Copyright (c) 2007 Chase Technology Ltd - &lt;a href=&quot;http://www.chasetechnology.co.uk&quot;&gt;http://www.chasetechnology.co.uk&lt;/a&gt;.&lt;br&gt;
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Eclipse Public License v1.0 which accompanies
-this distribution, and is available at &lt;a
-href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </documentation>
- </annotation>
-
-</schema>
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.launching/schema/invoke.exsd b/bundles/org.eclipse.wst.xsl.jaxp.launching/schema/invoke.exsd
deleted file mode 100644
index 8f0c1f2..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.launching/schema/invoke.exsd
+++ /dev/null
@@ -1,93 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.wst.xsl.launching.jaxp" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.wst.xsl.launching.jaxp" id="invoke" name="XSLT Processor Invoker"/>
- </appinfo>
- <documentation>
- &lt;b&gt;This extension point is internal and should not be used by any other plugins.&lt;/b&gt;
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element internal="true" />
- </appinfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="invoker"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="invoker">
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- Unique id for this invoker
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- A class that implements the IProcessorInvoker interface
- </documentation>
- </annotation>
- </attribute>
- <attribute name="classpath" type="string" use="required">
- <annotation>
- <documentation>
- A semi-colon separated list of jars relative to the root of the contributing plugin. One of the jars must contain the Invoker class named in the class attribute.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
-
-
-
-
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- Copyright (c) 2007 Chase Technology Ltd - &lt;a href=&quot;http://www.chasetechnology.co.uk&quot;&gt;http://www.chasetechnology.co.uk&lt;/a&gt;.&lt;br&gt;
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Eclipse Public License v1.0 which accompanies
-this distribution, and is available at &lt;a
-href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </documentation>
- </annotation>
-
-</schema>
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.launching/schema/processor.exsd b/bundles/org.eclipse.wst.xsl.jaxp.launching/schema/processor.exsd
deleted file mode 100644
index e59e08c..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.launching/schema/processor.exsd
+++ /dev/null
@@ -1,147 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.wst.xsl.launching.jaxp" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.wst.xsl.launching.jaxp" id="processor" name="XSLT Processor"/>
- </appinfo>
- <documentation>
- Contribute a Java XSLT processor instance (e.g. Xalan 2.7.0). The extension point primarily defines the classpath to be used when launching an XSLT transformation.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="processor" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="processor">
- <annotation>
- <appinfo>
- <meta.element labelAttribute="label"/>
- </appinfo>
- <documentation>
- An instance of a JAXP-compliant XSLT processor
- </documentation>
- </annotation>
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- A unique id for this processor instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="label" type="string" use="required">
- <annotation>
- <documentation>
- A label for this instance to be displayed in the UI
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="processorTypeId" type="string" use="required">
- <annotation>
- <documentation>
- The id for the processor type
- </documentation>
- </annotation>
- </attribute>
- <attribute name="classpath" type="string" use="required">
- <annotation>
- <documentation>
- The classpath to use when this processor is launched
- </documentation>
- </annotation>
- </attribute>
- <attribute name="debuggerId" type="string">
- <annotation>
- <documentation>
- The id of a debugger to associate with the processor
- </documentation>
- </annotation>
- </attribute>
- <attribute name="supports" type="string" use="required">
- <annotation>
- <documentation>
- A comma-separated list of supported XSLT versions e.g. 1.0,2.0
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- &lt;pre&gt;
- &lt;extension
- point=&quot;org.eclipse.wst.xsl.jaxp.launching.processor&quot;&gt;
- &lt;!-- An adopter can specify the ${eclipse_orbit: } variable to indicate which eclipse
- bundle should be added to the class path. --&gt;
- &lt;processor
- classpath=&quot;${eclipse_orbit:org.apache.xalan};${eclipse_orbit:org.apache.xml.serializer};${eclipse_orbit:org.apache.bcel};${eclipse_orbit:java_cup.runtime}&quot;
- id=&quot;org.eclipse.wst.xsl.launching.xalan.processor&quot;
- label=&quot;%processor.label.1&quot;
- processorTypeId=&quot;org.eclipse.wst.xsl.xalan.processorType&quot;
- debuggerId=&quot;org.eclipse.wst.xsl.xalan.debugger&quot;
- supports=&quot;1.0&quot;&gt;
- &lt;/processor&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
- </documentation>
- </annotation>
-
-
-
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- Copyright (c) 2007 Chase Technology Ltd - &lt;a href=&quot;http://www.chasetechnology.co.uk&quot;&gt;http://www.chasetechnology.co.uk&lt;/a&gt;.&lt;br&gt;
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Eclipse Public License v1.0 which accompanies
-this distribution, and is available at &lt;a
-href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </documentation>
- </annotation>
-
-</schema>
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.launching/schema/processorType.exsd b/bundles/org.eclipse.wst.xsl.jaxp.launching/schema/processorType.exsd
deleted file mode 100644
index eaada5f..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.launching/schema/processorType.exsd
+++ /dev/null
@@ -1,167 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.wst.xsl.launching.jaxp" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.wst.xsl.launching.jaxp" id="processorType" name="XSLT Processor Type"/>
- </appinfo>
- <documentation>
- Contribute a Java XSLT processor type (e.g. Xalan, Saxon). The processor type defines which JAXP attributes and output properies are supported, and also the transformer factory classes it contains.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="processorType" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="processorType">
- <annotation>
- <appinfo>
- <meta.element labelAttribute="label"/>
- </appinfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="transformerFactory" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- Unique id for the processor type
- </documentation>
- </annotation>
- </attribute>
- <attribute name="label" type="string" use="required">
- <annotation>
- <documentation>
- Name for display in the UI
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="outputProperties" type="string">
- <annotation>
- <documentation>
- Location of a properties file containing the list of the processors output properties. Must be a path relative to the root of the bundle.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="attributeProperties" type="string">
- <annotation>
- <documentation>
- Location of a properties file containing the list of the attributes supported by this processor. Must be a path relative to the root of the bundle.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="transformerFactory">
- <annotation>
- <documentation>
- A TransformerFactory for this type
- </documentation>
- </annotation>
- <complexType>
- <attribute name="factoryClass" type="string" use="required">
- <annotation>
- <documentation>
- The fully-qualified transformer factory class
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn="javax.xml.transform.TransformerFactory:"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- A name for this transformer factory to be displayed in the UI
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- &lt;pre&gt;
- &lt;extension
- point=&quot;org.eclipse.wst.xsl.jaxp.launching.processorType&quot;&gt;
- &lt;processorType
- attributeProperties=&quot;XalanAttributes.properties&quot;
- id=&quot;org.eclipse.wst.xsl.xalan.processorType&quot;
- label=&quot;%processorType.label.0&quot;
- outputProperties=&quot;XalanOutputProperties.properties&quot;&gt;
- &lt;transformerFactory
- factoryClass=&quot;org.apache.xalan.processor.TransformerFactoryImpl&quot;
- name=&quot;Interpretive&quot;&gt;
- &lt;/transformerFactory&gt;
- &lt;transformerFactory
- factoryClass=&quot;org.apache.xalan.xsltc.trax.TransformerFactoryImpl&quot;
- name=&quot;Compiling&quot;&gt;
- &lt;/transformerFactory&gt;
- &lt;/processorType&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
- </documentation>
- </annotation>
-
-
-
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- Copyright (c) 2007 Chase Technology Ltd - &lt;a href=&quot;http://www.chasetechnology.co.uk&quot;&gt;http://www.chasetechnology.co.uk&lt;/a&gt;.&lt;br&gt;
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Eclipse Public License v1.0 which accompanies
-this distribution, and is available at &lt;a
-href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </documentation>
- </annotation>
-
-</schema>
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/IAttribute.java b/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/IAttribute.java
deleted file mode 100644
index 467914b..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/IAttribute.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.launching;
-
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * A attribute supported by an XSLT processor.
- *
- * @author Doug Satchwell
- */
-public interface IAttribute
-{
- /**
- * Constant for attributes of type <code>string</code>
- * @see #getType()
- */
- String TYPE_STRING = "string"; //$NON-NLS-1$
-
- /**
- * Constant for attributes of type <code>boolean</code>
- * @see #getType()
- */
- String TYPE_BOOLEAN = "boolean"; //$NON-NLS-1$
-
- /**
- * Constant for attributes of type <code>int</code>
- * @see #getType()
- */
- String TYPE_INT = "int"; //$NON-NLS-1$
-
- /**
- * Constant for attributes of type <code>double</code>
- * @see #getType()
- */
- String TYPE_DOUBLE = "double"; //$NON-NLS-1$
-
- /**
- * Constant for attributes of type <code>float</code>
- * @see #getType()
- */
- String TYPE_FLOAT = "float"; //$NON-NLS-1$
-
- /**
- * Constant for attributes of type <code>class</code>
- * @see #getType()
- */
- String TYPE_CLASS = "class"; //$NON-NLS-1$
-
- /**
- * Constant for attributes of type <code>object</code>
- * @see #getType()
- */
- String TYPE_OBJECT = "object"; //$NON-NLS-1$
-
- /**
- * Get the URI for this attribute
- * @return the attribute URI
- */
- String getURI();
-
- /**
- * Get a description for this attribute
- * @return the attribute description
- */
- String getDescription();
-
- /**
- * Get the type of this attribute. Will match one of the TYPE constants in this interface.
- * @return the attribute type: one of <code>TYPE_STRING</code>, <code>TYPE_BOOLEAN</code>,
- * <code>TYPE_INT</code>, <code>TYPE_DOUBLE</code>, <code>TYPE_FLOAT</code>, <code>TYPE_CLASS</code>,
- * or <code>TYPE_OBJECT</code>
- */
- String getType();
-
- /**
- * Determine whether the given value is a valid one for this attribute.
- * @return an <code>IStatus</code> with severity <code>OK</code> if valid, or <code>ERROR</code> if invalid.
- */
- IStatus validateValue(String value);
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/IDebugger.java b/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/IDebugger.java
deleted file mode 100644
index 5502f95..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/IDebugger.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.launching;
-
-/**
- * An XSLT debugger. Typically this will have been
- * contributed via the <code>org.eclipse.wst.xsl.launching.debugger</code> extension point.
- *
- * @author Doug Satchwell
- */
-public interface IDebugger
-{
- /**
- * Get the unique id for this debugger.
- * @return debugger id
- */
- String getId();
-
- /**
- * Get the set of bundle-relative jar files to add to the classpath.
- * @return array of bundle-relative jars
- */
- String[] getClassPath();
-
- /**
- * Get a unique name for this debugger
- * @return the name for the debugger
- */
- String getName();
-
- /**
- * Get the processor type that this debugger is associated with
- * @return the processor type
- */
- IProcessorType getProcessorType();
-
- /**
- * Get the class name for this debugger
- * @return the class name
- */
- String getClassName();
-
- /**
- * Get the transformer factory this debugger is associated with
- * @return the transformer factory
- */
- String getTransformerFactory();
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/IOutputProperty.java b/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/IOutputProperty.java
deleted file mode 100644
index 9bd2c76..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/IOutputProperty.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.launching;
-
-/**
- * An output property supported by an XSLT processor.
- *
- * @author Doug Satchwell
- */
-public interface IOutputProperty
-{
- /**
- * Get the URI of this output property.
- * @return a unique URI
- */
- String getURI();
-
- /**
- * Get a description for this output property.
- * @return a description
- */
- String getDescription();
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/IProcessorInstall.java b/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/IProcessorInstall.java
deleted file mode 100644
index 4cab27b..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/IProcessorInstall.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.launching;
-
-/**
- * An instance of an XSLT processor (e.g. Xalan 2.7.0).
- *
- * @see IProcessorInstall
- * @author Doug Satchwell
- */
-public interface IProcessorInstall
-{
- /**
- * Get the unqiue id of this install
- * @return the unique id
- */
- String getId();
-
- /**
- * Get the name of this install
- * @return the name of this install
- */
- String getName();
-
- /**
- * Get the the processor type associated with this install
- * @return the processor type id
- */
- IProcessorType getProcessorType();
-
- /**
- * Get the jar files for this processor
- * @return a set of jar files
- */
- IProcessorJar[] getProcessorJars();
-
- /**
- * Get whether this install has been contributed via the <code>org.eclipse.wst.xsl.launching.processor</code> extension point.
- * @return <code>true</code> if contributed via the extension point, otherwise <code>false</code>.
- */
- boolean isContributed();
-
- /**
- * Get the list of supported XSLT versions
- * @return <code>true</code> if this install has a debugger, otherwise <code>false</code>.
- */
- // TODO deprecate and use boolean supports instaed
- String getSupports();
-
- /**
- * Get whether this install supports the specified xslt version.
- * @return <code>true</code> if this install supports the version, otherwise <code>false</code>.
- */
- boolean supports(String xsltVersion);
-
- /**
- * Get the debugger associated with this install
- * @return the debugger, or null if no debugger has been set
- */
- IDebugger getDebugger();
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/IProcessorInvoker.java b/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/IProcessorInvoker.java
deleted file mode 100644
index 540101a..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/IProcessorInvoker.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.launching;
-
-public interface IProcessorInvoker
-{
- String getId();
-
- String getInvokerClassName();
-
- String[] getClasspathEntries();
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/IProcessorJar.java b/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/IProcessorJar.java
deleted file mode 100644
index 53052bb..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/IProcessorJar.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.launching;
-
-import java.net.URL;
-
-import org.eclipse.core.runtime.IPath;
-
-/**
- * A jar file for an XSLT processor
- *
- * @see IProcessorInstall
- * @author Doug Satchwell
- */
-public interface IProcessorJar
-{
- /**
- * The path may be relative or absolute; in the workspace or external.
- * @return the path to this jar
- */
- IPath getPath();
-
- /**
- * The URL will always be absolute and can be opened.
- * @return a URL to the jar
- */
- URL asURL();
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/IProcessorType.java b/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/IProcessorType.java
deleted file mode 100644
index d13e700..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/IProcessorType.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.launching;
-
-import java.util.Map;
-
-/**
- * A particular type of XSLT Processor (e.g. Xalan) for which there may be any number of installs.
- *
- * @see IProcessorInstall
- * @author Doug Satchwell
- */
-public interface IProcessorType
-{
- String getId();
-
- String getLabel();
-
- boolean isJREDefault();
-
- ITransformerFactory[] getTransformerFactories();
-
- IAttribute[] getAttributes();
-
- Map<String, String> getAttributeValues();
-
- IOutputProperty[] getOutputProperties();
-
- Map<String, String> getOutputPropertyValues();
-
- ITransformerFactory getDefaultTransformerFactory();
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/ITransformerFactory.java b/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/ITransformerFactory.java
deleted file mode 100644
index 64716ab..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/ITransformerFactory.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package org.eclipse.wst.xsl.jaxp.launching;
-
-public interface ITransformerFactory
-{
- String getName();
- String getFactoryClass();
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/JAXPLaunchConfigurationConstants.java b/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/JAXPLaunchConfigurationConstants.java
deleted file mode 100644
index a1cf82d..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/JAXPLaunchConfigurationConstants.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.launching;
-
-import org.eclipse.wst.xsl.jaxp.launching.internal.JAXPLaunchingPlugin;
-
-public class JAXPLaunchConfigurationConstants
-{
- public static final String INVOKER_DESCRIPTOR = JAXPLaunchingPlugin.PLUGIN_ID + ".INVOKER_DESCRIPTOR"; //$NON-NLS-1$
- public static final String ATTR_PROCESSOR = JAXPLaunchingPlugin.PLUGIN_ID + ".ATTR_PROCESSOR"; //$NON-NLS-1$
- public static final String ATTR_OUTPUT_PROPERTIES = JAXPLaunchingPlugin.PLUGIN_ID + ".ATTR_OUTPUT_PROPERTIES"; //$NON-NLS-1$
- public static final String ATTR_ATTRIBUTES = JAXPLaunchingPlugin.PLUGIN_ID + ".ATTR_ATTRIBUTES"; //$NON-NLS-1$
- public static final String ATTR_DEFAULT_DEBUGGING_INSTALL_ID = JAXPLaunchingPlugin.PLUGIN_ID + ".ATTR_DEFAULT_DEBUGGING_INSTALL_ID"; //$NON-NLS-1$
- public static final String ATTR_USE_DEFAULT_PROCESSOR = JAXPLaunchingPlugin.PLUGIN_ID + ".ATTR_USE_DEFAULT_PROCESSOR"; //$NON-NLS-1$
- public static final String ATTR_TRANSFORMER_FACTORY = JAXPLaunchingPlugin.PLUGIN_ID + ".ATTR_TRANSFORMER_FACTORY";
-
- public static final String XALAN_TYPE_ID = "org.eclipse.wst.xsl.xalan.processorType"; //$NON-NLS-1$
- public static final String SAXON_TYPE_ID = "org.eclipse.wst.xsl.saxon.processorType"; //$NON-NLS-1$
- public static final String SAXON_1_0_TYPE_ID = "org.eclipse.wst.xsl.saxon_1_0.processorType"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/JAXPRuntime.java b/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/JAXPRuntime.java
deleted file mode 100644
index e1ce9fe..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/JAXPRuntime.java
+++ /dev/null
@@ -1,331 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.launching;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.wst.xsl.jaxp.launching.internal.FeaturePreferences;
-import org.eclipse.wst.xsl.jaxp.launching.internal.JAXPLaunchingPlugin;
-import org.eclipse.wst.xsl.jaxp.launching.internal.Messages;
-import org.eclipse.wst.xsl.jaxp.launching.internal.OutputPropertyPreferences;
-import org.eclipse.wst.xsl.jaxp.launching.internal.ProcessorJar;
-import org.eclipse.wst.xsl.jaxp.launching.internal.ProcessorPreferences;
-import org.eclipse.wst.xsl.jaxp.launching.internal.registry.DebuggerRegistry;
-import org.eclipse.wst.xsl.jaxp.launching.internal.registry.InvokerRegistry;
-import org.eclipse.wst.xsl.jaxp.launching.internal.registry.ProcessorRegistry;
-import org.eclipse.wst.xsl.jaxp.launching.internal.registry.ProcessorTypeRegistry;
-
-public class JAXPRuntime
-{
- public static final String PREF_PROCESSOR_XML = "PREF_PROCESSOR_XML"; //$NON-NLS-1$
- public static final String PREF_FEATURE_XML = "PREF_FEATURE_XML"; //$NON-NLS-1$
- public static final String PREF_OUTPUT_PROPERTIES_XML = "PREF_OUTPUT_PROPERTIES_XML"; //$NON-NLS-1$
- public static final String JRE_DEFAULT_PROCESSOR_ID = "org.eclipse.wst.xsl.launching.jre.default"; //$NON-NLS-1$
- public static final String JRE_DEFAULT_PROCESSOR_TYPE_ID = "org.eclipse.wst.xsl.launching.processorType.jreDefault"; //$NON-NLS-1$
-
- private static byte[] NEXT_ID_LOCK = new byte[0];
- private static byte[] REGISTRY_LOCK = new byte[0];
-
- private static int lastStandinID;
- private static ProcessorTypeRegistry processorTypeRegistry;
- private static ProcessorRegistry processorRegistry;
- private static InvokerRegistry invokerRegistry;
- private static DebuggerRegistry debuggerRegistry;
-
- private static ProcessorTypeRegistry getProcessorTypeRegistry()
- {
- synchronized (REGISTRY_LOCK)
- {
- if (processorTypeRegistry == null)
- processorTypeRegistry = new ProcessorTypeRegistry();
- }
- return processorTypeRegistry;
- }
-
- private static ProcessorRegistry getProcessorRegistry()
- {
- synchronized (REGISTRY_LOCK)
- {
- if (processorRegistry == null)
- processorRegistry = new ProcessorRegistry();
- }
- return processorRegistry;
- }
-
- private static InvokerRegistry getInvokerRegistry()
- {
- synchronized (REGISTRY_LOCK)
- {
- if (invokerRegistry == null)
- invokerRegistry = new InvokerRegistry();
- }
- return invokerRegistry;
- }
-
- private static DebuggerRegistry getDebuggerRegistry()
- {
- synchronized (REGISTRY_LOCK)
- {
- if (debuggerRegistry == null)
- debuggerRegistry = new DebuggerRegistry();
- }
- return debuggerRegistry;
- }
-
- private static void savePreferences()
- {
- JAXPLaunchingPlugin.getDefault().savePluginPreferences();
- synchronized (REGISTRY_LOCK)
- {
- // force the registries to be re-initialised next time it is required
- processorRegistry = null;
- processorTypeRegistry = null;
- }
- }
-
- /**
- * Find a unique processor install id. Check existing 'real' processors, as
- * well as the last id used for a standin.
- */
- public static String createUniqueProcessorId(IProcessorType type)
- {
- IProcessorInstall[] installs = JAXPRuntime.getProcessors(type.getId());
- String id = null;
- synchronized (NEXT_ID_LOCK)
- {
- do
- {
- id = String.valueOf(++lastStandinID);
- }
- while (isTaken(id, installs));
- }
- return id;
- }
-
- public static IProcessorJar createProcessorJar(IPath path)
- {
- return new ProcessorJar(path);
- }
-
- private static boolean isTaken(String id, IProcessorInstall[] installs)
- {
- for (IProcessorInstall install : installs)
- {
- if (install.getId().equals(id))
- return true;
- }
- return false;
- }
-
- public static IDebugger[] getDebuggers()
- {
- return getDebuggerRegistry().getDebuggers();
- }
-
- public static IDebugger getDebugger(String id)
- {
- return getDebuggerRegistry().getDebugger(id);
- }
-
- public static IProcessorInstall[] getProcessors()
- {
- return getProcessorRegistry().getProcessors();
- }
-
- public static IProcessorInstall[] getProcessors(String typeId)
- {
- return getProcessorRegistry().getProcessors(typeId);
- }
-
- public static IProcessorInstall getProcessor(String processorId)
- {
- IProcessorInstall[] processors = getProcessors();
- for (IProcessorInstall install : processors)
- {
- if (install.getId().equals(processorId))
- return install;
- }
- return null;
- }
-
- public static IProcessorInstall getDefaultProcessor()
- {
- return getProcessorRegistry().getDefaultProcessor();
- }
-
- public static IProcessorInstall getJREDefaultProcessor()
- {
- return getProcessorRegistry().getJREDefaultProcessor();
- }
-
- public static IProcessorType[] getProcessorTypes()
- {
- return getProcessorTypeRegistry().getProcessorTypes();
- }
-
- public static IProcessorType[] getProcessorTypesExclJREDefault()
- {
- return getProcessorTypeRegistry().getProcessorTypesExclJREDefault();
- }
-
- public static IProcessorType getProcessorType(String id)
- {
- return getProcessorTypeRegistry().getProcessorType(id);
- }
-
- public static IProcessorInvoker getProcessorInvoker(String invokerId)
- {
- return getInvokerRegistry().getProcessorInvoker(invokerId);
- }
-
- public static IProcessorInvoker[] getProcessorInvokers()
- {
- return getInvokerRegistry().getProcessorInvokers();
- }
-
- private static Preferences getPreferences()
- {
- return JAXPLaunchingPlugin.getDefault().getPluginPreferences();
- }
-
- public static void saveFeaturePreferences(Map<IProcessorType, Map<String, String>> typeFeatures, IProgressMonitor monitor) throws CoreException
- {
- if (monitor.isCanceled())
- return;
- try
- {
- monitor.beginTask(Messages.XSLTRuntime_5, 100);
- FeaturePreferences prefs = new FeaturePreferences();
- Map<String,Map<String,String>> typeIdFeatures = new HashMap<String,Map<String,String>>(typeFeatures.size());
- for (IProcessorType type : typeFeatures.keySet())
- {
- Map<String,String> values = typeFeatures.get(type);
- typeIdFeatures.put(type.getId(), values);
- }
- prefs.setTypeFeatures(typeIdFeatures);
- String xml = prefs.getAsXML();
- monitor.worked(40);
- if (monitor.isCanceled())
- return;
- JAXPRuntime.getPreferences().setValue(JAXPRuntime.PREF_FEATURE_XML, xml);
- monitor.worked(30);
- if (monitor.isCanceled())
- return;
- JAXPRuntime.savePreferences();
- monitor.worked(30);
- }
- catch (Exception e)
- {
- throw new CoreException(new Status(IStatus.ERROR,JAXPLaunchingPlugin.PLUGIN_ID,Messages.XSLTRuntime_6,e));
- }
- finally
- {
- monitor.done();
- }
- }
-
- public static void saveOutputPropertyPreferences(Map<IProcessorType, Map<String,String>> typeProperties, IProgressMonitor monitor) throws CoreException
- {
- if (monitor.isCanceled())
- return;
- try
- {
- monitor.beginTask(Messages.XSLTRuntime_7, 100);
- OutputPropertyPreferences prefs = new OutputPropertyPreferences();
- for (IProcessorType type : typeProperties.keySet())
- {
- prefs.setOutputPropertyValues(type.getId(), typeProperties.get(type));
- }
- String xml = prefs.getAsXML();
- monitor.worked(40);
- if (monitor.isCanceled())
- return;
- JAXPRuntime.getPreferences().setValue(JAXPRuntime.PREF_OUTPUT_PROPERTIES_XML, xml);
- monitor.worked(30);
- if (monitor.isCanceled())
- return;
- JAXPRuntime.savePreferences();
- monitor.worked(30);
- }
- catch (Exception e)
- {
- throw new CoreException(new Status(IStatus.ERROR,JAXPLaunchingPlugin.PLUGIN_ID,Messages.XSLTRuntime_8,e));
- }
- finally
- {
- monitor.done();
- }
- }
-
- public static void saveProcessorPreferences(IProcessorInstall[] installs, IProcessorInstall defaultInstall, IProgressMonitor monitor) throws CoreException
- {
- if (monitor.isCanceled())
- return;
- try
- {
- monitor.beginTask(Messages.XSLTRuntime_9, 100);
- ProcessorPreferences prefs = new ProcessorPreferences();
- if (defaultInstall != null)
- prefs.setDefaultProcessorId(defaultInstall.getId());
- prefs.setProcessors(new ArrayList<IProcessorInstall>(Arrays.asList(installs)));
- String xml = prefs.getAsXML();
- monitor.worked(40);
- if (monitor.isCanceled())
- return;
- JAXPRuntime.getPreferences().setValue(JAXPRuntime.PREF_PROCESSOR_XML, xml);
- monitor.worked(30);
- if (monitor.isCanceled())
- return;
- JAXPRuntime.savePreferences();
- monitor.worked(30);
- }
- catch (Exception e)
- {
- throw new CoreException(new Status(IStatus.ERROR,JAXPLaunchingPlugin.PLUGIN_ID,Messages.XSLTRuntime_10,e));
- }
- finally
- {
- monitor.done();
- }
- }
-
- public static Map<String,String> createDefaultOutputProperties(String typeId)
- {
- Map<String,String> props = new HashMap<String,String>();
- if (JRE_DEFAULT_PROCESSOR_TYPE_ID.equals(typeId))
- props.put("indent", "yes"); //$NON-NLS-1$ //$NON-NLS-2$
- else if (JAXPLaunchConfigurationConstants.XALAN_TYPE_ID.equals(typeId))
- {
- props.put("indent", "yes"); //$NON-NLS-1$ //$NON-NLS-2$
- props.put("{http://xml.apache.org/xslt}indent-amount", "4"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- else if (JAXPLaunchConfigurationConstants.SAXON_TYPE_ID.equals(typeId))
- {
- props.put("indent", "yes"); //$NON-NLS-1$ //$NON-NLS-2$
- props.put("{http://saxon.sf.net/}indent-spaces", "4"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- else if (JAXPLaunchConfigurationConstants.SAXON_1_0_TYPE_ID.equals(typeId))
- {
- props.put("indent", "yes"); //$NON-NLS-1$ //$NON-NLS-2$
- props.put("{http://saxon.sf.net/}indent-spaces", "4"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return props;
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/LaunchAttributes.java b/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/LaunchAttributes.java
deleted file mode 100644
index bfd8691..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/LaunchAttributes.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.launching;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.TransformerException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.wst.xsl.launching.config.LaunchAttribute;
-import org.eclipse.wst.xsl.launching.config.PreferenceUtil;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
-public class LaunchAttributes
-{
- private final Set<LaunchAttribute> attributes = new HashSet<LaunchAttribute>();
-
- public Set<LaunchAttribute> getAttributes()
- {
- return attributes;
- }
-
- public void addAttribute(LaunchAttribute attribute)
- {
- attributes.add(attribute);
- }
-
- public LaunchAttribute getAttribute(String uri)
- {
- for (Iterator<LaunchAttribute> iter = attributes.iterator(); iter.hasNext();)
- {
- LaunchAttribute tv = iter.next();
- if (tv.uri.equals(uri))
- return tv;
- }
- return null;
- }
-
- public void removeAtribute(String uri)
- {
- for (Iterator<LaunchAttribute> iter = attributes.iterator(); iter.hasNext();)
- {
- LaunchAttribute attribute = iter.next();
- if (attribute.uri.equals(uri))
- iter.remove();
- }
- }
-
- public String toXML() throws ParserConfigurationException, IOException, TransformerException
- {
- Document doc = PreferenceUtil.getDocument();
-
- Element attributesEl = doc.createElement("Attributes"); //$NON-NLS-1$
- doc.appendChild(attributesEl);
-
- for (Iterator<LaunchAttribute> iter = attributes.iterator(); iter.hasNext();)
- {
- LaunchAttribute attribute = iter.next();
- Element attributeEl = doc.createElement("Attribute"); //$NON-NLS-1$
- attributeEl.setAttribute("name", attribute.uri); //$NON-NLS-1$
- attributeEl.setAttribute("type", attribute.type); //$NON-NLS-1$
- attributeEl.setAttribute("value", attribute.value); //$NON-NLS-1$
- attributesEl.appendChild(attributeEl);
- }
-
- return PreferenceUtil.serializeDocument(doc);
- }
-
- public static LaunchAttributes fromXML(InputStream inputStream) throws CoreException
- {
- Document doc = PreferenceUtil.getDocument(inputStream);
-
- LaunchAttributes pdef = new LaunchAttributes();
-
- Element attributesEl = doc.getDocumentElement();
-
- NodeList attributeEls = attributesEl.getElementsByTagName("Attribute"); //$NON-NLS-1$
- for (int i = 0; i < attributeEls.getLength(); i++)
- {
- Element attributeEl = (Element) attributeEls.item(i);
- String name = attributeEl.getAttribute("name"); //$NON-NLS-1$
- String type = attributeEl.getAttribute("type"); //$NON-NLS-1$
- String value = attributeEl.getAttribute("value"); //$NON-NLS-1$
- pdef.addAttribute(new LaunchAttribute(name, type, value));
- }
-
- return pdef;
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/LaunchProperties.java b/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/LaunchProperties.java
deleted file mode 100644
index 469614f..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/LaunchProperties.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.launching;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.TransformerException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.wst.xsl.launching.config.PreferenceUtil;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
-public class LaunchProperties
-{
- private final Map<String, String> properties = new HashMap<String, String>();
-
- public Map<String, String> getProperties()
- {
- return properties;
- }
-
- public void setProperty(String name, String value)
- {
- properties.put(name, value);
- }
-
- public String getProperty(String name)
- {
- return properties.get(name);
- }
-
- public void removeProperty(String name)
- {
- properties.remove(name);
- }
-
- public String toXML() throws ParserConfigurationException, IOException, TransformerException
- {
- Document doc = PreferenceUtil.getDocument();
-
- Element propertysEl = doc.createElement("Properties"); //$NON-NLS-1$
- doc.appendChild(propertysEl);
-
- for (Map.Entry<String, String> property : properties.entrySet())
- {
- String name = property.getKey();
- String value = property.getValue();
- Element propertyEl = doc.createElement("Property"); //$NON-NLS-1$
- propertyEl.setAttribute("name", name); //$NON-NLS-1$
- propertyEl.setAttribute("value", value); //$NON-NLS-1$
- propertysEl.appendChild(propertyEl);
- }
-
- return PreferenceUtil.serializeDocument(doc);
- }
-
- public static LaunchProperties fromXML(InputStream inputStream) throws CoreException
- {
- Document doc = PreferenceUtil.getDocument(inputStream);
-
- LaunchProperties pdef = new LaunchProperties();
-
- Element propertysEl = doc.getDocumentElement();
-
- NodeList propertyEls = propertysEl.getElementsByTagName("Property"); //$NON-NLS-1$
- for (int i = 0; i < propertyEls.getLength(); i++)
- {
- Element propertyEl = (Element) propertyEls.item(i);
- String name = propertyEl.getAttribute("name"); //$NON-NLS-1$
- String value = propertyEl.getAttribute("value"); //$NON-NLS-1$
- pdef.setProperty(name, value);
- }
-
- return pdef;
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/ProcessorInstall.java b/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/ProcessorInstall.java
deleted file mode 100644
index 6ee8717..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/ProcessorInstall.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.launching;
-
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.wst.xsl.jaxp.launching.internal.JAXPLaunchingPlugin;
-import org.eclipse.wst.xsl.jaxp.launching.internal.PluginProcessorJar;
-import org.eclipse.wst.xsl.jaxp.launching.internal.Utils;
-
-public class ProcessorInstall implements IProcessorInstall
-{
- private final String id;
- private String name;
- private String type;
- private IProcessorJar[] jars;
- private final boolean contributed;
- private String debuggerId;
- private String supports;
-
- public ProcessorInstall(String id, String label, String typeId, IProcessorJar[] jars, String debuggerId, String supports, boolean contributed)
- {
- this.id = id;
- name = label;
- type = typeId;
- this.debuggerId = debuggerId;
- this.contributed = contributed;
- this.jars = jars;
- this.supports = supports;
- }
-
- public String getId()
- {
- return id;
- }
-
- public String getName()
- {
- return name;
- }
-
- public void setName(String name)
- {
- this.name = name;
- }
-
- public IProcessorJar[] getProcessorJars()
- {
- return jars;
- }
-
- public void setProcessorJars(IProcessorJar[] jars)
- {
- this.jars = jars;
- }
-
- public String getProcessorTypeId()
- {
- return type;
- }
-
- public IProcessorType getProcessorType()
- {
- return JAXPRuntime.getProcessorType(type);
- }
-
- public void setProcessorTypeId(String id)
- {
- type = id;
- }
-
- public boolean isContributed()
- {
- return contributed;
- }
-
- public static IProcessorJar[] createJars(String bundleId, String classpath)
- {
- IProcessorJar[] jars;
- if (classpath == null)
- return new IProcessorJar[0];
- String[] jarstring = classpath.split(";"); //$NON-NLS-1$
- jars = new IProcessorJar[jarstring.length];
- for (int i = 0; i < jarstring.length; i++)
- {
- String jar = jarstring[i];
- try
- {
- if (jar.startsWith("${eclipse_orbit:") && jar.endsWith("}")) //$NON-NLS-1$ //$NON-NLS-2$
- {
- jar = jar.substring("${eclipse_orbit:".length()); //$NON-NLS-1$
- jar = jar.substring(0,jar.length()-1);
- //jar = Utils.getFileLocation(jar,"");
- jars[i] = new PluginProcessorJar(jar, null);
- }
- else
- {
- jar = Utils.getFileLocation(bundleId,jar);
- jars[i] = new PluginProcessorJar(bundleId, new Path(jar));
- }
- }
- catch (CoreException e)
- {
- JAXPLaunchingPlugin.log(e);
- }
- }
- return jars;
- }
-
- public boolean hasDebugger()
- {
- return debuggerId != null;
- }
-
- public boolean supports(String xsltVersion)
- {
- return supports.indexOf(xsltVersion) >= 0;
- }
-
- public String getSupports()
- {
- return supports;
- }
-
- public void setSupports(String supports)
- {
- this.supports = supports;
- }
-
- public IDebugger getDebugger()
- {
- return JAXPRuntime.getDebugger(debuggerId);
- }
-
- public void setDebuggerId(String debuggerId)
- {
- this.debuggerId = debuggerId;
- }
-}
diff --git a/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/Attribute.java b/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/Attribute.java
deleted file mode 100644
index 15306b5..0000000
--- a/bundles/org.eclipse.wst.xsl.jaxp.launching/src/org/eclipse/wst/xsl/jaxp/launching/internal/Attribute.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Doug Satchwell (Chase Technology Ltd) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xsl.jaxp.launching.internal;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.wst.xsl.jaxp.launching.IAttribute;
-
-public class Attribute implements IAttribute, Comparable<Object>
-{
- private final String uri;
- private final String description;
- private final String type;
-
- public Attribute(String uri, String type, String description)
- {
- this.uri = uri;
- this.type = type;
- this.description = description;