JBoss Tools SVN: r26316 - trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/resource.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-11-06 04:28:03 -0400 (Sat, 06 Nov 2010)
New Revision: 26316
Modified:
trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/resource/ResourceFactory.java
Log:
@Override annotation removed to fix build
Modified: trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/resource/ResourceFactory.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/resource/ResourceFactory.java 2010-11-05 23:33:13 UTC (rev 26315)
+++ trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/resource/ResourceFactory.java 2010-11-06 08:28:03 UTC (rev 26316)
@@ -46,7 +46,6 @@
this.fullPath = fullPath;
}
- @Override
public Object invoke(Object proxy, Method method, Object[] args)
throws Throwable {
Object result = null;
15 years, 5 months
JBoss Tools SVN: r26315 - trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-11-05 19:33:13 -0400 (Fri, 05 Nov 2010)
New Revision: 26315
Modified:
trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ELResolverFactory1.java
trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ELResolverFactory2.java
trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ProjectNature1.java
trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ResolverProjectNature1.java
Log:
https://jira.jboss.org/browse/JBIDE-3892 Increase JUnit test's coverage up to 60%
fie compilation errors in new tests
Modified: trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ELResolverFactory1.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ELResolverFactory1.java 2010-11-05 22:57:32 UTC (rev 26314)
+++ trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ELResolverFactory1.java 2010-11-05 23:33:13 UTC (rev 26315)
@@ -7,12 +7,9 @@
public class ELResolverFactory1 implements ELResolverFactory {
public ELResolverFactory1() {
- // TODO Auto-generated constructor stub
}
- @Override
public ELResolver createResolver(IResource resource) {
- // TODO Auto-generated method stub
return new ResolverProjectNature1();
}
Modified: trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ELResolverFactory2.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ELResolverFactory2.java 2010-11-05 22:57:32 UTC (rev 26314)
+++ trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ELResolverFactory2.java 2010-11-05 23:33:13 UTC (rev 26315)
@@ -3,7 +3,6 @@
public class ELResolverFactory2 {
public ELResolverFactory2() {
- // TODO Auto-generated constructor stub
}
}
Modified: trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ProjectNature1.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ProjectNature1.java 2010-11-05 22:57:32 UTC (rev 26314)
+++ trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ProjectNature1.java 2010-11-05 23:33:13 UTC (rev 26315)
@@ -8,20 +8,16 @@
public static final String ID = "org.jboss.tools.common.el.core.test.project-nature1";
IProject prj;
- @Override
public void configure() throws CoreException {
}
- @Override
public void deconfigure() throws CoreException {
}
- @Override
public IProject getProject() {
return prj;
}
- @Override
public void setProject(IProject project) {
prj = project;
}
Modified: trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ResolverProjectNature1.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ResolverProjectNature1.java 2010-11-05 22:57:32 UTC (rev 26314)
+++ trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ResolverProjectNature1.java 2010-11-05 23:33:13 UTC (rev 26315)
@@ -17,33 +17,28 @@
// TODO Auto-generated constructor stub
}
- @Override
public List<TextProposal> getProposals(ELContext context, String el,
int offset) {
// TODO Auto-generated method stub
return null;
}
- @Override
public List<TextProposal> getProposals(ELContext context, int offset) {
// TODO Auto-generated method stub
return null;
}
- @Override
public ELResolution resolve(ELContext context, ELExpression operand,
int offset) {
// TODO Auto-generated method stub
return null;
}
- @Override
public ELParserFactory getParserFactory() {
// TODO Auto-generated method stub
return null;
}
- @Override
public IRelevanceCheck createRelevanceCheck(IJavaElement element) {
// TODO Auto-generated method stub
return null;
15 years, 5 months
JBoss Tools SVN: r26314 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-11-05 18:57:32 -0400 (Fri, 05 Nov 2010)
New Revision: 26314
Modified:
trunk/build/target-platform/build.xml
Log:
make build.xml fetch eclipse platform for mac and windows too
Modified: trunk/build/target-platform/build.xml
===================================================================
--- trunk/build/target-platform/build.xml 2010-11-05 22:35:54 UTC (rev 26313)
+++ trunk/build/target-platform/build.xml 2010-11-05 22:57:32 UTC (rev 26314)
@@ -96,37 +96,46 @@
</target>
<target name="get.arch">
+ <condition property="ext" value="tar.gz" else="zip">
+ <os family="unix" />
+ </condition>
+ <condition property="os1" value="linux-gtk" else="win32">
+ <os family="unix" />
+ </condition>
+ <condition property="os" value="macosx-cocoa" else="${os1}">
+ <os family="mac" />
+ </condition>
<if>
<os family="unix" />
<then>
- <!-- Ant thinks that ${os.arch} == i386 for ${arch}, so use `uname` instead -->
+ <!-- Ant thinks that ${os.arch} == i386 for x86_64, so use `uname` instead -->
<exec executable="bash" outputproperty="arch">
<arg line="getArch.sh" />
</exec>
</then>
<else>
- <echo level="error">This script is only tested to work on Linux 32- and 64-bit Hudson slaves.</echo>
- <condition property="arch" value="${arch}" else="">
+ <condition property="arch" value="x86_64" else="">
<os arch="amd64" />
</condition>
</else>
</if>
</target>
- <!-- TODO: make this work on Mac and Windows? Currently only meant to work with linux 32- and 64-bit slaves -->
+ <!-- should work on osx-cocoa32, win32, lin32, lin64 -->
<target name="get.eclipse">
<!-- NOTE: must use same platform (50M) or SDK (103M - 168M) version as feature version on target platform, or will get install/update conflicts -->
<property name="eclipse.version" value="3.6.1" />
<property name="eclipse.version" value="M20101013-0800" />
<property name="eclipse.URL" value="http://www.eclipse.org/downloads/download.php?r=1&file=/eclipse/downl..." />
<property name="eclipse.URL" value="http://www.eclipse.org/downloads/download.php?r=1&file=/eclipse/downl..." />
+
<if>
<equals arg1="${arch}" arg2="x86" />
<then>
- <property name="eclipse.file" value="eclipse-platform-${eclipse.version}-linux-gtk.tar.gz" />
+ <property name="eclipse.file" value="eclipse-platform-${eclipse.version}-${os}.${ext}" />
</then>
<else>
- <property name="eclipse.file" value="eclipse-platform-${eclipse.version}-linux-gtk-${arch}.tar.gz" />
+ <property name="eclipse.file" value="eclipse-platform-${eclipse.version}-${os}-${arch}.${ext}" />
</else>
</if>
15 years, 5 months
JBoss Tools SVN: r26313 - in trunk: common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-11-05 18:35:54 -0400 (Fri, 05 Nov 2010)
New Revision: 26313
Added:
trunk/common/tests/org.jboss.tools.common.el.core.test/plugin.xml
trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/
trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ELResolverFactory1.java
trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ELResolverFactory2.java
trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ELResolverFactoryManagerTest.java
trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ElVarSearcherTest.java
trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ProjectNature1.java
trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ResolverProjectNature1.java
trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ResolverProjectNature2.java
trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/resource/
trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/resource/ResourceFactory.java
Modified:
trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/CommonELAllTests.java
trunk/tests/plugins/org.jboss.tools.tests/META-INF/MANIFEST.MF
trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/util/ResourcesUtils.java
Log:
https://jira.jboss.org/browse/JBIDE-3892 Increase JUnit test's coverage up to 60%
Tests are added for classes in org.jboss.tools.common.el.core.resolver package
Added: trunk/common/tests/org.jboss.tools.common.el.core.test/plugin.xml
===================================================================
--- trunk/common/tests/org.jboss.tools.common.el.core.test/plugin.xml (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.el.core.test/plugin.xml 2010-11-05 22:35:54 UTC (rev 26313)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.jboss.tools.common.el.core.elResolver">
+ <el-resolver>
+ <factory
+ class="org.jboss.tools.common.el.core.test.resolver.ELResolverFactory1"></factory>
+ <project-nature
+ id="org.jboss.tools.common.el.core.test.project-nature1"
+ resolver-class="org.jboss.tools.common.el.core.test.resolver.ResolverProjectNature1">
+ </project-nature>
+ <project-nature
+ id="org.jboss.tools.common.el.core.test.project-nature1"
+ resolver-class="org.jboss.tools.common.el.core.test.resolver.ResolverProjectNature2">
+ </project-nature>
+ <factory
+ class="org.jboss.tools.common.el.core.test.resolver.ELResolverFactory2">
+ </factory>
+ </el-resolver>
+ </extension>
+ <extension
+ id="project-nature1"
+ point="org.eclipse.core.resources.natures">
+ <runtime>
+ <run
+ class="org.jboss.tools.common.el.core.test.resolver.ProjectNature1">
+ </run>
+ </runtime>
+ </extension>
+
+</plugin>
Property changes on: trunk/common/tests/org.jboss.tools.common.el.core.test/plugin.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/CommonELAllTests.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/CommonELAllTests.java 2010-11-05 22:20:39 UTC (rev 26312)
+++ trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/CommonELAllTests.java 2010-11-05 22:35:54 UTC (rev 26313)
@@ -10,6 +10,9 @@
******************************************************************************/
package org.jboss.tools.common.el.core.test;
+import org.jboss.tools.common.el.core.resolver.ELResolverFactoryManager;
+import org.jboss.tools.common.el.core.test.resolver.ELResolverFactoryManagerTest;
+import org.jboss.tools.common.el.core.test.resolver.ElVarSearcherTest;
import org.jboss.tools.test.util.ProjectImportTestSetup;
import junit.framework.Test;
@@ -27,6 +30,8 @@
suite.addTestSuite(ELParserTest.class);
suite.addTestSuite(ELModelTest.class);
suite.addTestSuite(RelevanceCheckTest.class);
+ suite.addTestSuite(ElVarSearcherTest.class);
+ suite.addTestSuite(ELResolverFactoryManagerTest.class);
return suite;
}
}
Added: trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ELResolverFactory1.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ELResolverFactory1.java (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ELResolverFactory1.java 2010-11-05 22:35:54 UTC (rev 26313)
@@ -0,0 +1,19 @@
+package org.jboss.tools.common.el.core.test.resolver;
+
+import org.eclipse.core.resources.IResource;
+import org.jboss.tools.common.el.core.resolver.ELResolver;
+import org.jboss.tools.common.el.core.resolver.ELResolverFactory;
+
+public class ELResolverFactory1 implements ELResolverFactory {
+
+ public ELResolverFactory1() {
+ // TODO Auto-generated constructor stub
+ }
+
+ @Override
+ public ELResolver createResolver(IResource resource) {
+ // TODO Auto-generated method stub
+ return new ResolverProjectNature1();
+ }
+
+}
Property changes on: trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ELResolverFactory1.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ELResolverFactory2.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ELResolverFactory2.java (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ELResolverFactory2.java 2010-11-05 22:35:54 UTC (rev 26313)
@@ -0,0 +1,9 @@
+package org.jboss.tools.common.el.core.test.resolver;
+
+public class ELResolverFactory2 {
+
+ public ELResolverFactory2() {
+ // TODO Auto-generated constructor stub
+ }
+
+}
Property changes on: trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ELResolverFactory2.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ELResolverFactoryManagerTest.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ELResolverFactoryManagerTest.java (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ELResolverFactoryManagerTest.java 2010-11-05 22:35:54 UTC (rev 26313)
@@ -0,0 +1,34 @@
+package org.jboss.tools.common.el.core.test.resolver;
+
+import java.io.IOException;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.runtime.CoreException;
+import org.jboss.tools.common.el.core.resolver.ELResolver;
+import org.jboss.tools.common.el.core.resolver.ELResolverFactoryManager;
+import org.jboss.tools.test.resource.ResourceFactory;
+import org.junit.Test;
+
+public class ELResolverFactoryManagerTest extends TestCase{
+
+ public void testGetInstance() {
+ assertNotNull(ELResolverFactoryManager.getInstance());
+ }
+
+ public void testGetResolvers() throws CoreException, IOException {
+ assertNotNull(ELResolverFactoryManager.getInstance().getResolvers(ResourceFactory.createFile("test")));
+ assertTrue(ELResolverFactoryManager.getInstance().getResolvers(ResourceFactory.createFile("test")).length==0);
+
+ String fileContent = "<html><body var=\"test1\" value=\"#{value1}\"><p var=\"test2\" value=\"#{value2}\"/></body></html>";
+ IFile file = ResourceFactory.createFile(fileContent,"Test1","test1.xml");
+ IProjectDescription descr = file.getProject().getDescription();
+ descr.setNatureIds(new String[] {ProjectNature1.ID});
+ file.getProject().setDescription(descr, null);
+ ELResolver[] resolvers = ELResolverFactoryManager.getInstance().getResolvers(file);
+ assertTrue("Expected 2 relovers to be loaded because of other two don't implement appropriate interfaces",resolvers.length==2);
+ }
+
+}
Property changes on: trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ELResolverFactoryManagerTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ElVarSearcherTest.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ElVarSearcherTest.java (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ElVarSearcherTest.java 2010-11-05 22:35:54 UTC (rev 26313)
@@ -0,0 +1,72 @@
+package org.jboss.tools.common.el.core.test.resolver;
+
+import java.io.IOException;
+import java.util.Collections;
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jface.text.BadLocationException;
+import org.jboss.tools.common.el.core.model.ELExpression;
+import org.jboss.tools.common.el.core.parser.ELParserFactory;
+import org.jboss.tools.common.el.core.parser.ELParserUtil;
+import org.jboss.tools.common.el.core.resolver.ELCompletionEngine;
+import org.jboss.tools.common.el.core.resolver.ELContext;
+import org.jboss.tools.common.el.core.resolver.ELResolution;
+import org.jboss.tools.common.el.core.resolver.ELResolutionImpl;
+import org.jboss.tools.common.el.core.resolver.ElVarSearcher;
+import org.jboss.tools.common.el.core.resolver.IRelevanceCheck;
+import org.jboss.tools.common.el.core.resolver.Var;
+import org.jboss.tools.common.text.TextProposal;
+import org.jboss.tools.test.resource.ResourceFactory;
+
+public class ElVarSearcherTest extends TestCase{
+
+ public void testSetFile() {
+ ELCompletionEngine fakeEngine = new FakeELCompletionEngine();
+ IFile file = ResourceFactory.createFile("${test}");
+ ElVarSearcher varSearcher = new ElVarSearcher(null,fakeEngine);
+ varSearcher.setFile(file);
+ }
+
+ public void testFindAllVarsIFileInt() throws CoreException, IOException {
+ ELCompletionEngine fakeEngine = new FakeELCompletionEngine();
+ String fileContent = "<html><body var=\"test1\" value=\"#{value1}\"><p var=\"test2\" value=\"#{value2}\"/></body></html>";
+ IFile file = ResourceFactory.createFile(fileContent,"Test1","test.xml");
+ ElVarSearcher varSearcher = new ElVarSearcher(file,fakeEngine);
+ List<Var> vars = varSearcher.findAllVars(file,fileContent.indexOf("#{value2}"));
+ assertTrue(vars.size()==2);
+ }
+
+ private static class FakeELCompletionEngine implements ELCompletionEngine {
+ public ELResolution resolveELOperand(IFile file,
+ ELExpression operand, boolean returnEqualedVariablesOnly,
+ List<Var> vars, ElVarSearcher varSearcher)
+ throws BadLocationException, StringIndexOutOfBoundsException {
+ return new ELResolutionImpl(operand);
+ }
+
+ public ELParserFactory getParserFactory() {
+ return ELParserUtil.getJbossFactory();
+ }
+
+ public List<TextProposal> getProposals(ELContext context, String el, int offset) {
+ return Collections.emptyList();
+ }
+
+ public ELResolution resolve(ELContext context, ELExpression operand, int offset) {
+ return new ELResolutionImpl(operand);
+ }
+
+ public List<TextProposal> getProposals(ELContext context, int offset) {
+ return Collections.emptyList();
+ }
+
+ public IRelevanceCheck createRelevanceCheck(IJavaElement element) {
+ return null;
+ }
+ }
+}
Property changes on: trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ElVarSearcherTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ProjectNature1.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ProjectNature1.java (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ProjectNature1.java 2010-11-05 22:35:54 UTC (rev 26313)
@@ -0,0 +1,29 @@
+package org.jboss.tools.common.el.core.test.resolver;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectNature;
+import org.eclipse.core.runtime.CoreException;
+
+public class ProjectNature1 implements IProjectNature {
+ public static final String ID = "org.jboss.tools.common.el.core.test.project-nature1";
+ IProject prj;
+
+ @Override
+ public void configure() throws CoreException {
+ }
+
+ @Override
+ public void deconfigure() throws CoreException {
+ }
+
+ @Override
+ public IProject getProject() {
+ return prj;
+ }
+
+ @Override
+ public void setProject(IProject project) {
+ prj = project;
+ }
+
+}
Property changes on: trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ProjectNature1.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ResolverProjectNature1.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ResolverProjectNature1.java (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ResolverProjectNature1.java 2010-11-05 22:35:54 UTC (rev 26313)
@@ -0,0 +1,52 @@
+package org.jboss.tools.common.el.core.test.resolver;
+import java.util.List;
+
+import org.eclipse.jdt.core.IJavaElement;
+import org.jboss.tools.common.el.core.model.ELExpression;
+import org.jboss.tools.common.el.core.parser.ELParserFactory;
+import org.jboss.tools.common.el.core.resolver.ELContext;
+import org.jboss.tools.common.el.core.resolver.ELResolution;
+import org.jboss.tools.common.el.core.resolver.ELResolver;
+import org.jboss.tools.common.el.core.resolver.IRelevanceCheck;
+import org.jboss.tools.common.text.TextProposal;
+
+
+public class ResolverProjectNature1 implements ELResolver {
+
+ public ResolverProjectNature1() {
+ // TODO Auto-generated constructor stub
+ }
+
+ @Override
+ public List<TextProposal> getProposals(ELContext context, String el,
+ int offset) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public List<TextProposal> getProposals(ELContext context, int offset) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public ELResolution resolve(ELContext context, ELExpression operand,
+ int offset) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public ELParserFactory getParserFactory() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public IRelevanceCheck createRelevanceCheck(IJavaElement element) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Property changes on: trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ResolverProjectNature1.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ResolverProjectNature2.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ResolverProjectNature2.java (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ResolverProjectNature2.java 2010-11-05 22:35:54 UTC (rev 26313)
@@ -0,0 +1,8 @@
+package org.jboss.tools.common.el.core.test.resolver;
+
+public class ResolverProjectNature2 {
+
+ public ResolverProjectNature2() {
+ }
+
+}
Property changes on: trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/resolver/ResolverProjectNature2.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/tests/plugins/org.jboss.tools.tests/META-INF/MANIFEST.MF
===================================================================
--- trunk/tests/plugins/org.jboss.tools.tests/META-INF/MANIFEST.MF 2010-11-05 22:20:39 UTC (rev 26312)
+++ trunk/tests/plugins/org.jboss.tools.tests/META-INF/MANIFEST.MF 2010-11-05 22:35:54 UTC (rev 26313)
@@ -11,9 +11,11 @@
org.eclipse.ui.ide,
org.apache.xerces;bundle-version="[2.9.0,3.0.0)",
org.eclipse.ltk.core.refactoring;bundle-version="3.5.0",
- org.eclipse.text;bundle-version="3.5.0"
+ org.eclipse.text;bundle-version="3.5.0",
+ org.eclipse.ui.ide.application;bundle-version="1.0.200"
Bundle-ActivationPolicy: lazy
-Export-Package: org.jboss.tools.test.util,
+Export-Package: org.jboss.tools.test.resource,
+ org.jboss.tools.test.util,
org.jboss.tools.test.util.xpl,
org.jboss.tools.tests
Bundle-ClassPath: .
Added: trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/resource/ResourceFactory.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/resource/ResourceFactory.java (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/resource/ResourceFactory.java 2010-11-05 22:35:54 UTC (rev 26313)
@@ -0,0 +1,65 @@
+package org.jboss.tools.test.resource;
+
+import java.io.IOException;
+import java.io.StringBufferInputStream;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.jboss.tools.test.util.ResourcesUtils;
+
+public class ResourceFactory {
+
+ static public final IFile createFile(String content) {
+ Object proxy = Proxy.newProxyInstance(IFile.class.getClassLoader(), new Class<?> [] {IFile.class}, new FileInvocationHandler(content));
+ return (IFile)proxy;
+ }
+
+ static public final IFile createFile(String content, IPath fullPath) {
+ Object proxy = Proxy.newProxyInstance(IFile.class.getClassLoader(), new Class<?> [] {IFile.class}, new FileInvocationHandler(content,fullPath));
+ return (IFile)proxy;
+ }
+
+ static public final IFile createFile(String content, String project, String fileName) throws CoreException, IOException {
+ IProject prj = ResourcesUtils.createEclipseProject("Test");
+ IFile result = prj.getFile(fileName);
+ result.create(new StringBufferInputStream(content), true, null);
+ return result;
+ }
+
+ public static class FileInvocationHandler implements InvocationHandler {
+
+ private String content;
+ private IPath fullPath;
+
+ public FileInvocationHandler(String content) {
+ super();
+ this.content = content;
+ }
+
+ public FileInvocationHandler(String content,IPath fullPath) {
+ this(content);
+ this.fullPath = fullPath;
+ }
+
+ @Override
+ public Object invoke(Object proxy, Method method, Object[] args)
+ throws Throwable {
+ Object result = null;
+ if(method.equals(IFile.class.getMethod("getContents"))) {
+ result = new StringBufferInputStream(content);
+ } else if(method.equals(IFile.class.getMethod("exists"))) {
+ result = Boolean.TRUE;
+ } else if(method.equals(IFile.class.getMethod("getFullPath"))){
+ result = fullPath;
+ }
+ return result;
+ }
+
+
+ }
+}
Property changes on: trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/resource/ResourceFactory.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/util/ResourcesUtils.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/util/ResourcesUtils.java 2010-11-05 22:20:39 UTC (rev 26312)
+++ trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/util/ResourcesUtils.java 2010-11-05 22:35:54 UTC (rev 26313)
@@ -15,7 +15,9 @@
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.LineNumberReader;
+import java.io.StringBufferInputStream;
import java.lang.reflect.InvocationTargetException;
+import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -111,6 +113,21 @@
return project;
}
+ public static IProject createEclipseProject(String name)
+ throws CoreException, IOException {
+ String descriptionText = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><projectDescription><name>{0}</name></projectDescription>";
+ IProjectDescription descr = ResourcesPlugin.getWorkspace().loadProjectDescription(new StringBufferInputStream(MessageFormat.format(descriptionText,name)));
+ descr.setLocation(null);
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(
+ descr.getName());
+ NullProgressMonitor nullProgress = new NullProgressMonitor();
+ if(!project.exists()) {
+ project.create(descr, nullProgress);
+ }
+ project.open(IResource.BACKGROUND_REFRESH, nullProgress);
+ return project;
+ }
+
public static IProject createEclipseProject(Bundle bundle,
String templateLocation)
throws CoreException, IOException {
15 years, 5 months
JBoss Tools SVN: r26312 - trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-11-05 18:20:39 -0400 (Fri, 05 Nov 2010)
New Revision: 26312
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ElVarSearcher.java
Log:
Code cleanup for ElVarSearcher class
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ElVarSearcher.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ElVarSearcher.java 2010-11-05 22:17:43 UTC (rev 26311)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ElVarSearcher.java 2010-11-05 22:20:39 UTC (rev 26312)
@@ -111,36 +111,32 @@
*/
public static IndexedRegion getNodeAt(IFile file, int documentOffset) {
-
- if (file == null)
- return null;
-
IndexedRegion node = null;
- IModelManager mm = StructuredModelManager.getModelManager();
- IStructuredModel model = null;
- if (mm != null) {
- try {
- model = mm.getModelForRead(file);
- } catch (IOException e) {
- ELCorePlugin.getDefault().logError(e);
- return null;
- } catch (CoreException e) {
- ELCorePlugin.getDefault().logError(e);
- return null;
- }
- }
- try {
- if (model != null) {
- int lastOffset = documentOffset;
- node = model.getIndexedRegion(documentOffset);
- while (node == null && lastOffset >= 0) {
- lastOffset--;
- node = model.getIndexedRegion(lastOffset);
+ if (file != null) {
+ IModelManager mm = StructuredModelManager.getModelManager();
+ IStructuredModel model = null;
+ if (mm != null) {
+ try {
+ model = mm.getModelForRead(file);
+ if (model != null) {
+ int lastOffset = documentOffset;
+ node = model.getIndexedRegion(documentOffset);
+ while (node == null && lastOffset >= 0) {
+ lastOffset--;
+ node = model.getIndexedRegion(lastOffset);
+ }
+ }
+ } catch (IOException e) {
+ ELCorePlugin.getDefault().logError(e);
+ node = null;
+ } catch (CoreException e) {
+ ELCorePlugin.getDefault().logError(e);
+ node = null;
+ } finally {
+ if (model != null)
+ model.releaseFromRead();
}
}
- } finally {
- if (model != null)
- model.releaseFromRead();
}
return node;
}
15 years, 5 months
JBoss Tools SVN: r26311 - trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-11-05 18:17:43 -0400 (Fri, 05 Nov 2010)
New Revision: 26311
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELResolverFactoryManager.java
Log:
catch (InvalidRegistryObjectException e) block removed from ELResolverFactoryManager:
1. It is runtime exception
2. natures[k].createExecutableExtension("resolver-class"); is actually has catch block for this exception which converts InvalidRegistryObjectException into CoreException
so catch for CoreException is enough here
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELResolverFactoryManager.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELResolverFactoryManager.java 2010-11-05 18:11:36 UTC (rev 26310)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELResolverFactoryManager.java 2010-11-05 22:17:43 UTC (rev 26311)
@@ -61,7 +61,7 @@
// return result;
// }
Set<ELResolver> resolverSet = new HashSet<ELResolver>();
- IExtensionRegistry registry = Platform.getExtensionRegistry();
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
IExtensionPoint extensionPoint = registry.getExtensionPoint("org.jboss.tools.common.el.core.elResolver"); //$NON-NLS-1$
IExtension[] extensions = extensionPoint.getExtensions();
for (int i=0; i<extensions.length; i++) {
@@ -80,8 +80,6 @@
ELCorePlugin.getPluginLog().logError(resolver.getClass().getName() + " must be instance of org.jboss.tools.common.el.core.resolver.ELResolver"); //$NON-NLS-1$
}
}
- } catch (InvalidRegistryObjectException e) {
- ELCorePlugin.getPluginLog().logError(e);
} catch (CoreException e) {
ELCorePlugin.getPluginLog().logError(e);
}
@@ -107,6 +105,6 @@
// result = resolverSet.toArray(new ELResolver[resolverSet.size()]);
// resolvers.put(project.getName(), result);
// return result;
- return resolverSet.toArray(new ELResolver[0]);
+ return resolverSet.toArray(new ELResolver[resolverSet.size()]);
}
}
\ No newline at end of file
15 years, 5 months
JBoss Tools SVN: r26310 - in trunk/jsf: tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2010-11-05 14:11:36 -0400 (Fri, 05 Nov 2010)
New Revision: 26310
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/accordion.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/accordion.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/accordionItem.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/accordionItem.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/collapsiblePanel.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/collapsiblePanel.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/itemChangeListener.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/popupPanel.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/togglePanelItem.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/togglePanelItem.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/toolBarSeparator.xhtml
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelBarTemplate.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java
Log:
https://jira.jboss.org/browse/JBIDE-7451 , JUnits were added, small code adjustment.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelBarTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelBarTemplate.java 2010-11-05 17:45:07 UTC (rev 26309)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelBarTemplate.java 2010-11-05 18:11:36 UTC (rev 26310)
@@ -36,6 +36,7 @@
VpeTemplate {
private static final String PERCENT_100 = "100%"; //$NON-NLS-1$
private static final String PANEL_BAR_ITEM = ":panelBarItem"; //$NON-NLS-1$
+ private static final String ACCORDION_BAR_ITEM = ":accordionItem"; //$NON-NLS-1$
private static final String DR_PNLBAR_RICH_PANELBAR_DR_PNLBAR_B = "dr-pnlbar rich-panelbar dr-pnlbar-b"; //$NON-NLS-1$
private static final String PANEL_BAR_PANEL_BAR_CSS = "panelBar/panelBar.css"; //$NON-NLS-1$
private static Map<Node, String> toggleMap = new HashMap<Node, String>();
@@ -85,7 +86,8 @@
for (Node child : children) {
boolean active = (i == activeId);
- if (child.getNodeName().endsWith(PANEL_BAR_ITEM)) {
+ if (child.getNodeName().endsWith(PANEL_BAR_ITEM)
+ || child.getNodeName().endsWith(ACCORDION_BAR_ITEM)) {
RichFacesPanelItemTemplate.encode(creationData, pageContext, (Element) child,
visualDocument, table, active,
ComponentUtil.getAttribute(sourceElement, RichFaces.ATTR_STYLE_CLASS),
@@ -214,7 +216,8 @@
int count = 0;
for (Node child : children) {
- if (child.getNodeName().endsWith(PANEL_BAR_ITEM)) {
+ if (child.getNodeName().endsWith(PANEL_BAR_ITEM)
+ || child.getNodeName().endsWith(ACCORDION_BAR_ITEM)) {
count++;
}
}
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/accordion.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/accordion.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/accordion.xhtml 2010-11-05 18:11:36 UTC (rev 26310)
@@ -0,0 +1,22 @@
+<!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"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+<head>
+</head>
+
+<body>
+ <rich:accordion id="accordion" height="50" width="500">
+ <rich:accordionItem label="Panel bar item 1">
+ Test panel bar item component 1
+ </rich:accordionItem>
+ <rich:accordionItem label="Panel bar item 2">
+ Test panel bar item component 2
+ </rich:accordionItem>
+ </rich:accordion>
+</body>
+</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/accordion.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/accordion.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/accordion.xhtml.xml 2010-11-05 18:11:36 UTC (rev 26310)
@@ -0,0 +1,31 @@
+<tests>
+ <test id="accordion">
+ <DIV>
+ <TABLE CLASS="dr-pnlbar rich-panelbar dr-pnlbar-b" STYLE="padding: 0px; height: 50px; width: 500px;">
+ <DIV CLASS="dr-pnlbar rich-panelbar dr-pnlbar-ext" STYLE=""
+ VPE-USER-TOGGLE-ID="0">
+ <DIV CLASS="dr-pnlbar-h rich-panelbar-header" STYLE=""
+ VPE-USER-TOGGLE-ID="0"> Panel bar item 1</DIV>
+ </DIV>
+ <TR HEIGHT="100%" WIDTH="100%">
+ <TD>
+ <TABLE WIDTH="100%" HEIGHT="100%" CELLPADDING="0">
+ <TBODY>
+ <TR>
+ <TD CLASS="dr-pnlbar-c rich-panelbar-content" STYLE="">
+ <SPAN> Test panel bar item component 1</SPAN>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </TD>
+ </TR>
+ <DIV CLASS="dr-pnlbar rich-panelbar dr-pnlbar-ext" STYLE=""
+ VPE-USER-TOGGLE-ID="1">
+ <DIV CLASS="dr-pnlbar-h rich-panelbar-header" STYLE=""
+ VPE-USER-TOGGLE-ID="1"> Panel bar item 2</DIV>
+ </DIV>
+ </TABLE>
+ </DIV>
+ </test>
+</tests>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/accordionItem.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/accordionItem.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/accordionItem.xhtml 2010-11-05 18:11:36 UTC (rev 26310)
@@ -0,0 +1,22 @@
+<!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"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+<head>
+</head>
+
+<body>
+ <rich:accordion height="50" width="500">
+ <rich:accordionItem id="accordionItem" label="Panel bar item 1">
+ Test panel bar item component 1
+ </rich:accordionItem>
+ <rich:accordionItem label="Panel bar item 2">
+ Test panel bar item component 2
+ </rich:accordionItem>
+ </rich:accordion>
+</body>
+</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/accordionItem.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/accordionItem.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/accordionItem.xhtml.xml 2010-11-05 18:11:36 UTC (rev 26310)
@@ -0,0 +1,9 @@
+<tests>
+ <test id="accordionItem">
+ <DIV CLASS="dr-pnlbar rich-panelbar dr-pnlbar-ext" STYLE=""
+ VPE-USER-TOGGLE-ID="0">
+ <DIV CLASS="dr-pnlbar-h rich-panelbar-header" STYLE=""
+ VPE-USER-TOGGLE-ID="0"> Panel bar item 1</DIV>
+ </DIV>
+ </test>
+</tests>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/collapsiblePanel.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/collapsiblePanel.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/collapsiblePanel.xhtml 2010-11-05 18:11:36 UTC (rev 26310)
@@ -0,0 +1,22 @@
+<!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"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+<head>
+</head>
+
+<body>
+<f:view>
+ <rich:panel id="panel">
+ <f:facet name="header">
+ Panel Header
+ </f:facet>
+ Panel Content
+ </rich:panel>
+</f:view>
+</body>
+</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/collapsiblePanel.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/collapsiblePanel.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/collapsiblePanel.xhtml.xml 2010-11-05 18:11:36 UTC (rev 26310)
@@ -0,0 +1,17 @@
+<tests>
+ <test id="panel">
+ <DIV CLASS="dr-pnl rich-panel ">
+ <DIV VPE-FACET="header" CLASS="dr-pnl-h rich-panel-header "
+ STYLE="display: none;">
+ </DIV>
+ <DIV CLASS="dr-pnl-b rich-panel-body ">
+ <SPAN CLASS="vpe-text">
+ Panel Header
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ Panel Content
+ </SPAN>
+ </DIV>
+ </DIV>
+ </test>
+</tests>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/itemChangeListener.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/itemChangeListener.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/itemChangeListener.xhtml 2010-11-05 18:11:36 UTC (rev 26310)
@@ -0,0 +1,29 @@
+<!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"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+<head>
+</head>
+
+<body>
+<f:view>
+ <rich:tree switchType="client" style="width:300px"
+ value="#{library.data}" var="item" nodeFace="#{item.type}">
+ <rich:itemChangeListener id="itemChangeListener" binding="demo.ListenerBean" />
+ <rich:treeNode type="artist">
+ <h:outputText value="#{item.name}" />
+ </rich:treeNode>
+ <rich:treeNode type="album">
+ <h:outputText value="#{item.title}" />
+ </rich:treeNode>
+ <rich:treeNode type="song">
+ <h:outputText value="#{item.title}" />
+ </rich:treeNode>
+ </rich:tree>
+</f:view>
+</body>
+</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/popupPanel.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/popupPanel.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/popupPanel.xhtml 2010-11-05 18:11:36 UTC (rev 26310)
@@ -0,0 +1,17 @@
+<!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"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+<head>
+</head>
+<body>
+<f:view>
+ <rich:popupPanel id="popupPanel">
+ </rich:popupPanel>
+</f:view>
+</body>
+</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/togglePanelItem.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/togglePanelItem.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/togglePanelItem.xhtml 2010-11-05 18:11:36 UTC (rev 26310)
@@ -0,0 +1,24 @@
+<!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"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+<head>
+</head>
+<body>
+<f:view>
+ <rich:togglePanel>
+ <rich:togglePanelItem id="togglePanelItem">
+ abcdef
+ <div>
+ 111111111111
+ </div>
+ <h:outputText value="2222222222222" />
+ </rich:togglePanelItem>
+ </rich:togglePanel>
+</f:view>
+</body>
+</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/togglePanelItem.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/togglePanelItem.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/togglePanelItem.xhtml.xml 2010-11-05 18:11:36 UTC (rev 26310)
@@ -0,0 +1,17 @@
+<tests>
+ <test id="togglePanelItem">
+<DIV>
+<SPAN CLASS="vpe-text">
+abcdef
+</SPAN>
+<DIV STYLE="-moz-user-modify: read-write;">
+<SPAN CLASS="vpe-text">
+111111111111
+</SPAN>
+</DIV>
+<SPAN CLASS="vpe-text">
+2222222222222
+</SPAN>
+</DIV>
+ </test>
+</tests>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/toolBarSeparator.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/toolBarSeparator.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/toolBarSeparator.xhtml 2010-11-05 18:11:36 UTC (rev 26310)
@@ -0,0 +1,23 @@
+<!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"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+<head>
+</head>
+
+<body>
+<f:view>
+<rich:toolBar>
+ <rich:toolBarGroup>
+ <h:graphicImage id="edit" value="images/img12.gif" style="width : 16px; height : 14px;"/>
+ <h:outputLabel value="Edit" for="edit" />
+ </rich:toolBarGroup>
+ <rich:toolBarSeparator id="toolBarSeparator"/>
+</rich:toolBar>
+</f:view>
+</body>
+</html>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java 2010-11-05 17:45:07 UTC (rev 26309)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java 2010-11-05 18:11:36 UTC (rev 26310)
@@ -389,6 +389,30 @@
performContentTest("components/select.xhtml");//$NON-NLS-1$
}
+ public void testCollapsiblePanel() throws Throwable {
+ performContentTest("components/collapsiblePanel.xhtml");//$NON-NLS-1$
+ }
+
+ public void testToolBarSeparator() throws Throwable {
+ performInvisibleTagTest("components/toolBarSeparator.xhtml", "toolBarSeparator"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ public void testChangeExpandListener() throws Throwable {
+ performInvisibleTagTest("components/changeExpandListener.xhtml", "changeExpandListener"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ public void testPopupPanel() throws Throwable {
+ performInvisibleTagTest("components/popupPanel.xhtml", "popupPanel"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ public void testAccordion() throws Throwable {
+ performContentTest("components/accordion.xhtml");//$NON-NLS-1$
+ }
+
+ public void testTogglePanelItem() throws Throwable {
+ performContentTest("components/togglePanelItem.xhtml");//$NON-NLS-1$
+ }
+
@Override
protected String getTestProjectName() {
return RichFacesAllTests.IMPORT_PROJECT_NAME;
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java 2010-11-05 17:45:07 UTC (rev 26309)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java 2010-11-05 18:11:36 UTC (rev 26310)
@@ -28,12 +28,12 @@
setCheckWarning(false);
}
+
public void testAllComponentsOnSinglePage() throws PartInitException,
Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
"components/richFacesTest.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
-
public void testCalendar() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
"components/calendar.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
@@ -218,4 +218,19 @@
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
"components/subTable.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
+
+ public void collapsiblePanel() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/collapsiblePanel.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ }
+
+ public void testAccordion() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/accordion.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ }
+
+ public void testAccordionItem() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/accordionItem.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ }
}
15 years, 5 months
JBoss Tools SVN: r26309 - in trunk/smooks/plugins: org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/util and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: tfennelly
Date: 2010-11-05 13:45:07 -0400 (Fri, 05 Nov 2010)
New Revision: 26309
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/TemplateBuilder.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/util/FreeMarkerUtil.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/model/AbstractSmooksGraphicalModel.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/tree/model/TreeNodeConnection.java
Log:
https://jira.jboss.org/browse/JBIDE-7445
Java Source to target (templating) configs not reopening properly
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/TemplateBuilder.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/TemplateBuilder.java 2010-11-05 17:11:37 UTC (rev 26308)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/TemplateBuilder.java 2010-11-05 17:45:07 UTC (rev 26309)
@@ -442,7 +442,7 @@
* @return The fully resolved path.
*/
public String resolveMappingSrcPath(Mapping mapping) {
- String[] srcPathTokens = mapping.getSrcPath().split("\\.");
+ String[] srcPathTokens = mapping.getSrcPath().split("/");
if(srcPathTokens.length > 1) {
CollectionMapping parentCollection = findParentCollection(srcPathTokens[0], mapping);
@@ -451,7 +451,7 @@
pathBuilder.append(resolveMappingSrcPath(parentCollection));
for(int i = 1; i < srcPathTokens.length; i++) {
- pathBuilder.append('.');
+ pathBuilder.append('/');
pathBuilder.append(srcPathTokens[i]);
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/util/FreeMarkerUtil.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/util/FreeMarkerUtil.java 2010-11-05 17:11:37 UTC (rev 26308)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/util/FreeMarkerUtil.java 2010-11-05 17:45:07 UTC (rev 26309)
@@ -121,8 +121,12 @@
public static String toPath(String srcPath, boolean nodeModelSource) {
if(nodeModelSource) {
StringBuilder builder = new StringBuilder();
- String[] tokens = srcPath.split("\\.");
+ if(srcPath.startsWith("/") && srcPath.length() > 0) {
+ srcPath = srcPath.substring(1);
+ }
+
+ String[] tokens = srcPath.split("/");
builder.append(".vars[\"").append(tokens[0]).append("\"]");
if(tokens.length > 1) {
builder.append("[\"");
@@ -145,7 +149,7 @@
public static String normalizePath(String srcPath) {
Matcher matcher = varsPattern.matcher(srcPath);
if(matcher.matches()) {
- return matcher.group(1) + "." + matcher.group(2).replace('/', '.');
+ return matcher.group(1) + "/" + matcher.group(2);
} else {
return srcPath;
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/model/AbstractSmooksGraphicalModel.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/model/AbstractSmooksGraphicalModel.java 2010-11-05 17:11:37 UTC (rev 26308)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/model/AbstractSmooksGraphicalModel.java 2010-11-05 17:45:07 UTC (rev 26309)
@@ -26,6 +26,7 @@
import org.jboss.tools.smooks.gef.tree.model.TreeNodeConnection;
import org.jboss.tools.smooks.gef.tree.model.TreeNodeModel;
import org.jboss.tools.smooks.graphical.editors.model.IValidatableModel;
+import org.jboss.tools.smooks.graphical.editors.model.InputDataTreeNodeModel;
import org.w3c.dom.Node;
/**
@@ -413,7 +414,7 @@
}
public TreeNodeModel getModelNode(String srcPath) {
- String[] pathTokens = srcPath.split("\\.");
+ String[] pathTokens = srcPath.split("/");
if(pathTokens.length > 0) {
return getModeNode(pathTokens, 0);
@@ -485,8 +486,7 @@
TagObject tagObj = (TagObject) childData;
if(tagObj.getName().equals(nodeName)) {
isMatch = true;
- }
-
+ }
}
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/tree/model/TreeNodeConnection.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/tree/model/TreeNodeConnection.java 2010-11-05 17:11:37 UTC (rev 26308)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/tree/model/TreeNodeConnection.java 2010-11-05 17:45:07 UTC (rev 26309)
@@ -188,11 +188,11 @@
}
if(currentNode == sourceCollectionDomNode) {
- builder.insert(0, collectionMapping.getCollectionItemName() + ".");
+ builder.insert(0, collectionMapping.getCollectionItemName() + "/");
}
} else {
// No parent connection... just use the connection source path...
- builder.append(SmooksUIUtils.generateFullPath((IXMLStructuredObject) sourceNodeModel.getData(), "."));
+ builder.append(SmooksUIUtils.generateFullPath((IXMLStructuredObject) sourceNodeModel.getData(), "/"));
}
if(builder.length() > 1 && builder.charAt(0) == '.') {
15 years, 5 months
JBoss Tools SVN: r26308 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui: src/org/jboss/tools/deltacloud/ui/views and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-11-05 13:11:37 -0400 (Fri, 05 Nov 2010)
New Revision: 26308
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVInstancesCategoryElement.java
Log:
[JBIDE-7506] remove cloud instance listener if viewer is disposed
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-11-05 17:04:59 UTC (rev 26307)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-11-05 17:11:37 UTC (rev 26308)
@@ -5,6 +5,8 @@
[JBIDE-7507] returns now icons to represent states (instead of texts)
* src/org/jboss/tools/deltacloud/ui/views/CVInstancesCategoryElement.java (.run):
[JBIDE-7503] added restore selection after refresh (viewer lost the selection before this change)
+ (onDispose):
+ [JBIDE-7506] remove cloud instance listener if viewer is disposed
2010-11-04 André Dietisheim <adietish(a)redhat.com>
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVInstancesCategoryElement.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVInstancesCategoryElement.java 2010-11-05 17:04:59 UTC (rev 26307)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVInstancesCategoryElement.java 2010-11-05 17:11:37 UTC (rev 26308)
@@ -18,6 +18,8 @@
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.widgets.Display;
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
@@ -34,9 +36,23 @@
this.viewer = viewer;
DeltaCloud cloud = (DeltaCloud) getElement();
cloud.addInstanceListListener(this);
+ viewer.getControl().addDisposeListener(onDispose());
this.category = this;
}
+ private DisposeListener onDispose() {
+ return new DisposeListener() {
+
+ @Override
+ public void widgetDisposed(DisposeEvent e) {
+ DeltaCloud cloud = (DeltaCloud) getElement();
+ if (cloud != null) {
+ cloud.removeInstanceListListener(CVInstancesCategoryElement.this);
+ }
+ }
+ };
+ }
+
protected void finalize() throws Throwable {
DeltaCloud cloud = (DeltaCloud) getElement();
cloud.removeInstanceListListener(this);
15 years, 5 months
JBoss Tools SVN: r26307 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-11-05 13:04:59 -0400 (Fri, 05 Nov 2010)
New Revision: 26307
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceViewLabelAndContentProvider.java
Log:
[JBIDE-7507] adjusted width for state column
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceViewLabelAndContentProvider.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceViewLabelAndContentProvider.java 2010-11-05 16:51:16 UTC (rev 26306)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceViewLabelAndContentProvider.java 2010-11-05 17:04:59 UTC (rev 26307)
@@ -36,7 +36,7 @@
public enum Column {
NAME(0, 20),
ID(1, 20),
- STATUS(2, 20),
+ STATUS(2, 6),
HOSTNAME(3, 40);
private int column;
15 years, 5 months