JBoss Tools SVN: r6533 - trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-02-22 07:59:32 -0500 (Fri, 22 Feb 2008)
New Revision: 6533
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SerializationTest.java
Log:
JBIDE-1785 Test added
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SerializationTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SerializationTest.java 2008-02-22 12:42:26 UTC (rev 6532)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SerializationTest.java 2008-02-22 12:59:32 UTC (rev 6533)
@@ -42,6 +42,13 @@
EditorTestHelper.joinBackgroundActivities();
}
+ protected void tearDown() throws Exception {
+ if(project != null && project.isAccessible()) {
+ project.delete(false, true, new NullProgressMonitor());
+ project = null;
+ }
+ }
+
private ISeamProject getSeamProject() {
ISeamProject seamProject = null;
try {
@@ -52,7 +59,7 @@
assertNotNull("Seam project is null", seamProject);
return seamProject;
}
-
+
public void testXMLSerialization() {
Element root = XMLUtilities.createDocumentElement("root");
ISeamProject seamProject = getSeamProject();
@@ -106,5 +113,16 @@
}
}
+
+ public void testLoadSerializedModelTime() {
+ ISeamProject sp = getSeamProject();
+
+ long time = ((SeamProject)sp).reload();
+ int components = sp.getComponents().size();
+ System.out.print("Reloaded " + components + " components in " + time + " ms");
+
+ float timePerComponent = 1f * time / components;
+ assertTrue("Loading time per component is too large: " + timePerComponent + " ms.", timePerComponent < 3.0f);
+ }
}
18 years, 1 month
JBoss Tools SVN: r6532 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-02-22 07:42:26 -0500 (Fri, 22 Feb 2008)
New Revision: 6532
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamObject.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java
Log:
JBIDE-1785 Test support added
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamObject.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamObject.java 2008-02-22 12:32:39 UTC (rev 6531)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamObject.java 2008-02-22 12:42:26 UTC (rev 6532)
@@ -187,9 +187,6 @@
} else {
source = (IPath)context.get(SeamXMLConstants.ATTR_PATH);
}
- if(source == null) {
- System.out.println("Cannot load source");
- }
Element e_id = XMLUtilities.getUniqueChild(element, SeamXMLConstants.TAG_ID);
if(e_id != null) {
String cls = e_id.getAttribute(SeamXMLConstants.ATTR_CLASS);
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2008-02-22 12:32:39 UTC (rev 6531)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2008-02-22 12:42:26 UTC (rev 6532)
@@ -90,11 +90,7 @@
Map<String,List<String>> imports = new HashMap<String, List<String>>();
{
- ScopeType[] types = ScopeType.values();
- for (int i = 0; i < scopes.length; i++) {
- scopes[i] = new SeamScope(this, types[i]);
- scopesMap.put(types[i], scopes[i]);
- }
+ createScopes();
}
Map<String, SeamComponent> allComponents = new HashMap<String, SeamComponent>();
@@ -333,8 +329,7 @@
if(!dependsOn.contains(p)) return;
p.usedBy.remove(this);
dependsOn.remove(p);
- IPath[] ps = sourcePaths.toArray(new IPath[0]);
- //TODO use sourcePaths2
+ IPath[] ps = sourcePaths2.keySet().toArray(new IPath[0]);
for (int i = 0; i < ps.length; i++) {
IPath pth = ps[i];
if(p.getSourcePath().isPrefixOf(pth)) {
@@ -379,8 +374,6 @@
if(isStorageResolved) return;
isStorageResolved = true;
- long begin = System.currentTimeMillis();
-
postponeFiring();
try {
@@ -395,8 +388,12 @@
root = XMLUtilities.getElement(file, null);
if(root != null) {
loadProjectDependencies(root);
- loadSourcePaths2(root);
-// loadSourcePaths(root);
+ if(XMLUtilities.getUniqueChild(root, "paths") != null) {
+ loadSourcePaths2(root);
+ } else {
+ //old code
+ loadSourcePaths(root);
+ }
}
}
@@ -412,12 +409,51 @@
fireChanges();
}
- long e = System.currentTimeMillis();
+ }
+
+ /**
+ * Method testing how long it takes to load Seam model
+ * serialized previously.
+ * This approach makes sure, that all other services
+ * (JDT, XModel, etc) are already loaded at first start of
+ * Seam model, so that now it is more or less pure time
+ * to be computed.
+ *
+ * @return
+ */
+ public long reload() {
+ classPath = new ClassPath(this);
+ sourcePaths.clear();
+ sourcePaths2.clear();
+ isStorageResolved = false;
+ dependsOn.clear();
+ usedBy.clear();
+ allComponents.clear();
+ allFactories.clear();
+ allVariables.clear();
+ allVariablesCopy = null;
+ allVariablesPlusShort = null;
+ imports.clear();
+ javaDeclarations.clear();
+ packages.clear();
+ createScopes();
- //TODO replace with proper testing
- System.out.println("Seam project " + project.getName() + " started in " + (e - begin));
+ long begin = System.currentTimeMillis();
+
+ classPath.init();
+ resolve();
+
+ long end = System.currentTimeMillis();
+ return end - begin;
}
+ private void createScopes() {
+ ScopeType[] types = ScopeType.values();
+ for (int i = 0; i < scopes.length; i++) {
+ scopes[i] = new SeamScope(this, types[i]);
+ scopesMap.put(types[i], scopes[i]);
+ }
+ }
/**
* Stores results of last build, so that on exit/enter Eclipse
* load them without rebuilding project
@@ -429,7 +465,7 @@
Element root = XMLUtilities.createDocumentElement("seam-project"); //$NON-NLS-1$
storeProjectDependencies(root);
- storeSourcePaths(root);
+// storeSourcePaths(root);
storeSourcePaths2(root);
if(validationContext != null) validationContext.store(root);
@@ -461,13 +497,13 @@
/*
*
*/
- private void storeSourcePaths(Element root) {
- Element sourcePathsElement = XMLUtilities.createElement(root, "source-paths"); //$NON-NLS-1$
- for (IPath path : sourcePaths) {
- Element pathElement = XMLUtilities.createElement(sourcePathsElement, "path"); //$NON-NLS-1$
- pathElement.setAttribute("value", path.toString()); //$NON-NLS-1$
- }
- }
+// private void storeSourcePaths(Element root) {
+// Element sourcePathsElement = XMLUtilities.createElement(root, "source-paths"); //$NON-NLS-1$
+// for (IPath path : sourcePaths) {
+// Element pathElement = XMLUtilities.createElement(sourcePathsElement, "path"); //$NON-NLS-1$
+// pathElement.setAttribute("value", path.toString()); //$NON-NLS-1$
+// }
+// }
private void storeSourcePaths2(Element root) {
Properties context = new Properties();
@@ -528,7 +564,7 @@
}
/*
- *
+ * obsolete, will work only for old projects
*/
private void loadSourcePaths(Element root) {
Element sourcePathsElement = XMLUtilities.getUniqueChild(root, "source-paths"); //$NON-NLS-1$
@@ -703,8 +739,7 @@
return;
}
if(!sourcePaths.contains(source)) sourcePaths.add(source);
-
- sourcePaths2.put(source, ds); //TODO
+ sourcePaths2.put(source, ds);
if(ds.getImports().size() > 0) {
setImports(source.toString(), ds.getImports());
@@ -911,7 +946,7 @@
* @param source
*/
public void pathRemoved(IPath source) {
- if(!sourcePaths.contains(source)) return;
+ if(!sourcePaths.contains(source) && !sourcePaths2.containsKey(source)) return;
sourcePaths.remove(source);
sourcePaths2.remove(source);
removeImports(source.toString());
@@ -1395,7 +1430,6 @@
if(postponedChanges == null) return;
List<Change> changes = postponedChanges;
postponedChanges = null;
- System.out.println("fireng " + changes.size() + " changes");
fireChanges(changes);
}
18 years, 1 month
JBoss Tools SVN: r6531 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-02-22 07:32:39 -0500 (Fri, 22 Feb 2008)
New Revision: 6531
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletsHtmlContentAssistProcessor.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1813
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletsHtmlContentAssistProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletsHtmlContentAssistProcessor.java 2008-02-22 11:54:02 UTC (rev 6530)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletsHtmlContentAssistProcessor.java 2008-02-22 12:32:39 UTC (rev 6531)
@@ -121,15 +121,18 @@
if(proposals==null) {
return null;
}
- HashMap uniqProposals = new HashMap(proposals.length);
- ArrayList uniqProposalList = new ArrayList(proposals.length);
+ HashMap<String, ICompletionProposal> uniqProposals = new HashMap<String, ICompletionProposal>(proposals.length);
+ ArrayList<ICompletionProposal> uniqProposalList = new ArrayList<ICompletionProposal>(proposals.length);
for(int i=0; i<proposals.length; i++) {
- int eq = proposals[i].getDisplayString().indexOf('=');
- String str = proposals[i].getDisplayString();;
+ String str = proposals[i].getDisplayString();
+ if(str.startsWith("\"") && str.endsWith("\"") && str.length()>2) {
+ str = str.substring(0, str.length()-1).substring(1);
+ }
+ int eq = str.indexOf('=');
if(eq>0) {
str = str.substring(0, eq);
}
- Object proposal = uniqProposals.get(str);
+ ICompletionProposal proposal = uniqProposals.get(str);
if(proposal==null || proposals[i] instanceof AutoContentAssistantProposal) {
uniqProposals.put(str, proposals[i]);
uniqProposalList.add(proposals[i]);
18 years, 1 month
JBoss Tools SVN: r6530 - in trunk/jbpm/docs/resources: support/lib and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2008-02-22 06:54:02 -0500 (Fri, 22 Feb 2008)
New Revision: 6530
Added:
trunk/jbpm/docs/resources/styles/en/code-highlight.xsl
trunk/jbpm/docs/resources/support/lib/highlight-3.1.4.GA.jar
Log:
http://jira.jboss.com/jira/browse/JBIDE-1703
stylesheet is changed
Added: trunk/jbpm/docs/resources/styles/en/code-highlight.xsl
===================================================================
--- trunk/jbpm/docs/resources/styles/en/code-highlight.xsl (rev 0)
+++ trunk/jbpm/docs/resources/styles/en/code-highlight.xsl 2008-02-22 11:54:02 UTC (rev 6530)
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+
+<!--
+
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+ xmlns="http://www.w3.org/TR/xhtml1/transitional"
+ exclude-result-prefixes="#default"
+ xmlns:rf="java:org.richfaces.highlight.XhtmlRendererFactory"
+ >
+
+ <xsl:template match="programlisting[@role='XML']|programlisting[@role='JAVA']|programlisting[@role='XHTML']|programlisting[@role='JSP']|programlisting[@role='CSS']">
+
+ <xsl:variable name="role">
+ <xsl:value-of select="s:toUpperCase(string(@role))" xmlns:s="java:java.lang.String"/>
+ </xsl:variable>
+ <xsl:variable name="child.content">
+ <xsl:apply-templates/>
+ </xsl:variable>
+ <xsl:variable name="factory" select="rf:instance()"/>
+ <xsl:variable name="hiliter" select="rf:getRenderer($factory, string($role))"/>
+ <pre class="{$role}">
+ <xsl:choose>
+ <xsl:when test="$hiliter">
+ <xsl:value-of select="jhr:highlight($hiliter, $role, string($child.content), 'UTF-8', true())"
+ xmlns:jhr="com.uwyn.jhighlight.renderer.Renderer" disable-output-escaping="yes"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="$child.content"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </pre>
+
+ </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
Added: trunk/jbpm/docs/resources/support/lib/highlight-3.1.4.GA.jar
===================================================================
(Binary files differ)
Property changes on: trunk/jbpm/docs/resources/support/lib/highlight-3.1.4.GA.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
18 years, 1 month
JBoss Tools SVN: r6529 - trunk/common/tests/org.jboss.tools.common.model.test/src/org/jboss/tools/common/model/test.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-02-22 06:49:10 -0500 (Fri, 22 Feb 2008)
New Revision: 6529
Modified:
trunk/common/tests/org.jboss.tools.common.model.test/src/org/jboss/tools/common/model/test/ClassPathTest.java
Log:
JBIDE-1811 Comments to test added
Modified: trunk/common/tests/org.jboss.tools.common.model.test/src/org/jboss/tools/common/model/test/ClassPathTest.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.model.test/src/org/jboss/tools/common/model/test/ClassPathTest.java 2008-02-22 11:41:27 UTC (rev 6528)
+++ trunk/common/tests/org.jboss.tools.common.model.test/src/org/jboss/tools/common/model/test/ClassPathTest.java 2008-02-22 11:49:10 UTC (rev 6529)
@@ -23,6 +23,17 @@
import junit.framework.TestCase;
+/**
+ * Automatic test for JBIDE-1811.
+ * Checks that EclipseResourceUtil.getClassPath(IProject)
+ * returns list which includes paths for Eclipse class path entries:
+ * 1. jars from the same project;
+ * 2. jars from another project in Eclipse work space;
+ * 3. external jars.
+ *
+ * @author V.Kabanovich
+ *
+ */
public class ClassPathTest extends TestCase {
static String BUNDLE_NAME = "org.jboss.tools.common.model.test";
TestProjectProvider provider1 = null;
@@ -66,9 +77,9 @@
List<String> list = EclipseResourceUtil.getClassPath(project2);
String[] testNames = {
- "/Test2/lib/b.jar",
- "/Test1/lib/a.jar",
- "projects/c.jar"
+ "/Test2/lib/b.jar", //1. jar from this project
+ "/Test1/lib/a.jar", //2. jar from another project
+ "/projects/c.jar" //3. external jar
};
for (int i = 0; i < testNames.length; i++) {
assertTrue("Cannot find classpath entry " + testNames[i], contains(list, testNames[i]));
18 years, 1 month
JBoss Tools SVN: r6528 - in trunk: jsf/docs/resources/support/lib and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2008-02-22 06:41:27 -0500 (Fri, 22 Feb 2008)
New Revision: 6528
Added:
trunk/jsf/docs/resources/styles/en/code-highlight.xsl
trunk/jsf/docs/resources/support/lib/highlight-3.1.4.GA.jar
trunk/seam/docs/resources/styles/en/code-highlight.xsl
trunk/seam/docs/resources/support/lib/highlight-3.1.4.GA.jar
Log:
http://jira.jboss.com/jira/browse/JBIDE-1703
stylesheet is changed
Added: trunk/jsf/docs/resources/styles/en/code-highlight.xsl
===================================================================
--- trunk/jsf/docs/resources/styles/en/code-highlight.xsl (rev 0)
+++ trunk/jsf/docs/resources/styles/en/code-highlight.xsl 2008-02-22 11:41:27 UTC (rev 6528)
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+
+<!--
+
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+ xmlns="http://www.w3.org/TR/xhtml1/transitional"
+ exclude-result-prefixes="#default"
+ xmlns:rf="java:org.richfaces.highlight.XhtmlRendererFactory"
+ >
+
+ <xsl:template match="programlisting[@role='XML']|programlisting[@role='JAVA']|programlisting[@role='XHTML']|programlisting[@role='JSP']|programlisting[@role='CSS']">
+
+ <xsl:variable name="role">
+ <xsl:value-of select="s:toUpperCase(string(@role))" xmlns:s="java:java.lang.String"/>
+ </xsl:variable>
+ <xsl:variable name="child.content">
+ <xsl:apply-templates/>
+ </xsl:variable>
+ <xsl:variable name="factory" select="rf:instance()"/>
+ <xsl:variable name="hiliter" select="rf:getRenderer($factory, string($role))"/>
+ <pre class="{$role}">
+ <xsl:choose>
+ <xsl:when test="$hiliter">
+ <xsl:value-of select="jhr:highlight($hiliter, $role, string($child.content), 'UTF-8', true())"
+ xmlns:jhr="com.uwyn.jhighlight.renderer.Renderer" disable-output-escaping="yes"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="$child.content"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </pre>
+
+ </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
Added: trunk/jsf/docs/resources/support/lib/highlight-3.1.4.GA.jar
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/resources/support/lib/highlight-3.1.4.GA.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/docs/resources/styles/en/code-highlight.xsl
===================================================================
--- trunk/seam/docs/resources/styles/en/code-highlight.xsl (rev 0)
+++ trunk/seam/docs/resources/styles/en/code-highlight.xsl 2008-02-22 11:41:27 UTC (rev 6528)
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+
+<!--
+
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+ xmlns="http://www.w3.org/TR/xhtml1/transitional"
+ exclude-result-prefixes="#default"
+ xmlns:rf="java:org.richfaces.highlight.XhtmlRendererFactory"
+ >
+
+ <xsl:template match="programlisting[@role='XML']|programlisting[@role='JAVA']|programlisting[@role='XHTML']|programlisting[@role='JSP']|programlisting[@role='CSS']">
+
+ <xsl:variable name="role">
+ <xsl:value-of select="s:toUpperCase(string(@role))" xmlns:s="java:java.lang.String"/>
+ </xsl:variable>
+ <xsl:variable name="child.content">
+ <xsl:apply-templates/>
+ </xsl:variable>
+ <xsl:variable name="factory" select="rf:instance()"/>
+ <xsl:variable name="hiliter" select="rf:getRenderer($factory, string($role))"/>
+ <pre class="{$role}">
+ <xsl:choose>
+ <xsl:when test="$hiliter">
+ <xsl:value-of select="jhr:highlight($hiliter, $role, string($child.content), 'UTF-8', true())"
+ xmlns:jhr="com.uwyn.jhighlight.renderer.Renderer" disable-output-escaping="yes"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="$child.content"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </pre>
+
+ </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
Added: trunk/seam/docs/resources/support/lib/highlight-3.1.4.GA.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/docs/resources/support/lib/highlight-3.1.4.GA.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
18 years, 1 month
JBoss Tools SVN: r6527 - in trunk: as/docs/resources/support/lib and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2008-02-22 06:36:33 -0500 (Fri, 22 Feb 2008)
New Revision: 6527
Added:
trunk/as/docs/resources/styles/en/code-highlight.xsl
trunk/as/docs/resources/support/lib/highlight-3.1.4.GA.jar
trunk/documentation/guides/resources/styles/en/code-highlight.xsl
trunk/documentation/guides/resources/support/lib/highlight-3.1.4.GA.jar
Log:
http://jira.jboss.com/jira/browse/JBIDE-1703
stylesheet is changed
Added: trunk/as/docs/resources/styles/en/code-highlight.xsl
===================================================================
--- trunk/as/docs/resources/styles/en/code-highlight.xsl (rev 0)
+++ trunk/as/docs/resources/styles/en/code-highlight.xsl 2008-02-22 11:36:33 UTC (rev 6527)
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+
+<!--
+
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+ xmlns="http://www.w3.org/TR/xhtml1/transitional"
+ exclude-result-prefixes="#default"
+ xmlns:rf="java:org.richfaces.highlight.XhtmlRendererFactory"
+ >
+
+ <xsl:template match="programlisting[@role='XML']|programlisting[@role='JAVA']|programlisting[@role='XHTML']|programlisting[@role='JSP']|programlisting[@role='CSS']">
+
+ <xsl:variable name="role">
+ <xsl:value-of select="s:toUpperCase(string(@role))" xmlns:s="java:java.lang.String"/>
+ </xsl:variable>
+ <xsl:variable name="child.content">
+ <xsl:apply-templates/>
+ </xsl:variable>
+ <xsl:variable name="factory" select="rf:instance()"/>
+ <xsl:variable name="hiliter" select="rf:getRenderer($factory, string($role))"/>
+ <pre class="{$role}">
+ <xsl:choose>
+ <xsl:when test="$hiliter">
+ <xsl:value-of select="jhr:highlight($hiliter, $role, string($child.content), 'UTF-8', true())"
+ xmlns:jhr="com.uwyn.jhighlight.renderer.Renderer" disable-output-escaping="yes"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="$child.content"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </pre>
+
+ </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
Added: trunk/as/docs/resources/support/lib/highlight-3.1.4.GA.jar
===================================================================
(Binary files differ)
Property changes on: trunk/as/docs/resources/support/lib/highlight-3.1.4.GA.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/guides/resources/styles/en/code-highlight.xsl
===================================================================
--- trunk/documentation/guides/resources/styles/en/code-highlight.xsl (rev 0)
+++ trunk/documentation/guides/resources/styles/en/code-highlight.xsl 2008-02-22 11:36:33 UTC (rev 6527)
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+
+<!--
+
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+ xmlns="http://www.w3.org/TR/xhtml1/transitional"
+ exclude-result-prefixes="#default"
+ xmlns:rf="java:org.richfaces.highlight.XhtmlRendererFactory"
+ >
+
+ <xsl:template match="programlisting[@role='XML']|programlisting[@role='JAVA']|programlisting[@role='XHTML']|programlisting[@role='JSP']|programlisting[@role='CSS']">
+
+ <xsl:variable name="role">
+ <xsl:value-of select="s:toUpperCase(string(@role))" xmlns:s="java:java.lang.String"/>
+ </xsl:variable>
+ <xsl:variable name="child.content">
+ <xsl:apply-templates/>
+ </xsl:variable>
+ <xsl:variable name="factory" select="rf:instance()"/>
+ <xsl:variable name="hiliter" select="rf:getRenderer($factory, string($role))"/>
+ <pre class="{$role}">
+ <xsl:choose>
+ <xsl:when test="$hiliter">
+ <xsl:value-of select="jhr:highlight($hiliter, $role, string($child.content), 'UTF-8', true())"
+ xmlns:jhr="com.uwyn.jhighlight.renderer.Renderer" disable-output-escaping="yes"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="$child.content"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </pre>
+
+ </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
Added: trunk/documentation/guides/resources/support/lib/highlight-3.1.4.GA.jar
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/guides/resources/support/lib/highlight-3.1.4.GA.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
18 years, 1 month
JBoss Tools SVN: r6526 - in trunk/common/tests/org.jboss.tools.common.model.test: META-INF and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-02-22 06:35:02 -0500 (Fri, 22 Feb 2008)
New Revision: 6526
Added:
trunk/common/tests/org.jboss.tools.common.model.test/projects/
trunk/common/tests/org.jboss.tools.common.model.test/projects/Test1/
trunk/common/tests/org.jboss.tools.common.model.test/projects/Test1/.classpath
trunk/common/tests/org.jboss.tools.common.model.test/projects/Test1/.project
trunk/common/tests/org.jboss.tools.common.model.test/projects/Test1/lib/
trunk/common/tests/org.jboss.tools.common.model.test/projects/Test1/lib/a.jar
trunk/common/tests/org.jboss.tools.common.model.test/projects/Test1/src/
trunk/common/tests/org.jboss.tools.common.model.test/projects/Test2/
trunk/common/tests/org.jboss.tools.common.model.test/projects/Test2/.classpath
trunk/common/tests/org.jboss.tools.common.model.test/projects/Test2/.project
trunk/common/tests/org.jboss.tools.common.model.test/projects/Test2/lib/
trunk/common/tests/org.jboss.tools.common.model.test/projects/Test2/lib/b.jar
trunk/common/tests/org.jboss.tools.common.model.test/projects/Test2/src/
trunk/common/tests/org.jboss.tools.common.model.test/projects/c.jar
trunk/common/tests/org.jboss.tools.common.model.test/src/org/jboss/tools/common/model/test/ClassPathTest.java
Modified:
trunk/common/tests/org.jboss.tools.common.model.test/META-INF/MANIFEST.MF
trunk/common/tests/org.jboss.tools.common.model.test/src/org/jboss/tools/common/model/test/CommonModelAllTests.java
Log:
JBIDE-1811
Modified: trunk/common/tests/org.jboss.tools.common.model.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/tests/org.jboss.tools.common.model.test/META-INF/MANIFEST.MF 2008-02-22 11:24:36 UTC (rev 6525)
+++ trunk/common/tests/org.jboss.tools.common.model.test/META-INF/MANIFEST.MF 2008-02-22 11:35:02 UTC (rev 6526)
@@ -12,5 +12,6 @@
org.eclipse.core.resources,
org.jboss.tools.common.model,
org.jboss.tools.common.test,
+ org.jboss.tools.tests,
org.jboss.tools.common.model.ui
Provide-Package: org.jboss.tools.common.model.test
Added: trunk/common/tests/org.jboss.tools.common.model.test/projects/Test1/.classpath
===================================================================
--- trunk/common/tests/org.jboss.tools.common.model.test/projects/Test1/.classpath (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.model.test/projects/Test1/.classpath 2008-02-22 11:35:02 UTC (rev 6526)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="lib" path="lib/a.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: trunk/common/tests/org.jboss.tools.common.model.test/projects/Test1/.project
===================================================================
--- trunk/common/tests/org.jboss.tools.common.model.test/projects/Test1/.project (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.model.test/projects/Test1/.project 2008-02-22 11:35:02 UTC (rev 6526)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>Test1</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: trunk/common/tests/org.jboss.tools.common.model.test/projects/Test1/lib/a.jar
===================================================================
(Binary files differ)
Property changes on: trunk/common/tests/org.jboss.tools.common.model.test/projects/Test1/lib/a.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/common/tests/org.jboss.tools.common.model.test/projects/Test2/.classpath
===================================================================
--- trunk/common/tests/org.jboss.tools.common.model.test/projects/Test2/.classpath (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.model.test/projects/Test2/.classpath 2008-02-22 11:35:02 UTC (rev 6526)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="lib" path="lib/b.jar"/>
+ <classpathentry kind="lib" path="/Test1/lib/a.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: trunk/common/tests/org.jboss.tools.common.model.test/projects/Test2/.project
===================================================================
--- trunk/common/tests/org.jboss.tools.common.model.test/projects/Test2/.project (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.model.test/projects/Test2/.project 2008-02-22 11:35:02 UTC (rev 6526)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>Test2</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: trunk/common/tests/org.jboss.tools.common.model.test/projects/Test2/lib/b.jar
===================================================================
(Binary files differ)
Property changes on: trunk/common/tests/org.jboss.tools.common.model.test/projects/Test2/lib/b.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/common/tests/org.jboss.tools.common.model.test/projects/c.jar
===================================================================
(Binary files differ)
Property changes on: trunk/common/tests/org.jboss.tools.common.model.test/projects/c.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/common/tests/org.jboss.tools.common.model.test/src/org/jboss/tools/common/model/test/ClassPathTest.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.model.test/src/org/jboss/tools/common/model/test/ClassPathTest.java (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.model.test/src/org/jboss/tools/common/model/test/ClassPathTest.java 2008-02-22 11:35:02 UTC (rev 6526)
@@ -0,0 +1,95 @@
+package org.jboss.tools.common.model.test;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.List;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.common.test.util.TestProjectProvider;
+import org.jboss.tools.test.util.xpl.EditorTestHelper;
+import org.osgi.framework.Bundle;
+
+import junit.framework.TestCase;
+
+public class ClassPathTest extends TestCase {
+ static String BUNDLE_NAME = "org.jboss.tools.common.model.test";
+ TestProjectProvider provider1 = null;
+ IProject project1 = null;
+ TestProjectProvider provider2 = null;
+ IProject project2 = null;
+
+ public ClassPathTest() {}
+
+ public void setUp() throws Exception {
+ provider1 = new TestProjectProvider(BUNDLE_NAME, null, "Test1", true);
+ project1 = provider1.getProject();
+
+ provider2 = new TestProjectProvider(BUNDLE_NAME, null, "Test2", true);
+ project2 = provider2.getProject();
+
+ project1.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+ project2.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+
+ EditorTestHelper.joinBackgroundActivities();
+
+ IJavaProject jp = JavaCore.create(project2);
+ IClasspathEntry[] es = jp.getRawClasspath();
+
+ String location = getLocation("projects/c.jar");
+ assertTrue("Cannot find file " + location, new File(location).isFile());
+
+ IPath path = new Path(location);
+ IClasspathEntry e = JavaCore.newLibraryEntry(path, null, null);
+
+ IClasspathEntry[] esn = new IClasspathEntry[es.length + 1];
+ System.arraycopy(es, 0, esn, 0, es.length);
+ esn[es.length] = e;
+
+ jp.setRawClasspath(esn, new NullProgressMonitor());
+
+ EditorTestHelper.joinBackgroundActivities();
+ }
+
+ public void testGetClassPath() throws CoreException, IOException {
+ List<String> list = EclipseResourceUtil.getClassPath(project2);
+
+ String[] testNames = {
+ "/Test2/lib/b.jar",
+ "/Test1/lib/a.jar",
+ "projects/c.jar"
+ };
+ for (int i = 0; i < testNames.length; i++) {
+ assertTrue("Cannot find classpath entry " + testNames[i], contains(list, testNames[i]));
+ }
+
+ }
+
+ private String getLocation(String relativeInBundle) throws IOException {
+ Bundle bundle = Platform.getBundle(BUNDLE_NAME);
+ URL url = FileLocator.resolve(bundle.getEntry(relativeInBundle));
+ String location = url.getFile();
+ return location;
+ }
+
+ private boolean contains(List<String> list, String name) {
+ for (String s: list) {
+ if(s.replace('\\', '/').endsWith(name.replace('\\', '/'))) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+}
Modified: trunk/common/tests/org.jboss.tools.common.model.test/src/org/jboss/tools/common/model/test/CommonModelAllTests.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.model.test/src/org/jboss/tools/common/model/test/CommonModelAllTests.java 2008-02-22 11:24:36 UTC (rev 6525)
+++ trunk/common/tests/org.jboss.tools.common.model.test/src/org/jboss/tools/common/model/test/CommonModelAllTests.java 2008-02-22 11:35:02 UTC (rev 6526)
@@ -23,6 +23,7 @@
TestSuite suite = new TestSuite();
suite.setName("All tests for " + PLUGIN_ID);
suite.addTestSuite(MetaModelTest.class);
+ suite.addTestSuite(ClassPathTest.class);
return suite;
}
}
18 years, 1 month
JBoss Tools SVN: r6525 - in trunk/hibernatetools/docs/resources: support/lib and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2008-02-22 06:24:36 -0500 (Fri, 22 Feb 2008)
New Revision: 6525
Added:
trunk/hibernatetools/docs/resources/styles/en/code-highlight.xsl
trunk/hibernatetools/docs/resources/support/lib/highlight-3.1.4.GA.jar
Log:
http://jira.jboss.com/jira/browse/JBIDE-1703
stylesheet is changed
Added: trunk/hibernatetools/docs/resources/styles/en/code-highlight.xsl
===================================================================
--- trunk/hibernatetools/docs/resources/styles/en/code-highlight.xsl (rev 0)
+++ trunk/hibernatetools/docs/resources/styles/en/code-highlight.xsl 2008-02-22 11:24:36 UTC (rev 6525)
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+
+<!--
+
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+ xmlns="http://www.w3.org/TR/xhtml1/transitional"
+ exclude-result-prefixes="#default"
+ xmlns:rf="java:org.richfaces.highlight.XhtmlRendererFactory"
+ >
+
+ <xsl:template match="programlisting[@role='XML']|programlisting[@role='JAVA']|programlisting[@role='XHTML']|programlisting[@role='JSP']|programlisting[@role='CSS']">
+
+ <xsl:variable name="role">
+ <xsl:value-of select="s:toUpperCase(string(@role))" xmlns:s="java:java.lang.String"/>
+ </xsl:variable>
+ <xsl:variable name="child.content">
+ <xsl:apply-templates/>
+ </xsl:variable>
+ <xsl:variable name="factory" select="rf:instance()"/>
+ <xsl:variable name="hiliter" select="rf:getRenderer($factory, string($role))"/>
+ <pre class="{$role}">
+ <xsl:choose>
+ <xsl:when test="$hiliter">
+ <xsl:value-of select="jhr:highlight($hiliter, $role, string($child.content), 'UTF-8', true())"
+ xmlns:jhr="com.uwyn.jhighlight.renderer.Renderer" disable-output-escaping="yes"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="$child.content"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </pre>
+
+ </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
Added: trunk/hibernatetools/docs/resources/support/lib/highlight-3.1.4.GA.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/docs/resources/support/lib/highlight-3.1.4.GA.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
18 years, 1 month
JBoss Tools SVN: r6524 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-02-22 06:10:20 -0500 (Fri, 22 Feb 2008)
New Revision: 6524
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1803
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java 2008-02-22 10:15:40 UTC (rev 6523)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java 2008-02-22 11:10:20 UTC (rev 6524)
@@ -208,6 +208,17 @@
private static final String collectionAdditionForCollectionDataModel = ".iterator().next()";
private static final String collectionAdditionForMapDataModel = ".entrySet().iterator().next()";
+ private List<String> getVarNameProposals(List <Var> vars, String prefix) {
+ List<String> proposals = new ArrayList<String>();
+ for (Var var : vars) {
+ if(var.getName().startsWith(prefix)) {
+ String proposal = var.getName().substring(prefix.length());
+ proposals.add(proposal);
+ }
+ }
+ return proposals;
+ }
+
public SeamELOperandResolveStatus resolveSeamELOperand(ISeamProject project, IFile file, String documentContent, CharSequence prefix,
int position, boolean returnEqualedVariablesOnly, List<Var> vars, ElVarSearcher varSearcher) throws BadLocationException, StringIndexOutOfBoundsException {
String oldEl = prefix.toString();
@@ -269,6 +280,9 @@
var.resolveValue("#{" + var.getElToken().getText() + suffix + "}");
}
+ if(!returnEqualedVariablesOnly && vars!=null) {
+ status.getProposals().addAll(getVarNameProposals(vars, prefix.toString()));
+ }
return status;
}
18 years, 1 month