diff --git a/.idea/modules.xml b/.idea/modules.xml
index 19e68530442f..1c82aaa53ea9 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -100,6 +100,8 @@
+
+
diff --git a/community-main.iml b/community-main.iml
index e3109b8263bf..4b5a9e3fa21d 100644
--- a/community-main.iml
+++ b/community-main.iml
@@ -77,6 +77,7 @@
+
diff --git a/plugins/xslt-debugger/build.properties b/plugins/xslt-debugger/build.properties
new file mode 100644
index 000000000000..ea2fd1e2e723
--- /dev/null
+++ b/plugins/xslt-debugger/build.properties
@@ -0,0 +1,8 @@
+#idea.home=C:\\Programme\\IntelliJ Selena
+idea.home=C:\\work\\Programme\\IntelliJ 10
+idea.plugins.home=${idea.home}/plugins
+
+xpathview.src.home=../xpath
+
+compile.debug=true
+compile.optimize=true
diff --git a/plugins/xslt-debugger/build.xml b/plugins/xslt-debugger/build.xml
new file mode 100644
index 000000000000..e0b869c3b3f9
--- /dev/null
+++ b/plugins/xslt-debugger/build.xml
@@ -0,0 +1,198 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The XPathView plugin is required to build the XSLT-Debugger. Please set the property "xpathview.plugin.home" to
+ point to the installation of the plugin in IntelliJ IDEA.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/plugins/xslt-debugger/rt/lib/rmi-stubs.jar b/plugins/xslt-debugger/rt/lib/rmi-stubs.jar
new file mode 100644
index 000000000000..cb5ad8a8f43d
Binary files /dev/null and b/plugins/xslt-debugger/rt/lib/rmi-stubs.jar differ
diff --git a/plugins/xslt-debugger/rt/lib/saxon-conditions.html b/plugins/xslt-debugger/rt/lib/saxon-conditions.html
new file mode 100644
index 000000000000..cd33c4268958
--- /dev/null
+++ b/plugins/xslt-debugger/rt/lib/saxon-conditions.html
@@ -0,0 +1,148 @@
+
+
+
+
+
+ SAXON: Conditions of Use
+
+
+ Saxon
+
+ The contents of the downloaded file (saxon.zip), with the exception of the
+ Ælfred parser (see below),
+ are subject to the Mozilla Public License Version 1.0
+ (the "License"); you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.mozilla.org/MPL/
+
+ Software distributed under the License is distributed on an "AS IS" basis,
+ WITHOUT WARRANTY OF ANY KIND, either express or implied.
+ See the License for the specific language governing rights and limitations under the License.
+
+
+
+
The Original Code of SAXON comprises all those components which are not explicitly attributed
+ to other parties. It does not include the Ælfred parser, which is redistributed under
+ the licence described below.
+
+ The Initial Developer of the Original Code was Michael Kay.
+ Individual modules identified as being created by James Clark, David Megginson, or John Cowan include
+ separate IPR notices. All Rights Reserved.
+
+
+ Until January 2001 Michael Kay worked for International Computers Limited (ICL, now part
+ of Fujitsu), and from February 2001 to January 2004 he worked for Software AG. These two companies
+ both sponsored the development of Saxon and authorised its release under this license, but are not
+ themselves parties to the license. Michael Kay now runs his own company, Saxonica, which has taken
+ over all responsibility for Saxon development and support.
+
+
+
+ For reasons of continuity,
+ the icl.com domain name is retained in package names and namespace URIs with the tacit
+ consent of ICL, but this should not be taken to imply any ongoing ICL involvement.
+
+
+ If you produce a product that includes or requires SAXON, please refer to it as
+ "The SAXON XSLT Processor from Michael Kay", and include the URL of the
+ home page, which is at
+ http://saxon.sourceforge.net/.
+
+ There is no guarantee of technical support, though I am usually able to answer enquiries
+ within a few days. Please subscribe to the mailing list available at
+
+ http://lists.sourceforge.net/lists/listinfo/saxon-help and raise any enquiries there.
+ Also check the Saxon project pages on sourceforge for details of known errors; all bugs are
+ listed there as soon as I have sufficient evidence to describe the nature of the problem.
+
+
+ Ælfred
+
+ Included in the Saxon distribution is a modified version of the Ælfred XML parser
+ originally developed by David Megginson at Microstar (no longer in existence).
+ I have taken the relevant part of
+ David Brownell's
+ Ælfred2 distribution, repackaged it,
+ and fixed a few bugs. All changes are clearly documented in the source code.
+
+ This is distributed under the terms of Microstar's terms and conditions, which are as follows:
+
+
+
+ |
+
+ AElfred, Version 1.2
+ Microstar's Java-Based XML Parser
+ Copyright (c) 1997, 1998 by Microstar Software Ltd.
+ Home Page: http://www.microstar.com/XML/
+
+ AElfred is free for both commercial and non-commercial use and
+ redistribution, provided that Microstar's copyright and disclaimer are
+ retained intact. You are free to modify AElfred for your own use and
+ to redistribute AElfred with your modifications, provided that the
+ modifications are clearly documented.
+
+
+ DISCLAIMER
+
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ merchantability or fitness for a particular purpose. Please use it AT
+ YOUR OWN RISK.
+
+
+ |
+ |
+
+
+
+ David Brownell added the following statement:
+
+
+/*
+ * Copyright (c) 1999-2000 by David Brownell. All Rights Reserved.
+ *
+ * This program is open source software; you may use, copy, modify, and
+ * redistribute it under the terms of the LICENSE with which it was
+ * originally distributed.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * LICENSE for more details.
+ */
+
+
+
+ The version included with Saxon is David Brownell's code of 26 Feb 2000,
+ modified as follows:
+
+
+ - Changed the package name to com.icl.saxon.aelfred to prevent any accidental confusion with the
+ original Microstar code or with David Brownell's version.
+
+ - Fixed several bugs: (1) a bug in namespace handling (where an attribute xxx:name precedes the xmlns:xxx
+ declaration) (2) poor diagnostics when end of file occurs prematurely
+
+ - Subsetting the code to include only the XML non-validating parser and SAX driver, with appropriate
+ changes to the setFeature() and getFeature() methods.
+
+ - Some further changes made by David Brownell up to June 2001 have been incorporated.
+
+
+
+
+ Michael H. Kay
+ Saxonica Limited
+ 22 June 2005
+
+
+
+
+
+
diff --git a/plugins/xslt-debugger/rt/lib/saxon.jar b/plugins/xslt-debugger/rt/lib/saxon.jar
new file mode 100644
index 000000000000..15aa83a54de6
Binary files /dev/null and b/plugins/xslt-debugger/rt/lib/saxon.jar differ
diff --git a/plugins/xslt-debugger/rt/lib/saxon9he.jar b/plugins/xslt-debugger/rt/lib/saxon9he.jar
new file mode 100644
index 000000000000..5d86f50a5fb6
Binary files /dev/null and b/plugins/xslt-debugger/rt/lib/saxon9he.jar differ
diff --git a/plugins/xslt-debugger/rt/lib/serializer.jar b/plugins/xslt-debugger/rt/lib/serializer.jar
new file mode 100644
index 000000000000..99f98db9bfca
Binary files /dev/null and b/plugins/xslt-debugger/rt/lib/serializer.jar differ
diff --git a/plugins/xslt-debugger/rt/lib/xalan.jar b/plugins/xslt-debugger/rt/lib/xalan.jar
new file mode 100644
index 000000000000..458fa73d96e7
Binary files /dev/null and b/plugins/xslt-debugger/rt/lib/xalan.jar differ
diff --git a/plugins/xslt-debugger/rt/src/org/intellij/plugins/xsltDebugger/rt/XSLTDebuggerMain.java b/plugins/xslt-debugger/rt/src/org/intellij/plugins/xsltDebugger/rt/XSLTDebuggerMain.java
new file mode 100644
index 000000000000..4e578a84b84f
--- /dev/null
+++ b/plugins/xslt-debugger/rt/src/org/intellij/plugins/xsltDebugger/rt/XSLTDebuggerMain.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2002-2007 Sascha Weinreuter
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.intellij.plugins.xsltDebugger.rt;
+
+import org.intellij.plugins.xslt.run.rt.XSLTMain;
+import org.intellij.plugins.xslt.run.rt.XSLTRunner;
+import org.intellij.plugins.xsltDebugger.rt.engine.local.saxon.SaxonSupport;
+import org.intellij.plugins.xsltDebugger.rt.engine.local.saxon9.Saxon9Support;
+import org.intellij.plugins.xsltDebugger.rt.engine.local.xalan.XalanSupport;
+import org.intellij.plugins.xsltDebugger.rt.engine.remote.DebuggerServer;
+
+import javax.xml.transform.*;
+import java.rmi.RemoteException;
+
+
+/*
+* Created by IntelliJ IDEA.
+* User: sweinreuter
+* Date: 23.11.2007
+*/
+public class XSLTDebuggerMain implements XSLTMain {
+
+ public TransformerFactory createTransformerFactory() throws ClassNotFoundException, InstantiationException, IllegalAccessException {
+ final String type = System.getProperty("xslt.transformer.type");
+ if ("xalan".equalsIgnoreCase(type)) {
+ return XalanSupport.createTransformerFactory();
+ } else if ("saxon".equalsIgnoreCase(type)) {
+ return SaxonSupport.createTransformerFactory();
+ } else if ("saxon9".equalsIgnoreCase(type)) {
+ return Saxon9Support.createTransformerFactory();
+ } else if (type != null) {
+ throw new UnsupportedOperationException("Unsupported Transformer type '" + type + "'");
+ }
+ return XalanSupport.prepareFactory(XSLTRunner.createTransformerFactoryStatic());
+ }
+
+ public void start(Transformer transformer, Source source, Result result) throws TransformerException {
+ try {
+ DebuggerServer.create(transformer, source, result, Integer.getInteger("xslt.debugger.port"));
+ } catch (RemoteException e) {
+ throw new TransformerException(e.getMessage(), e.getCause());
+ }
+ }
+}
\ No newline at end of file
diff --git a/plugins/xslt-debugger/rt/src/org/intellij/plugins/xsltDebugger/rt/engine/Breakpoint.java b/plugins/xslt-debugger/rt/src/org/intellij/plugins/xsltDebugger/rt/engine/Breakpoint.java
new file mode 100644
index 000000000000..18d8e1bf61bb
--- /dev/null
+++ b/plugins/xslt-debugger/rt/src/org/intellij/plugins/xsltDebugger/rt/engine/Breakpoint.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2007 Sascha Weinreuter
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.intellij.plugins.xsltDebugger.rt.engine;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: sweinreuter
+ * Date: 29.05.2007
+ */
+public interface Breakpoint {
+ String getUri();
+
+ int getLine();
+
+ boolean isEnabled();
+
+ void setEnabled(boolean enabled);
+
+ String getCondition();
+
+ void setCondition(String expr);
+
+ String getLogMessage();
+
+ void setLogMessage(String expr);
+
+ String getTraceMessage();
+
+ void setTraceMessage(String expr);
+
+ boolean isSuspend();
+
+ void setSuspend(boolean suspend);
+}
diff --git a/plugins/xslt-debugger/rt/src/org/intellij/plugins/xsltDebugger/rt/engine/BreakpointManager.java b/plugins/xslt-debugger/rt/src/org/intellij/plugins/xsltDebugger/rt/engine/BreakpointManager.java
new file mode 100644
index 000000000000..ea9b01e0d485
--- /dev/null
+++ b/plugins/xslt-debugger/rt/src/org/intellij/plugins/xsltDebugger/rt/engine/BreakpointManager.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2007 Sascha Weinreuter
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.intellij.plugins.xsltDebugger.rt.engine;
+
+import java.io.File;
+import java.util.List;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: sweinreuter
+ * Date: 23.05.2007
+ */
+public interface BreakpointManager {
+ Breakpoint setBreakpoint(File file, int line);
+
+ Breakpoint setBreakpoint(String uri, int line);
+
+ void removeBreakpoint(Breakpoint bp);
+
+ void removeBreakpoint(String uri, int line);
+
+ List