JBoss Tools SVN: r20139 - in branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse: META-INF and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2010-02-05 07:56:43 -0500 (Fri, 05 Feb 2010)
New Revision: 20139
Added:
branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/cglib-2.2.jar
branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/commons-collections-3.1.jar
branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/slf4j-api-1.5.8.jar
branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/slf4j-log4j12-1.5.8.jar
Removed:
branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/cglib-2.1.3.jar
branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/commons-collections-2.1.1.jar
Modified:
branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/.classpath
branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF
branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/build.properties
branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/hibernate-commons-annotations.jar
branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/javassist.jar
branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/jboss-cache.jar
branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/jta.jar
Log:
https://jira.jboss.org/jira/browse/JBIDE-5706 - update jars with new versions, plus slf4j logger libs
Modified: branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/.classpath
===================================================================
--- branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/.classpath 2010-02-05 12:44:05 UTC (rev 20138)
+++ branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/.classpath 2010-02-05 12:56:43 UTC (rev 20139)
@@ -5,12 +5,8 @@
<classpathentry kind="src" path="src"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate/asm.jar"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate/asm-attrs.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/commons-collections-2.1.1.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/commons-logging-1.0.4.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/concurrent-1.3.2.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/connector.jar"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate/dom4j-1.6.1.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/hibernate3.jar" sourcepath="/hibernate-3.2"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/hibernate3.jar" sourcepath="C:/Temp/_hibernate/hibernate-core-3.3.2.GA-sources.jar"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate/jboss-cache.jar"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate/jboss-common.jar"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate/jboss-jmx.jar"/>
@@ -21,22 +17,28 @@
<classpathentry exported="true" kind="lib" path="lib/hibernate/oscache-2.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate/proxool-0.8.3.jar"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate/swarmcache-1.0rc2.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/tools/hibernate-tools.jar" sourcepath="/hibernateext.tools"/>
- <classpathentry exported="true" kind="lib" path="lib/tools/freemarker.jar"/>
<classpathentry exported="true" kind="lib" path="lib/bsh-core-2.0b4.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/annotations/ejb3-persistence.jar"/>
<classpathentry exported="true" kind="lib" path="lib/annotations/hibernate-annotations.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/cglib-2.1.3.jar"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate/jgroups-2.2.8.jar"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate/antlr-2.7.6.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/tools/jtidy-r8-20060801.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/annotations/hibernate-entitymanager.jar" sourcepath="/hibernateext.entitymanager"/>
+ <classpathentry exported="true" kind="lib" path="lib/annotations/hibernate-entitymanager.jar" sourcepath="C:/Temp/_hibernate/hibernate-entitymanager-3.4.0.GA-sources.jar"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate/javassist.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/ehcache-1.2.3.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/c3p0-0.9.1.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/annotations/hibernate-commons-annotations.jar"/>
<classpathentry exported="true" kind="lib" path="lib/annotations/hibernate-validator.jar"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate/log4j-1.2.15.jar"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate/hibernate-jmx.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/commons-collections-3.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/slf4j-api-1.5.8.jar" sourcepath="D:/Temp/_hibernate/slf4j-api-1.5.8-sources.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/cglib-2.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/annotations/hibernate-commons-annotations.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/annotations/ejb3-persistence.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/c3p0-0.9.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/commons-logging-1.0.4.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/concurrent-1.3.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/connector.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/ehcache-1.2.3.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/slf4j-log4j12-1.5.8.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/tools/freemarker.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/tools/hibernate-tools.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/tools/jtidy-r8-20060801.jar"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF
===================================================================
--- branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF 2010-02-05 12:44:05 UTC (rev 20138)
+++ branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF 2010-02-05 12:56:43 UTC (rev 20139)
@@ -183,7 +183,6 @@
net.sf.cglib.proxy,
net.sf.cglib.reflect,
net.sf.cglib.transform,
- net.sf.cglib.transform.hook,
net.sf.cglib.transform.impl,
net.sf.cglib.util,
net.sf.ehcache,
@@ -479,6 +478,9 @@
org.logicalcobwebs.proxool.util,
org.objectweb.asm,
org.objectweb.asm.attrs,
+ org.slf4j,
+ org.slf4j.helpers,
+ org.slf4j.spi,
org.w3c.tidy,
org.w3c.tidy.ant,
pojo
Modified: branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/build.properties
===================================================================
--- branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/build.properties 2010-02-05 12:44:05 UTC (rev 20138)
+++ branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/build.properties 2010-02-05 12:56:43 UTC (rev 20139)
@@ -12,9 +12,9 @@
lib/hibernate/c3p0-0.9.1.jar,\
lib/annotations/hibernate-commons-annotations.jar,\
lib/annotations/hibernate-validator.jar,\
- lib/annotations/hibernate-search.jar,\
- lib/annotations/lucene-core-2.2.0.jar,\
lib/hibernate/log4j-1.2.15.jar,\
+ lib/hibernate/slf4j-api-1.5.8.jar,\
+ lib/hibernate/slf4j-log4j12-1.5.8.jar,\
about.ini,\
about.mappings,\
about.properties,\
Modified: branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/hibernate-commons-annotations.jar
===================================================================
(Binary files differ)
Deleted: branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/cglib-2.1.3.jar
===================================================================
(Binary files differ)
Added: branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/cglib-2.2.jar
===================================================================
(Binary files differ)
Property changes on: branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/cglib-2.2.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/commons-collections-2.1.1.jar
===================================================================
(Binary files differ)
Added: branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/commons-collections-3.1.jar
===================================================================
(Binary files differ)
Property changes on: branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/commons-collections-3.1.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/javassist.jar
===================================================================
(Binary files differ)
Modified: branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/jboss-cache.jar
===================================================================
(Binary files differ)
Modified: branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/jta.jar
===================================================================
(Binary files differ)
Added: branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/slf4j-api-1.5.8.jar
===================================================================
(Binary files differ)
Property changes on: branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/slf4j-api-1.5.8.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/slf4j-log4j12-1.5.8.jar
===================================================================
(Binary files differ)
Property changes on: branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/slf4j-log4j12-1.5.8.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 2 months
JBoss Tools SVN: r20138 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/view.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2010-02-05 07:44:05 -0500 (Fri, 05 Feb 2010)
New Revision: 20138
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/view/OrmImageMap.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/view/OrmLabelProvider.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5806
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/view/OrmImageMap.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/view/OrmImageMap.java 2010-02-05 12:08:54 UTC (rev 20137)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/view/OrmImageMap.java 2010-02-05 12:44:05 UTC (rev 20138)
@@ -11,7 +11,6 @@
package org.jboss.tools.hibernate.ui.view;
import org.eclipse.jface.resource.ImageDescriptor;
-import org.hibernate.MappingException;
import org.hibernate.mapping.Any;
import org.hibernate.mapping.Array;
import org.hibernate.mapping.Bag;
@@ -125,7 +124,7 @@
Type type = null;
try {
type = field.getType();
- } catch (MappingException ex) {
+ } catch (Exception ex) {
// ignore it
}
if (type != null && type.isCollectionType()) {
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/view/OrmLabelProvider.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/view/OrmLabelProvider.java 2010-02-05 12:08:54 UTC (rev 20137)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/view/OrmLabelProvider.java 2010-02-05 12:44:05 UTC (rev 20138)
@@ -24,7 +24,6 @@
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
import org.hibernate.HibernateException;
-import org.hibernate.MappingException;
import org.hibernate.cfg.Configuration;
import org.hibernate.cfg.Environment;
import org.hibernate.console.ConsoleConfiguration;
@@ -174,7 +173,7 @@
if (dialect != null) {
try {
sqlType = column.getSqlType(dialect, mapping);
- } catch (MappingException ex) {
+ } catch (Exception ex) {
// ignore it
}
}
16 years, 2 months
JBoss Tools SVN: r20137 - in trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl: definition and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-02-05 07:08:54 -0500 (Fri, 05 Feb 2010)
New Revision: 20137
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ParametedType.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerField.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerMethod.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractTypeDefinition.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5799
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java 2010-02-05 05:34:25 UTC (rev 20136)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java 2010-02-05 12:08:54 UTC (rev 20137)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.cdi.internal.core.impl;
+
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
@@ -17,7 +18,6 @@
import java.util.Map;
import java.util.Set;
-import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jdt.core.IMemberValuePair;
import org.eclipse.jdt.core.IType;
@@ -242,27 +242,7 @@
* @see org.jboss.tools.cdi.core.IBean#getAllTypes()
*/
public Set<IParametedType> getAllTypes() {
- Set<IParametedType> result = new HashSet<IParametedType>();
- IType type = getDefinition().getType();
- if(type != null) {
- ParametedType p = new ParametedType();
- p.setType(type);
- String[] ps = null;
- try {
- ps = type.getTypeParameterSignatures();
- p.setSignature("Q" + type.getFullyQualifiedName() + ',');
- } catch (CoreException e) {
- CDICorePlugin.getDefault().logError(e);
- //TODO
- }
- if(ps == null || ps.length == 0) {
- //type with parameters is not legal
- result.add(p);
- }
- }
- Set<IParametedType> inh = getDefinition().getAllInheritedTypes();
- if(inh != null) result.addAll(inh);
- return result;
+ return getDefinition().getAllTypes();
}
public String getName() {
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ParametedType.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ParametedType.java 2010-02-05 05:34:25 UTC (rev 20136)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ParametedType.java 2010-02-05 12:08:54 UTC (rev 20137)
@@ -36,7 +36,9 @@
boolean inheritanceIsBuilt = false;
protected ParametedType superType = null;
protected Set<IParametedType> inheritedTypes = new HashSet<IParametedType>();
+ Set<IParametedType> allInheritedTypes = null;
+
public ParametedType() {}
public IType getType() {
@@ -165,4 +167,25 @@
return null;
}
+ public Set<IParametedType> getAllTypes() {
+ if(allInheritedTypes == null) {
+ allInheritedTypes = new HashSet<IParametedType>();
+ Set<String> processed = new HashSet<String>();
+ buildAllTypes(processed, this);
+ }
+ return allInheritedTypes;
+ }
+
+ void buildAllTypes(Set<String> processed, ParametedType p) {
+ IType t = p.getType();
+ if(t == null) return;
+ if(processed.contains(t.getFullyQualifiedName())) return;
+ processed.add(t.getFullyQualifiedName());
+ allInheritedTypes.add(p);
+ Set<IParametedType> ts = p.getInheritedTypes();
+ if(ts != null) for (IParametedType pp: ts) {
+ buildAllTypes(processed, (ParametedType)pp);
+ }
+ }
+
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerField.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerField.java 2010-02-05 05:34:25 UTC (rev 20136)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerField.java 2010-02-05 12:08:54 UTC (rev 20137)
@@ -77,19 +77,10 @@
* @see org.jboss.tools.cdi.core.IBean#getAllTypes()
*/
public Set<IParametedType> getAllTypes() {
- Set<IParametedType> result = new HashSet<IParametedType>();
if(typeDeclaration != null) {
- IType type = typeDeclaration.getType();
- if(type != null) {
- ParametedType p = new ParametedType();
- p.setType(type);
- p.setSignature("Q" + type.getFullyQualifiedName() + ',');
- result.add(p);
- }
- Set<IParametedType> inh = typeDeclaration.getInheritedTypes();
- if(inh != null) result.addAll(inh);
+ return typeDeclaration.getAllTypes();
}
- return result;
+ return new HashSet<IParametedType>();
}
public String getName() {
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerMethod.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerMethod.java 2010-02-05 05:34:25 UTC (rev 20136)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerMethod.java 2010-02-05 12:08:54 UTC (rev 20137)
@@ -86,28 +86,10 @@
* @see org.jboss.tools.cdi.core.IBean#getAllTypes()
*/
public Set<IParametedType> getAllTypes() {
- Set<IParametedType> result = new HashSet<IParametedType>();
if(typeDeclaration != null) {
- IType type = typeDeclaration.getType();
- if(type != null) {
- ParametedType p = new ParametedType();
- p.setType(type);
-// String[] ps = null;
-// try {
-// ps = type.getTypeParameterSignatures();
- p.setSignature("Q" + type.getFullyQualifiedName() + ',');
-// } catch (CoreException e) {
-// CDICorePlugin.getDefault().logError(e);
-// }
-// if(ps == null || ps.length == 0) {
-// //type with parameters is not legal
- result.add(p);
-// }
- }
- Set<IParametedType> inh = typeDeclaration.getInheritedTypes();
- if(inh != null) result.addAll(inh);
+ return typeDeclaration.getAllTypes();
}
- return result;
+ return new HashSet<IParametedType>();
}
public String getName() {
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractTypeDefinition.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractTypeDefinition.java 2010-02-05 05:34:25 UTC (rev 20136)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractTypeDefinition.java 2010-02-05 12:08:54 UTC (rev 20137)
@@ -30,8 +30,6 @@
protected IType type;
protected ParametedType parametedType = null;
- Set<IParametedType> allInheritedTypes = null;
-
protected String content = null;
public AbstractTypeDefinition() {}
@@ -62,29 +60,12 @@
parametedType.setSignature("Q" + qualifiedName + ";");
}
- void buildAllInheritedTypes(Set<String> processed, ParametedType p) {
- IType t = p.getType();
- if(t == null) return;
- if(processed.contains(t.getFullyQualifiedName())) return;
- processed.add(t.getFullyQualifiedName());
- allInheritedTypes = new HashSet<IParametedType>();
- allInheritedTypes.add(p);
- Set<IParametedType> ts = p.getInheritedTypes();
- if(ts != null) for (IParametedType pp: ts) {
- buildAllInheritedTypes(processed, (ParametedType)pp);
- }
- }
-
public Set<IParametedType> getInheritedTypes() {
return parametedType == null ? new HashSet<IParametedType>() : parametedType.getInheritedTypes();
}
- public Set<IParametedType> getAllInheritedTypes() {
- if(allInheritedTypes == null) {
- Set<String> processed = new HashSet<String>();
- buildAllInheritedTypes(processed, parametedType);
- }
- return allInheritedTypes;
+ public Set<IParametedType> getAllTypes() {
+ return parametedType == null ? new HashSet<IParametedType>() : parametedType.getAllTypes();
}
public String getContent() {
16 years, 2 months
JBoss Tools SVN: r20136 - in trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks: editor/propertySections and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2010-02-05 00:34:25 -0500 (Fri, 05 Feb 2010)
New Revision: 20136
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/PropertiesAndSetterMethodSearchFieldEditorCreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/JavaMappingPathSection.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/ValueDecodeParamSection.java
Log:
JBIDE-5726
Disable the text/button controls of Property and Setter Method.
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/PropertiesAndSetterMethodSearchFieldEditorCreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/PropertiesAndSetterMethodSearchFieldEditorCreator.java 2010-02-05 03:46:46 UTC (rev 20135)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/PropertiesAndSetterMethodSearchFieldEditorCreator.java 2010-02-05 05:34:25 UTC (rev 20136)
@@ -13,7 +13,9 @@
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.jboss.tools.smooks.configuration.editors.AttributeFieldEditPart;
@@ -63,8 +65,18 @@
EObject container = ((EObject) model).eContainer();
String classString = getClassString(model);
if (classString != null) {
- return SmooksUIUtils.createJavaPropertySearchFieldEditor(classString, container, parent, toolkit,
+ AttributeFieldEditPart editPart = SmooksUIUtils.createJavaPropertySearchFieldEditor(classString, container, parent, toolkit,
propertyDescriptor, getPropertiesSearchButtonName(), (EObject) model);
+ Composite composite = (Composite) editPart.getContentControl();
+ Control[] children = composite.getChildren();
+ for (int i = 0; i < children.length; i++) {
+ Control child = children[i];
+ if(child instanceof Button){
+ child.setEnabled(false);
+ }
+ }
+ editPart.getContentControl().setEnabled(false);
+ return editPart;
}
}
return null;
@@ -80,8 +92,18 @@
EObject container = ((EObject) model).eContainer();
String classString = getClassString(model);
if (classString != null) {
- return SmooksUIUtils.createJavaMethodSearchFieldEditor(classString, container, parent, toolkit,
+ AttributeFieldEditPart editPart = SmooksUIUtils.createJavaMethodSearchFieldEditor(classString, container, parent, toolkit,
propertyDescriptor, getMethodsSearchButtonName(), (EObject) model);
+ Composite composite = (Composite) editPart.getContentControl();
+ Control[] children = composite.getChildren();
+ for (int i = 0; i < children.length; i++) {
+ Control child = children[i];
+ if(child instanceof Button){
+ child.setEnabled(false);
+ }
+ }
+ editPart.getContentControl().setEnabled(false);
+ return editPart;
}
}
return null;
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/JavaMappingPathSection.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/JavaMappingPathSection.java 2010-02-05 03:46:46 UTC (rev 20135)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/JavaMappingPathSection.java 2010-02-05 05:34:25 UTC (rev 20136)
@@ -67,6 +67,8 @@
GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 2;
+ gridLayout.horizontalSpacing = 13;
+ gridLayout.verticalSpacing = 20;
controlComposite.setLayout(gridLayout);
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/ValueDecodeParamSection.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/ValueDecodeParamSection.java 2010-02-05 03:46:46 UTC (rev 20135)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/ValueDecodeParamSection.java 2010-02-05 05:34:25 UTC (rev 20136)
@@ -119,6 +119,8 @@
GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 2;
+ gridLayout.horizontalSpacing = 13;
+ gridLayout.verticalSpacing = 20;
controlComposite.setLayout(gridLayout);
16 years, 2 months
JBoss Tools SVN: r20135 - in trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd: jpdl/deployment and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2010-02-04 22:46:46 -0500 (Thu, 04 Feb 2010)
New Revision: 20135
Added:
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/deployment/DeploymentInfo.java
Modified:
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/common/editor/AbstractContentProvider.java
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/common/editor/Editor.java
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/deployment/DeploymentForm.java
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/editor/JpdlContentProvider.java
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/editor/JpdlDeploymentEditorPage.java
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/editor/JpdlEditor.java
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/notation/JpdlRootContainer.java
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/ServerDeploymentPage.java
Log:
Selections on deployment screen get undone after saving project: JBIDE-5595
Modified: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/common/editor/AbstractContentProvider.java
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/common/editor/AbstractContentProvider.java 2010-02-05 02:09:19 UTC (rev 20134)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/common/editor/AbstractContentProvider.java 2010-02-05 03:46:46 UTC (rev 20135)
@@ -92,10 +92,6 @@
return result + ".jpg";
}
-// public String getSemanticInfoFileName(String notationInfoFileName) {
-// return notationInfoFileName.substring(5);
-// }
-
protected void processRootContainer(RootContainer rootContainer, Element notationInfo) {
addDimension(rootContainer, notationInfo);
addNodes(rootContainer, notationInfo);
@@ -273,13 +269,13 @@
return result;
}
- private String toNotationInfoXml(RootContainer rootContainer) {
+ protected String toNotationInfoXml(RootContainer rootContainer) {
StringWriter writer = new StringWriter();
write(rootContainer, writer);
return writer.toString();
}
- private void write(
+ protected void write(
RootContainer rootContainer, Writer writer) {
try {
Document document = DocumentHelper.createDocument();
@@ -292,7 +288,7 @@
}
}
- private void write(
+ protected void write(
RootContainer rootContainer,
Element element) {
addAttribute(element, "name", ((NamedElement)rootContainer.getSemanticElement()).getName());
@@ -304,7 +300,7 @@
}
}
- private void write(Node node, Element element) {
+ protected void write(Node node, Element element) {
Element newElement = null;
if (node instanceof AbstractNodeContainer) {
newElement = addElement(element, "node-container");
@@ -329,7 +325,7 @@
}
}
- private void write(Edge edge,
+ protected void write(Edge edge,
Element element) {
Point offset = edge.getLabel().getOffset();
if (offset != null) {
@@ -343,7 +339,7 @@
}
}
- private void write(BendPoint bendpoint, Element bendpointElement) {
+ protected void write(BendPoint bendpoint, Element bendpointElement) {
addAttribute(bendpointElement, "w1", String.valueOf(bendpoint
.getFirstRelativeDimension().width));
addAttribute(bendpointElement, "h1", String.valueOf(bendpoint
@@ -354,12 +350,12 @@
.getSecondRelativeDimension().height));
}
- private Element addElement(Element element, String elementName) {
+ protected Element addElement(Element element, String elementName) {
Element newElement = element.addElement(elementName);
return newElement;
}
- private void addAttribute(Element e, String attributeName,
+ protected void addAttribute(Element e, String attributeName,
String value) {
if (value != null) {
e.addAttribute(attributeName, value);
@@ -374,7 +370,7 @@
}
}
- private IFile getNotationInfoFile(IFile semanticInfoFile) {
+ protected IFile getNotationInfoFile(IFile semanticInfoFile) {
IProject project = semanticInfoFile.getProject();
IPath semanticInfoPath = semanticInfoFile.getProjectRelativePath();
IPath notationInfoPath = semanticInfoPath.removeLastSegments(1).append(getNotationInfoFileName(semanticInfoFile.getName()));
Modified: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/common/editor/Editor.java
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/common/editor/Editor.java 2010-02-05 02:09:19 UTC (rev 20134)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/common/editor/Editor.java 2010-02-05 03:46:46 UTC (rev 20135)
@@ -208,8 +208,7 @@
private void handleCommandStackChanged() {
getActionRegistry().updateStackActions();
if (!isDirty() && getCommandStack().isDirty() && editAllowed()) {
- isDirty = true;
- firePropertyChange(IEditorPart.PROP_DIRTY);
+ setDirty(true);
}
}
@@ -230,6 +229,7 @@
public void setDirty(boolean dirty) {
isDirty = dirty;
+ firePropertyChange(IEditorPart.PROP_DIRTY);
}
public boolean isDirty() {
Modified: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/deployment/DeploymentForm.java
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/deployment/DeploymentForm.java 2010-02-05 02:09:19 UTC (rev 20134)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/deployment/DeploymentForm.java 2010-02-05 03:46:46 UTC (rev 20135)
@@ -35,12 +35,16 @@
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.viewers.CheckStateChangedEvent;
+import org.eclipse.jface.viewers.ICheckStateListener;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;
@@ -80,6 +84,7 @@
private Composite composite;
private IFolder processFolder;
private JpdlEditor editor;
+ private DeploymentInfo deploymentInfo;
private Form form;
private Text nameText;
@@ -138,6 +143,31 @@
});
}
+ private IPreferenceStore getPreferenceStore() {
+ return Plugin.getDefault().getPreferenceStore();
+ }
+
+ public DeploymentInfo getDeploymentInfo() {
+ if (deploymentInfo == null) {
+ deploymentInfo = new DeploymentInfo();
+ String serverName = getPreferenceStore().getString("server name");
+ deploymentInfo.setServerName(serverName == null ? "localhost" : serverName);
+ String serverPort = getPreferenceStore().getString("server port");
+ deploymentInfo.setServerPort(serverPort == null ? "8080" : serverPort);
+ String serverDeployer = getPreferenceStore().getString("server deployer");
+ deploymentInfo.setServerDeployer(serverDeployer == null ? "/jbpm-console/upload" : serverDeployer);
+ final IJavaProject project = JavaCore.create(processFolder.getProject());
+ deploymentInfo.setClassesAndResources(new ArrayList(getElementsToCheckFor(project)).toArray());
+ deploymentInfo.setFilesAndFolders(getElementsToCheckFor(processFolder).toArray());
+ }
+ return deploymentInfo;
+ }
+
+ public void setDeploymentInfo(DeploymentInfo deploymentInfo) {
+ this.deploymentInfo = deploymentInfo;
+ refresh();
+ }
+
private ProcessDeployer createProcessDeployer() {
ProcessDeployer result = new ProcessDeployer();
String location = null;
@@ -249,14 +279,16 @@
Label nameLabel = toolkit.createLabel(infoFormClient, "Server Name:");
nameLabel.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
nameText = toolkit.createText(infoFormClient, "");
- String nameString = Plugin.getDefault().getPreferenceStore().getString("server name");
- nameText.setText(nameString == null || "".equals(nameString) ? "localhost" : nameString);
+ String nameString = getDeploymentInfo().getServerName();
+ nameText.setText(nameString == null ? "localhost" : nameString);
GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
gridData.horizontalSpan = 2;
nameText.setLayoutData(gridData);
nameText.addKeyListener(new KeyAdapter() {
public void keyReleased(KeyEvent e) {
updateTestConnectionAndDeployButtons();
+ getDeploymentInfo().setServerName(nameText.getText());
+ editor.setDirty(true);
}
});
}
@@ -265,14 +297,16 @@
Label portLabel = toolkit.createLabel(infoFormClient, "Server Port:");
portLabel.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
portText = toolkit.createText(infoFormClient, "");
- String portString = Plugin.getDefault().getPreferenceStore().getString("server port");
- portText.setText(portString == null || "".equals(portString)? "8080" : portString);
+ String portString = getDeploymentInfo().getServerPort();
+ portText.setText(portString == null ? "8080" : portString);
GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
gridData.horizontalSpan = 2;
portText.setLayoutData(gridData);
portText.addKeyListener(new KeyAdapter() {
public void keyReleased(KeyEvent e) {
updateTestConnectionAndDeployButtons();
+ getDeploymentInfo().setServerPort(portText.getText());
+ editor.setDirty(true);
}
});
}
@@ -281,14 +315,16 @@
Label deployerLabel = toolkit.createLabel(infoFormClient, "Server Deployer:");
deployerLabel.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
deployerText = toolkit.createText(infoFormClient, "");
- String deployerString = Plugin.getDefault().getPreferenceStore().getString("server deployer");
- deployerText.setText(deployerString == null || "".equals(deployerString)? "/jbpm-console/upload" : deployerString);
+ String deployerString = deploymentInfo.getServerDeployer();
+ deployerText.setText(deployerString == null ? "/jbpm-console/upload" : deployerString);
GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
gridData.horizontalSpan = 2;
deployerText.setLayoutData(gridData);
deployerText.addKeyListener(new KeyAdapter() {
public void keyReleased(KeyEvent e) {
updateTestConnectionAndDeployButtons();
+ getDeploymentInfo().setServerDeployer(deployerText.getText());
+ editor.setDirty(true);
}
});
}
@@ -373,9 +409,15 @@
includeFilesTreeViewer.setInput(processFolder);
tree.getDisplay().asyncExec(new Runnable() {
public void run() {
- includeFilesTreeViewer.setCheckedElements(getElementsToCheckFor(processFolder).toArray());
+ includeFilesTreeViewer.setCheckedElements(getDeploymentInfo().getFilesAndFolders());
}
});
+ includeFilesTreeViewer.addCheckStateListener(new ICheckStateListener() {
+ public void checkStateChanged(CheckStateChangedEvent event) {
+ getDeploymentInfo().setFilesAndFolders(includeFilesTreeViewer.getCheckedElements());
+ editor.setDirty(true);
+ }
+ });
final Button includeFilesDefaultButton = toolkit.createButton(includeFilesFormClient, "Reset Defaults", SWT.PUSH);
includeFilesDefaultButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
@@ -383,7 +425,7 @@
public void widgetSelected(SelectionEvent e) {
includeFilesDefaultButton.getDisplay().asyncExec(new Runnable() {
public void run() {
- includeFilesTreeViewer.setCheckedElements(getElementsToCheckFor(processFolder).toArray());
+ includeFilesTreeViewer.setCheckedElements(getDeploymentInfo().getFilesAndFolders());
}
});
}
@@ -458,9 +500,15 @@
}
composite.getDisplay().asyncExec(new Runnable() {
public void run() {
- includeClassesTreeViewer.setCheckedElements(getElementsToCheckFor(project).toArray());
+ includeClassesTreeViewer.setCheckedElements(getDeploymentInfo().getClassesAndResources());
}
});
+ includeClassesTreeViewer.addCheckStateListener(new ICheckStateListener() {
+ public void checkStateChanged(CheckStateChangedEvent event) {
+ getDeploymentInfo().setClassesAndResources(includeClassesTreeViewer.getCheckedElements());
+ editor.setDirty(true);
+ }
+ });
final Button includeClassesDefaultButton = toolkit.createButton(includeClassesFormClient, "Reset Defaults", SWT.PUSH);
includeClassesDefaultButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
@@ -468,7 +516,7 @@
public void widgetSelected(SelectionEvent e) {
composite.getDisplay().asyncExec(new Runnable() {
public void run() {
- includeClassesTreeViewer.setCheckedElements(getElementsToCheckFor(project).toArray());
+ includeClassesTreeViewer.setCheckedElements(getDeploymentInfo().getClassesAndResources());
}
});
}
@@ -476,7 +524,7 @@
return includeClassesFormClient;
}
-
+
private Composite createLocalSaveFormClient() {
Section httpInfoDetails = toolkit.createSection(form.getBody(), Section.TITLE_BAR | Section.DESCRIPTION);
httpInfoDetails.marginWidth = 5;
@@ -592,49 +640,49 @@
});
}
- public void refresh(final ArrayList objectsToRefresh) {
- form.getDisplay().asyncExec(new Runnable() {
- public void run() {
- refreshIncludeClassesTreeViewer(objectsToRefresh);
- refreshIncludeFilesTreeViewer(objectsToRefresh);
- }
- });
- }
+// public void refresh(final ArrayList objectsToRefresh) {
+// form.getDisplay().asyncExec(new Runnable() {
+// public void run() {
+// refreshIncludeClassesTreeViewer(objectsToRefresh);
+// refreshIncludeFilesTreeViewer(objectsToRefresh);
+// }
+// });
+// }
- private void refreshIncludeFilesTreeViewer(ArrayList objectsToRefresh) {
- Object[] elements = includeFilesTreeViewer.getCheckedElements();
- includeFilesTreeViewer.refresh();
- includeFilesTreeViewer.setCheckedElements(elements);
- IWorkspaceRoot root = processFolder.getWorkspace().getRoot();
- for (int i = 0; i < objectsToRefresh.size(); i++) {
- IPath path = (IPath)objectsToRefresh.get(i);
- if (root.getFile(path).exists()) {
- includeFilesTreeViewer.setChecked(root.getFile(path), true);
- } else if (root.getFolder(path).exists()) {
- includeFilesTreeViewer.setChecked(root.getFolder(path), true);
- }
- }
- }
+// private void refreshIncludeFilesTreeViewer(ArrayList objectsToRefresh) {
+// Object[] elements = includeFilesTreeViewer.getCheckedElements();
+// includeFilesTreeViewer.refresh();
+// includeFilesTreeViewer.setCheckedElements(elements);
+// IWorkspaceRoot root = processFolder.getWorkspace().getRoot();
+// for (int i = 0; i < objectsToRefresh.size(); i++) {
+// IPath path = (IPath)objectsToRefresh.get(i);
+// if (root.getFile(path).exists()) {
+// includeFilesTreeViewer.setChecked(root.getFile(path), true);
+// } else if (root.getFolder(path).exists()) {
+// includeFilesTreeViewer.setChecked(root.getFolder(path), true);
+// }
+// }
+// }
- private void refreshIncludeClassesTreeViewer(ArrayList objectsToRefresh) {
- Set referencedJavaClassNames = null;
- Object[] elements = includeClassesTreeViewer.getCheckedElements();
- includeClassesTreeViewer.refresh();
- includeClassesTreeViewer.setCheckedElements(elements);
- IWorkspaceRoot root = processFolder.getWorkspace().getRoot();
- for (int i = 0; i < objectsToRefresh.size(); i++) {
- IPath path = (IPath)objectsToRefresh.get(i);
- IJavaElement javaElement = JavaCore.create(root.getFile(path));
- if (javaElement != null && javaElement instanceof ICompilationUnit) {
- if (referencedJavaClassNames == null) {
- referencedJavaClassNames = JavaClassNameCollector.getJavaClassNames(editor.getProcessDefinition());
- }
- String name = getTypeName((ICompilationUnit)javaElement);
- boolean checkNeeded = referencedJavaClassNames.contains(name);
- includeClassesTreeViewer.setChecked(javaElement, checkNeeded);
- }
- }
- }
+// private void refreshIncludeClassesTreeViewer(ArrayList objectsToRefresh) {
+// Set referencedJavaClassNames = null;
+// Object[] elements = includeClassesTreeViewer.getCheckedElements();
+// includeClassesTreeViewer.refresh();
+// includeClassesTreeViewer.setCheckedElements(elements);
+// IWorkspaceRoot root = processFolder.getWorkspace().getRoot();
+// for (int i = 0; i < objectsToRefresh.size(); i++) {
+// IPath path = (IPath)objectsToRefresh.get(i);
+// IJavaElement javaElement = JavaCore.create(root.getFile(path));
+// if (javaElement != null && javaElement instanceof ICompilationUnit) {
+// if (referencedJavaClassNames == null) {
+// referencedJavaClassNames = JavaClassNameCollector.getJavaClassNames(editor.getProcessDefinition());
+// }
+// String name = getTypeName((ICompilationUnit)javaElement);
+// boolean checkNeeded = referencedJavaClassNames.contains(name);
+// includeClassesTreeViewer.setChecked(javaElement, checkNeeded);
+// }
+// }
+// }
private String getTypeName(ICompilationUnit unit) {
try {
@@ -688,12 +736,14 @@
public void refresh() {
if (composite.isDisposed()) return;
- final IJavaProject project = JavaCore.create(processFolder.getProject());
+ nameText.setText(getDeploymentInfo().getServerName());
+ portText.setText(getDeploymentInfo().getServerPort());
+ deployerText.setText(getDeploymentInfo().getServerDeployer());
composite.getDisplay().asyncExec(new Runnable() {
public void run() {
if (!includeClassesTreeViewer.getTree().isDisposed()) {
includeClassesTreeViewer.refresh();
- includeClassesTreeViewer.setCheckedElements(getElementsToCheckFor(project).toArray());
+ includeClassesTreeViewer.setCheckedElements(getDeploymentInfo().getClassesAndResources());
}
}
});
@@ -701,7 +751,7 @@
public void run() {
if (!includeFilesTreeViewer.getTree().isDisposed()) {
includeFilesTreeViewer.refresh();
- includeFilesTreeViewer.setCheckedElements(getElementsToCheckFor(processFolder).toArray());
+ includeFilesTreeViewer.setCheckedElements(getDeploymentInfo().getFilesAndFolders());
}
}
});
Added: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/deployment/DeploymentInfo.java
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/deployment/DeploymentInfo.java (rev 0)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/deployment/DeploymentInfo.java 2010-02-05 03:46:46 UTC (rev 20135)
@@ -0,0 +1,64 @@
+package org.jbpm.gd.jpdl.deployment;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.resources.IFolder;
+
+public class DeploymentInfo {
+
+ private String serverName = null;
+ private String serverPort = null;
+ private String serverDeployer = null;
+ private IFolder processFolder = null;
+ private Object[] classesAndResources = null;
+ private Object[] filesAndFolders = null;
+
+ public void setServerName(String serverName) {
+ this.serverName = serverName;
+ }
+
+ public String getServerName() {
+ return serverName;
+ }
+
+ public void setServerPort(String serverPort) {
+ this.serverPort = serverPort;
+ }
+
+ public String getServerPort() {
+ return serverPort;
+ }
+
+ public void setServerDeployer(String serverDeployer) {
+ this.serverDeployer = serverDeployer;
+ }
+
+ public String getServerDeployer() {
+ return serverDeployer;
+ }
+
+ public void setProcessFolder(IFolder processFolder) {
+ this.processFolder = processFolder;
+ }
+
+ public IFolder getProcessFolder() {
+ return processFolder;
+ }
+
+ public void setClassesAndResources(Object[] classesAndResources) {
+ this.classesAndResources = classesAndResources;
+ }
+
+ public Object[] getClassesAndResources() {
+ return classesAndResources;
+ }
+
+ public void setFilesAndFolders(Object[] filesAndFolders) {
+ this.filesAndFolders = filesAndFolders;
+ }
+
+ public Object[] getFilesAndFolders() {
+ return filesAndFolders;
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/deployment/DeploymentInfo.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/editor/JpdlContentProvider.java
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/editor/JpdlContentProvider.java 2010-02-05 02:09:19 UTC (rev 20134)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/editor/JpdlContentProvider.java 2010-02-05 03:46:46 UTC (rev 20135)
@@ -21,21 +21,45 @@
*/
package org.jbpm.gd.jpdl.editor;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.List;
import java.util.StringTokenizer;
+import org.dom4j.Attribute;
+import org.dom4j.DocumentException;
import org.dom4j.Element;
+import org.dom4j.io.SAXReader;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.part.FileEditorInput;
import org.jbpm.gd.common.editor.AbstractContentProvider;
import org.jbpm.gd.common.model.SemanticElement;
import org.jbpm.gd.common.notation.Edge;
import org.jbpm.gd.common.notation.Node;
import org.jbpm.gd.common.notation.NodeContainer;
import org.jbpm.gd.common.notation.NotationElement;
+import org.jbpm.gd.common.notation.RootContainer;
+import org.jbpm.gd.jpdl.deployment.DeploymentInfo;
import org.jbpm.gd.jpdl.model.NodeElement;
import org.jbpm.gd.jpdl.model.NodeElementContainer;
import org.jbpm.gd.jpdl.model.Transition;
public class JpdlContentProvider extends AbstractContentProvider{
+ JpdlEditor jpdlEditor;
+
+ public JpdlContentProvider(JpdlEditor jpdlEditor) {
+ this.jpdlEditor = jpdlEditor;
+ }
+
public String getNotationInfoFileName(String semanticInfoFileName) {
if ("processdefinition.xml".equals(semanticInfoFileName)) {
return "gpd.xml";
@@ -52,14 +76,6 @@
}
}
-// public String getSemanticInfoFileName(String notationInfoFileName) {
-// if ("gpd.xml".equals(notationInfoFileName)) {
-// return "processdefinition.xml";
-// } else {
-// return super.getSemanticInfoFileName(notationInfoFileName);
-// }
-// }
-
protected void addNodes(NodeContainer nodeContainer, Element notationInfo) {
NodeElementContainer nodeElementContainer = (NodeElementContainer)nodeContainer.getSemanticElement();
addNodes(nodeContainer, nodeElementContainer.getNodeElements(), notationInfo);
@@ -97,4 +113,122 @@
return (NodeElement)parent;
}
+ protected void write(
+ RootContainer rootContainer,
+ Element element) {
+ super.write(rootContainer, element);
+ writeDeploymentInfo(jpdlEditor.getDeploymentInfo(), element);
+ }
+
+ private void writeDeploymentInfo(DeploymentInfo deploymentInfo, Element element) {
+ Element deploymentElement = addElement(element, "deployment");
+ addAttribute(deploymentElement, "serverName", deploymentInfo.getServerName());
+ addAttribute(deploymentElement, "serverPort", deploymentInfo.getServerPort());
+ addAttribute(deploymentElement, "serverDeployer", deploymentInfo.getServerDeployer());
+ Element classesAndResourcesElement = addElement(deploymentElement, "classesAndResources");
+ Object[] classesAndResources = deploymentInfo.getClassesAndResources();
+ for (int i = 0; i < classesAndResources.length; i++) {
+ Object object = classesAndResources[i];
+ String value = null;
+ if (object instanceof ICompilationUnit) {
+ value = ((ICompilationUnit)object).getResource().getFullPath().toString();
+ } else if (object instanceof IResource) {
+ value = ((IResource)object).getFullPath().toString();
+ }
+ if (value != null) {
+ Element el = addElement(classesAndResourcesElement, "element");
+ addAttribute(el, "value", value);
+ }
+ }
+ Element filesAndFoldersElement = addElement(deploymentElement, "filesAndFolders");
+ Object[] filesAndFolders = deploymentInfo.getFilesAndFolders();
+ for (int i = 0; i < filesAndFolders.length; i++) {
+ Object object = filesAndFolders[i];
+ if (object instanceof IFile) {
+ Element el = addElement(filesAndFoldersElement, "element");
+ addAttribute(el, "value", ((IFile)object).getFullPath().toString());
+ }
+ }
+ }
+
+ protected void addDeploymentInfo(DeploymentInfo deploymentInfo, IEditorInput editorInput) {
+ try {
+ IFile file = getNotationInfoFile(((FileEditorInput)editorInput).getFile());
+ // the file should exist as this is performed by the addNotationInfo previously
+ InputStreamReader reader = new InputStreamReader(file.getContents());
+ Element rootElement = new SAXReader().read(reader).getRootElement();
+ processDeploymentInfo(deploymentInfo, rootElement);
+ } catch (DocumentException e) {
+ e.printStackTrace();
+ throw new RuntimeException(e);
+ } catch (CoreException e) {
+ e.printStackTrace();
+ throw new RuntimeException(e);
+ }
+ }
+
+ protected void processDeploymentInfo(DeploymentInfo deploymentInfo, Element element) {
+ Element deploymentElement = element.element("deployment");
+ if (deploymentElement == null) return;
+ processServerName(deploymentInfo, deploymentElement.attribute("serverName"));
+ processServerPort(deploymentInfo, deploymentElement.attribute("serverPort"));
+ processServerDeployer(deploymentInfo, deploymentElement.attribute("serverDeployer"));
+ processClassesAndResources(deploymentInfo, deploymentElement.element("classesAndResources"));
+ processFilesAndFolders(deploymentInfo, deploymentElement.element("filesAndFolders"));
+ }
+
+ protected void processServerName(DeploymentInfo deploymentInfo, Attribute attribute) {
+ if (attribute == null) return;
+ String value = attribute.getValue();
+ if (value == null) return;
+ deploymentInfo.setServerName(value);
+ }
+
+ protected void processServerPort(DeploymentInfo deploymentInfo, Attribute attribute) {
+ if (attribute == null) return;
+ String value = attribute.getValue();
+ if (value == null) return;
+ deploymentInfo.setServerPort(value);
+ }
+
+ protected void processServerDeployer(DeploymentInfo deploymentInfo, Attribute attribute) {
+ if (attribute == null) return;
+ String value = attribute.getValue();
+ if (value == null) return;
+ deploymentInfo.setServerDeployer(value);
+ }
+
+ protected void processClassesAndResources(DeploymentInfo deploymentInfo, Element element) {
+ if (element == null) return;
+ ArrayList classesAndResources = new ArrayList();
+ List elements = element.elements("element");
+ for (int i = 0; i < elements.size(); i++) {
+ String value = ((Element)elements.get(i)).attributeValue("value");
+ IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(value));
+ if (!file.exists()) continue;
+ IJavaElement javaElement = JavaCore.create(file);
+ if (javaElement != null) {
+ classesAndResources.add(javaElement);
+ } else {
+ classesAndResources.add(file);
+ }
+ }
+ deploymentInfo.setClassesAndResources(classesAndResources.toArray());
+ }
+
+ protected void processFilesAndFolders(DeploymentInfo deploymentInfo, Element element) {
+ if (element == null) return;
+ ArrayList filesAndFolders = new ArrayList();
+ List elements = element.elements("element");
+ for (int i = 0; i < elements.size(); i++) {
+ String value = ((Element)elements.get(i)).attributeValue("value");
+ IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(value));
+ if (!file.exists()) continue;
+ filesAndFolders.add(file);
+ }
+ deploymentInfo.setFilesAndFolders(filesAndFolders.toArray());
+ }
+
+
+
}
Modified: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/editor/JpdlDeploymentEditorPage.java
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/editor/JpdlDeploymentEditorPage.java 2010-02-05 02:09:19 UTC (rev 20134)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/editor/JpdlDeploymentEditorPage.java 2010-02-05 03:46:46 UTC (rev 20135)
@@ -36,6 +36,7 @@
import org.eclipse.ui.forms.widgets.ScrolledForm;
import org.eclipse.ui.part.EditorPart;
import org.jbpm.gd.jpdl.deployment.DeploymentForm;
+import org.jbpm.gd.jpdl.deployment.DeploymentInfo;
public class JpdlDeploymentEditorPage extends EditorPart {
@@ -64,11 +65,11 @@
IFolder folder = getProcessFolder();
deploymentForm = new DeploymentForm(toolkit, form, folder, editor);
deploymentForm.create();
- folder.getWorkspace().addResourceChangeListener(new IResourceChangeListener() {
- public void resourceChanged(IResourceChangeEvent event) {
- deploymentForm.refresh();
- }
- });
+// folder.getWorkspace().addResourceChangeListener(new IResourceChangeListener() {
+// public void resourceChanged(IResourceChangeEvent event) {
+// deploymentForm.refresh();
+// }
+// });
}
private IFolder getProcessFolder() {
@@ -85,6 +86,14 @@
public void doSave(IProgressMonitor monitor) {
}
+ public DeploymentInfo getDeploymentInfo() {
+ return deploymentForm.getDeploymentInfo();
+ }
+
+ public void setDeploymentInfo(DeploymentInfo deploymentInfo) {
+ deploymentForm.setDeploymentInfo(deploymentInfo);
+ }
+
public void doSaveAs() {
}
@@ -100,4 +109,5 @@
setSite(site);
setInput(input);
}
- }
+
+}
Modified: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/editor/JpdlEditor.java
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/editor/JpdlEditor.java 2010-02-05 02:09:19 UTC (rev 20134)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/editor/JpdlEditor.java 2010-02-05 03:46:46 UTC (rev 20135)
@@ -43,6 +43,7 @@
import org.jbpm.gd.common.editor.OutlineViewer;
import org.jbpm.gd.common.editor.SelectionSynchronizer;
import org.jbpm.gd.common.model.SemanticElement;
+import org.jbpm.gd.jpdl.deployment.DeploymentInfo;
import org.jbpm.gd.jpdl.model.ProcessDefinition;
import org.jbpm.gd.jpdl.part.JpdlEditorOutlineEditPartFactory;
import org.jbpm.gd.jpdl.part.JpdlGraphicalEditPartFactory;
@@ -50,6 +51,7 @@
public class JpdlEditor extends Editor {
private IResourceChangeListener resourceChangeListener;
+ private JpdlDeploymentEditorPage deploymentEditorPage;
public void init(IEditorSite site, IEditorInput input)
throws PartInitException {
@@ -107,7 +109,7 @@
}
protected ContentProvider createContentProvider() {
- return new JpdlContentProvider();
+ return new JpdlContentProvider(this);
}
protected GraphicalViewer createGraphicalViewer() {
@@ -128,8 +130,16 @@
protected void createPages() {
super.createPages();
- addPage(1, new JpdlDeploymentEditorPage(this), "Deployment");
+ initDeploymentPage();
}
+
+ protected void initDeploymentPage() {
+ deploymentEditorPage = new JpdlDeploymentEditorPage(this);
+ addPage(1, deploymentEditorPage, "Deployment");
+ DeploymentInfo deploymentInfo = getDeploymentInfo();
+ ((JpdlContentProvider)getContentProvider()).addDeploymentInfo(deploymentInfo, getEditorInput());
+ deploymentEditorPage.setDeploymentInfo(deploymentInfo);
+ }
protected SemanticElement createMainElement() {
return getSemanticElementFactory().createById("org.jbpm.gd.jpdl.processDefinition");
@@ -138,6 +148,10 @@
public ProcessDefinition getProcessDefinition() {
return (ProcessDefinition)getRootContainer().getSemanticElement();
}
+
+ public DeploymentInfo getDeploymentInfo() {
+ return deploymentEditorPage.getDeploymentInfo();
+ }
public void dispose() {
getWorkspace().removeResourceChangeListener(resourceChangeListener);
Modified: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/notation/JpdlRootContainer.java
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/notation/JpdlRootContainer.java 2010-02-05 02:09:19 UTC (rev 20134)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/notation/JpdlRootContainer.java 2010-02-05 03:46:46 UTC (rev 20135)
@@ -7,6 +7,7 @@
import org.jbpm.gd.common.notation.Edge;
import org.jbpm.gd.common.notation.Node;
import org.jbpm.gd.common.notation.RootContainer;
+import org.jbpm.gd.jpdl.deployment.DeploymentInfo;
import org.jbpm.gd.jpdl.model.NodeElement;
import org.jbpm.gd.jpdl.model.Transition;
Modified: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/ServerDeploymentPage.java
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/ServerDeploymentPage.java 2010-02-05 02:09:19 UTC (rev 20134)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/ServerDeploymentPage.java 2010-02-05 03:46:46 UTC (rev 20135)
@@ -25,7 +25,6 @@
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
16 years, 2 months
JBoss Tools SVN: r20134 - trunk/documentation/guides/JBDS_3.0_Release_Notes/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2010-02-04 21:09:19 -0500 (Thu, 04 Feb 2010)
New Revision: 20134
Modified:
trunk/documentation/guides/JBDS_3.0_Release_Notes/en-US/Fixed_Issues.xml
Log:
added new jira to the release notes
Modified: trunk/documentation/guides/JBDS_3.0_Release_Notes/en-US/Fixed_Issues.xml
===================================================================
--- trunk/documentation/guides/JBDS_3.0_Release_Notes/en-US/Fixed_Issues.xml 2010-02-04 17:32:41 UTC (rev 20133)
+++ trunk/documentation/guides/JBDS_3.0_Release_Notes/en-US/Fixed_Issues.xml 2010-02-05 02:09:19 UTC (rev 20134)
@@ -16,20 +16,41 @@
<ulink url="http://jira.jboss.com/jira/browse/JBIDE-5770">JBIDE-5770</ulink>: The EL code completion icon has been updated to use the <application>JBoss Weld</application> icon.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-5355">JBIDE-5355</ulink>: A Contexts and Dependency Injection Project Facet has been added to <application>JBoss Developer Studio</application>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-5276">JBIDE-5276</ulink>: The <guimenuitem>Add CDI Support</guimenuitem> and <guimenuitem>Remove CDI Support</guimenuitem> items have been added to the Project menu.
+ </para>
+ </listitem>
</itemizedlist>
</para>
</formalpara>
<formalpara>
- <title>ESB Editor</title>
+ <title>ESB</title>
<para>
<itemizedlist>
<listitem>
<para>
- <ulink url="http://jira.jboss.com/jira/browse/JBIDE-5653">JBIDE-5653</ulink>:
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-5653">JBIDE-5653</ulink>: The <guilabel>ESB Content Based Router </guilabel> dialog box has been modified so that the <guilabel>CBR Alias</guilabel> field is now mondatory, allowing the value of it to determine what other fields are available. The <guilabel>Rule Set</guilabel> field is now not required when a <guilabel>CBR Alias</guilabel> of Regex or XPath is provided, since with these alias the rules can be specified inline and the <guilabel>Rule Language</guilabel> field is now set to apply only when the <guilabel>CBR Alias</guilabel> is Drools. The <guilabel>Rules Reload</guilabel> field will only apply when a <guilabel>Rule Set</guilabel> has been specified.
</para>
+ <para>
+ The table <guilabel>Route List</guilabel> found in the <guilabel>JBoss ESB Editor</guilabel> now lists the <emphasis>expression</emphasis> since this is a common undertaking by users.
+ </para>
+ <para>
+ In the <guilabel> Add Route To</guilabel> dialog box, the <guilabel>Service Category</guilabel> field has been made mandatory. Other changes to this dialog box include the <guilabel>Desitination name</guilabel> only being required if the previous CBR action contained a <guilabel>Rule Set</guilabel> and if the CBR action did not contain a <guilabel>Rule Set</guilabel>, an <guilabel>Expression</guilabel> field is included.
+ </para>
</listitem>
<listitem>
<para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-5627">JBIDE-5627</ulink>: For this release of the <application>JBoss Developer Studio</application> variations of the <guilabel>Content Based Router</guilabel> menu have been added to the ESB editor for Drools, Drools XPath, Generic, XPath and Regex.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
<ulink url="http://jira.jboss.com/jira/browse/JBIDE-5548">JBIDE-5548</ulink>: In the ESB Configuration Editor, when selecting a JBR Listener, JBR Bus or JBR Provider, new functionality has been added to allow a user to configure the properties: <property>synchronous</property>, <property>serviceInvokerTimeout</property> and <property>asyncResponse</property> through the new child object <property>Config</property>. These new configurable properties allow a user increased control over the execution of the JBR components.
</para>
</listitem>
@@ -38,6 +59,21 @@
<ulink url="http://jira.jboss.com/jira/browse/JBIDE-5547">JBIDE-5547</ulink>: In the ESB Configuration Editor, when selecting a FTP Listener in read-only mode new functionality has been added to allow a user to configure the properties: <property>maxNodes</property>, <property>timeToLiveSeconds</property> and <property>maxAgeSeconds</property> through the new child object <property>Cache</property>. In addition the following properties have been added to allow a user to select their own values for the: <property>Class</property>, <property>Config File</property> and <property>Cache Listener</property> available through the new child object <property>Remote Filesystem Strategy</property>. These new configurable properties allow a user increased control over the execution of the FTP Listener.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-5489">JBIDE-5489</ulink>: For the <guilabel>BPMProcessor</guilabel> within the ESB Editor, the <property>Command</property> property has been modified to include possible values of <emphasis>NewProcessInstanceCommand</emphasis>, <emphasis>StartProcessCommand</emphasis> and <emphasis>CancelProcessInstanceCommand</emphasis> in a drop-down box.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-5486">JBIDE-5486</ulink>: When a user would try to open an editor for a property that didn't exist nothing would occur. With this update, a <guilabel>New File</guilabel> wizard opens to guide the user through the creation of the property they were attempting to open. Once this is completed, the ESB Editor fields are then populated with the new file name and path for the property.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-5427">JBIDE-5427</ulink>: In the ESB Editor, the items that displayed when right clicking and going to <menuchoice><guimenuitem>Provider</guimenuitem><guimenuitem>New</guimenuitem></menuchoice> were presented in a different order to those of the <menuchoice><guimenuitem>Listner</guimenuitem><guimenuitem>New</guimenuitem></menuchoice> list. To ensure consistency the <guimenuitem>Provider</guimenuitem> list of items has been reordered to match the <guimenuitem>Listner</guimenuitem> menu.
+ </para>
+ </listitem>
</itemizedlist>
</para>
</formalpara>
@@ -57,9 +93,36 @@
</listitem>
<listitem>
<para>
- <ulink url="http://jira.jboss.com/jira/browse/JBIDE-5499">JBIDE-5499</ulink>:
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-5499">JBIDE-5499</ulink>: Refactoring support has been added to <guilabel>Hibernate Code Generation Configurations</guilabel>.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-5411">JBIDE-5411</ulink>: The <guilabel>New Hibernate XML Mapping file</guilabel> wizard used to show all available packages. This update ensures that only packages containing java classes are shown.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-5408">JBIDE-5408</ulink>: Three issues are fixed:
+ <itemizedlist>
+ <listitem>
+ <para>
+ The new Hibernate XML Mapping file (<filename>hbm.xml</filename>) would rewrite all <filename>hbm.xml</filename> files without warning. To correct this the entire result is written into the systems' temporary directory and then the merge of results is conducted.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ After the merge of results is conducted, clicking the <guibutton>Finish without Preview</guibutton> button should change the page, however this did not work. The <guibutton>Finish without Preview</guibutton> now works as expected.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ After the merge, following the button clicks <guibutton>GoTo</guibutton>, <guibutton>Next</guibutton>, <guibutton>Back</guibutton> and then <guibutton>Finish</guibutton> would not work correctly. This method of steps now functions as users would expect.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </listitem>
</itemizedlist>
</para>
</formalpara>
@@ -77,6 +140,21 @@
<ulink url="http://jira.jboss.com/jira/browse/JBIDE-5660">JBIDE-5660</ulink>: When setting the location of an <property><error-page></property> within <filename>web.xml</filename>, the location would not be recognized if it included a query string. For example the location <filename>views/error/error.xhtml</filename> would be valid, whereas the location <filename>/views/error/error.xhtml?statusCode=403</filename> would not be valid. This has been corrected by adding a test for a query string into the <filename>CheckResource.java</filename> file, allowing for locations to be specified that include a query string.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-5471">JBIDE-5471</ulink>: <filename>web-facesconfig_2_0.xsd</filename> support has been added to the <guilabel>JavaServer Faces Configuration</guilabel> editor. This file provides the XML Schema for the JavaServer Faces Application Configuration File Version 2.0.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-5381">JBIDE-5381</ulink>: Content Assist has been added for use with the elements defined using the default namespace.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-5277">JBIDE-5277</ulink>: The options to Add and Remove JSF support have been added to the project menu.
+ </para>
+ </listitem>
</itemizedlist>
</para>
</formalpara>
@@ -93,6 +171,30 @@
</para>
</formalpara>
<formalpara>
+ <title>Seam</title>
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-5275">JBIDE-5275</ulink>: The <guimenuitem>Add Seam Support</guimenuitem> and <guimenuitem>Remove Seam Support</guimenuitem> items have been added to the Project menu.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </formalpara>
+ <formalpara>
+ <title>Struts</title>
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-5278">JBIDE-5278</ulink>: The options to Add and Remove Struts support have been added to the project menu.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </formalpara>
+ <formalpara>
<title>XML Structured Editor</title>
<para>
<itemizedlist>
@@ -101,6 +203,11 @@
<ulink url="http://jira.jboss.com/jira/browse/JBIDE-5521">JBIDE-5521</ulink>: The Web Servlet Mapping dialog box now contains a drop-down list for the <guilabel>Servlet-Name</guilabel> field so that servlets that have been entered into the <filename>web.xml</filename> file can be selected easily.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-5426">JBIDE-5426</ulink>: The Servlet Mapping Editor <guilabel>Servlet-Name</guilabel> field has been improved with a drop-down menu to fill it in.
+ </para>
+ </listitem>
</itemizedlist>
</para>
</formalpara>
16 years, 2 months
JBoss Tools SVN: r20133 - in trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl: definition and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-02-04 12:32:41 -0500 (Thu, 04 Feb 2010)
New Revision: 20133
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/AbstractBeanElement.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractMemberDefinition.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractTypeDefinition.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/BeanMemberDefinition.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/TypeDefinition.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5799
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/AbstractBeanElement.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/AbstractBeanElement.java 2010-02-04 16:10:07 UTC (rev 20132)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/AbstractBeanElement.java 2010-02-04 17:32:41 UTC (rev 20133)
@@ -14,10 +14,13 @@
import java.util.List;
import java.util.Set;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.IMemberValuePair;
+import org.eclipse.jdt.core.ISourceRange;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
import org.jboss.tools.cdi.core.CDICoreNature;
@@ -28,9 +31,11 @@
import org.jboss.tools.cdi.core.IStereotypeDeclaration;
import org.jboss.tools.cdi.core.ITypeDeclaration;
import org.jboss.tools.cdi.internal.core.impl.definition.AbstractMemberDefinition;
+import org.jboss.tools.cdi.internal.core.impl.definition.AbstractTypeDefinition;
import org.jboss.tools.cdi.internal.core.impl.definition.AnnotationDefinition;
import org.jboss.tools.cdi.internal.core.impl.definition.ParametedTypeFactory;
import org.jboss.tools.common.model.util.EclipseJavaUtil;
+import org.jboss.tools.common.util.FileUtil;
/**
*
@@ -116,28 +121,62 @@
if(typed != null) {
IAnnotation a = typed.getDeclaration();
try {
+ ISourceRange r = a.getSourceRange();
+ String txt = null;
+ if(r != null && a.getResource() instanceof IFile) {
+ AbstractTypeDefinition td = getDefinition().getTypeDefinition();
+ if(td != null) {
+ String content = td.getContent();
+ if(content != null && content.length() > r.getOffset() + r.getLength()) {
+ txt = content.substring(r.getOffset(), r.getOffset() + r.getLength());
+ }
+ }
+ }
+
IMemberValuePair[] ps = a.getMemberValuePairs();
if(ps == null || ps.length == 0) return result;
Object value = ps[0].getValue();
if(value instanceof Object[]) {
Object[] os = (Object[])value;
for (int i = 0; i < os.length; i++) {
- String typeName = os[i].toString();
+ String rawTypeName = os[i].toString();
+ String typeName = rawTypeName;
if(!typeName.endsWith(";")) typeName = "Q" + typeName + ";";
- ParametedType p = ParametedTypeFactory.getParametedType(((IMember)definition.getMember()).getDeclaringType(), typeName);
+ IMember member = (IMember)definition.getMember();
+ IType declaringType = member instanceof IType ? (IType)member : member.getDeclaringType();
+ ParametedType p = ParametedTypeFactory.getParametedType(declaringType, typeName);
if(p != null) {
- result.add(new TypeDeclaration(p, -1, 0));
+ int offset = 0;
+ int length = 0;
+ if(txt != null) {
+ int q = txt.indexOf(rawTypeName);
+ if(q >= 0) {
+ offset = r.getOffset() + q;
+ length = rawTypeName.length();
+ }
+ }
+ result.add(new TypeDeclaration(p, offset, length));
}
}
} else if(value != null) {
- String typeName = value.toString();
+ String rawTypeName = value.toString();
+ String typeName = rawTypeName;
if(!typeName.endsWith(";")) typeName = "Q" + typeName + ";";
ParametedType p = ParametedTypeFactory.getParametedType(((IMember)definition.getMember()).getDeclaringType(), typeName);
if(p != null) {
- result.add(new TypeDeclaration(p, -1, 0));
+ int offset = 0;
+ int length = 0;
+ if(txt != null) {
+ int q = txt.indexOf(rawTypeName);
+ if(q >= 0) {
+ offset = r.getOffset() + q;
+ length = rawTypeName.length();
+ }
+ }
+ result.add(new TypeDeclaration(p, offset, length));
}
}
- } catch (JavaModelException e) {
+ } catch (CoreException e) {
CDICorePlugin.getDefault().logError(e);
}
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractMemberDefinition.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractMemberDefinition.java 2010-02-04 16:10:07 UTC (rev 20132)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractMemberDefinition.java 2010-02-04 17:32:41 UTC (rev 20133)
@@ -54,6 +54,10 @@
return member;
}
+ public AbstractTypeDefinition getTypeDefinition() {
+ return null;
+ }
+
protected void init(IType contextType, DefinitionContext context) throws CoreException {
resource = contextType.getResource();
IAnnotation[] ts = member.getAnnotations();
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractTypeDefinition.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractTypeDefinition.java 2010-02-04 16:10:07 UTC (rev 20132)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractTypeDefinition.java 2010-02-04 17:32:41 UTC (rev 20133)
@@ -13,10 +13,12 @@
import java.util.HashSet;
import java.util.Set;
+import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.IType;
import org.jboss.tools.cdi.core.IParametedType;
import org.jboss.tools.cdi.internal.core.impl.ParametedType;
+import org.jboss.tools.common.util.FileUtil;
/**
*
@@ -29,9 +31,15 @@
protected ParametedType parametedType = null;
Set<IParametedType> allInheritedTypes = null;
+
+ protected String content = null;
public AbstractTypeDefinition() {}
+ public AbstractTypeDefinition getTypeDefinition() {
+ return this;
+ }
+
public String getQualifiedName() {
return qualifiedName;
}
@@ -79,4 +87,12 @@
return allInheritedTypes;
}
+ public String getContent() {
+ if(type == null || type.isBinary()) return null;
+ if(content == null && resource instanceof IFile && resource.getName().endsWith(".java")) {
+ content = FileUtil.getContentFromEditorOrFile((IFile)resource);
+ }
+ return content;
+ }
+
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/BeanMemberDefinition.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/BeanMemberDefinition.java 2010-02-04 16:10:07 UTC (rev 20132)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/BeanMemberDefinition.java 2010-02-04 17:32:41 UTC (rev 20133)
@@ -4,9 +4,18 @@
import org.jboss.tools.cdi.internal.core.impl.AnnotationDeclaration;
public class BeanMemberDefinition extends AbstractMemberDefinition {
+ AbstractTypeDefinition typeDefinition;
public BeanMemberDefinition() {}
+ public void setTypeDefinition(AbstractTypeDefinition typeDefinition) {
+ this.typeDefinition = typeDefinition;
+ }
+
+ public AbstractTypeDefinition getTypeDefinition() {
+ return typeDefinition;
+ }
+
public boolean isCDIAnnotated() {
return getInjectAnnotation() != null || getProducesAnnotation() != null;
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/TypeDefinition.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/TypeDefinition.java 2010-02-04 16:10:07 UTC (rev 20132)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/TypeDefinition.java 2010-02-04 17:32:41 UTC (rev 20133)
@@ -46,6 +46,7 @@
IField[] fs = getType().getFields();
for (int i = 0; i < fs.length; i++) {
FieldDefinition f = new FieldDefinition();
+ f.setTypeDefinition(this);
f.setField(fs[i], context);
if(f.isCDIAnnotated()) {
fields.add(f);
@@ -54,6 +55,7 @@
IMethod[] ms = getType().getMethods();
for (int i = 0; i < ms.length; i++) {
MethodDefinition m = new MethodDefinition();
+ m.setTypeDefinition(this);
m.setMethod(ms[i], context);
if(m.isCDIAnnotated()) {
methods.add(m);
16 years, 2 months
JBoss Tools SVN: r20132 - in trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi: internal/core/impl and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-02-04 11:10:07 -0500 (Thu, 04 Feb 2010)
New Revision: 20132
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBean.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanMember.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerField.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerMethod.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2708
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBean.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBean.java 2010-02-04 15:53:51 UTC (rev 20131)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBean.java 2010-02-04 16:10:07 UTC (rev 20132)
@@ -56,6 +56,14 @@
Set<IParametedType> getLegalTypes();
/**
+ * Obtains all the types of the bean class or producer method or
+ * field (legal types as well as illegal ones). This set will contain inherited types of the bean.
+ *
+ * @return the legal types
+ */
+ Set<IParametedType> getAllTypes();
+
+ /**
* Obtains all the type declarations of the bean class or producer method or
* field (legal types as well as illegal ones).
*
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanMember.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanMember.java 2010-02-04 15:53:51 UTC (rev 20131)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanMember.java 2010-02-04 16:10:07 UTC (rev 20132)
@@ -32,7 +32,7 @@
*/
public abstract class BeanMember extends AbstractBeanElement implements IBeanMember {
protected IClassBean classBean;
- protected ITypeDeclaration typeDeclaration;
+ protected TypeDeclaration typeDeclaration;
public BeanMember() {}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java 2010-02-04 15:53:51 UTC (rev 20131)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java 2010-02-04 16:10:07 UTC (rev 20132)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
+ * Copyright (c) 2009 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
@@ -234,6 +234,15 @@
result.addAll(ts);
return result;
}
+ return getAllTypes();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.cdi.core.IBean#getAllTypes()
+ */
+ public Set<IParametedType> getAllTypes() {
+ Set<IParametedType> result = new HashSet<IParametedType>();
IType type = getDefinition().getType();
if(type != null) {
ParametedType p = new ParametedType();
@@ -243,6 +252,7 @@
ps = type.getTypeParameterSignatures();
p.setSignature("Q" + type.getFullyQualifiedName() + ',');
} catch (CoreException e) {
+ CDICorePlugin.getDefault().logError(e);
//TODO
}
if(ps == null || ps.length == 0) {
@@ -404,5 +414,4 @@
scope = getCDIProject().getScope(CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME);
}
}
-
-}
+}
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerField.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerField.java 2010-02-04 15:53:51 UTC (rev 20131)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerField.java 2010-02-04 16:10:07 UTC (rev 20132)
@@ -11,7 +11,6 @@
package org.jboss.tools.cdi.internal.core.impl;
import java.util.HashSet;
-import java.util.List;
import java.util.Set;
import org.eclipse.jdt.core.IAnnotation;
@@ -30,9 +29,7 @@
import org.jboss.tools.cdi.core.IStereotype;
import org.jboss.tools.cdi.core.IStereotypeDeclaration;
import org.jboss.tools.cdi.core.ITypeDeclaration;
-import org.jboss.tools.cdi.internal.core.impl.definition.AnnotationDefinition;
import org.jboss.tools.common.model.project.ext.impl.ValueInfo;
-import org.jboss.tools.common.model.util.EclipseJavaUtil;
import org.jboss.tools.common.text.ITextSourceReference;
/**
@@ -57,7 +54,7 @@
}
public IType getBeanClass() {
- return typeDeclaration != null ? typeDeclaration.getType() : null;
+ return getClassBean().getBeanClass();
}
public Set<IInjectionPoint> getInjectionPoints() {
@@ -72,9 +69,25 @@
result.addAll(ts);
return result;
}
+ return getAllTypes();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.cdi.core.IBean#getAllTypes()
+ */
+ public Set<IParametedType> getAllTypes() {
+ Set<IParametedType> result = new HashSet<IParametedType>();
if(typeDeclaration != null) {
- result.add(typeDeclaration);
- //TODO add all inherited types
+ IType type = typeDeclaration.getType();
+ if(type != null) {
+ ParametedType p = new ParametedType();
+ p.setType(type);
+ p.setSignature("Q" + type.getFullyQualifiedName() + ',');
+ result.add(p);
+ }
+ Set<IParametedType> inh = typeDeclaration.getInheritedTypes();
+ if(inh != null) result.addAll(inh);
}
return result;
}
@@ -167,5 +180,4 @@
}
return getCDIProject().getScope(CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME);
}
-
-}
+}
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerMethod.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerMethod.java 2010-02-04 15:53:51 UTC (rev 20131)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerMethod.java 2010-02-04 16:10:07 UTC (rev 20132)
@@ -11,7 +11,6 @@
package org.jboss.tools.cdi.internal.core.impl;
import java.util.HashSet;
-import java.util.List;
import java.util.Set;
import org.eclipse.jdt.core.IAnnotation;
@@ -21,7 +20,6 @@
import org.jboss.tools.cdi.core.CDIConstants;
import org.jboss.tools.cdi.core.CDICorePlugin;
import org.jboss.tools.cdi.core.IAnnotationDeclaration;
-import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.IInjectionPoint;
import org.jboss.tools.cdi.core.IParametedType;
import org.jboss.tools.cdi.core.IProducerMethod;
@@ -30,10 +28,8 @@
import org.jboss.tools.cdi.core.IStereotype;
import org.jboss.tools.cdi.core.IStereotypeDeclaration;
import org.jboss.tools.cdi.core.ITypeDeclaration;
-import org.jboss.tools.cdi.internal.core.impl.definition.AnnotationDefinition;
import org.jboss.tools.cdi.internal.core.impl.definition.MethodDefinition;
import org.jboss.tools.common.model.project.ext.impl.ValueInfo;
-import org.jboss.tools.common.model.util.EclipseJavaUtil;
import org.jboss.tools.common.text.ITextSourceReference;
/**
@@ -67,7 +63,7 @@
}
public IType getBeanClass() {
- return typeDeclaration != null ? typeDeclaration.getType() : null;
+ return getClassBean().getBeanClass();
}
public Set<IInjectionPoint> getInjectionPoints() {
@@ -82,9 +78,34 @@
result.addAll(ts);
return result;
}
+ return getAllTypes();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.cdi.core.IBean#getAllTypes()
+ */
+ public Set<IParametedType> getAllTypes() {
+ Set<IParametedType> result = new HashSet<IParametedType>();
if(typeDeclaration != null) {
- result.add(typeDeclaration);
- //TODO add all inherited types
+ IType type = typeDeclaration.getType();
+ if(type != null) {
+ ParametedType p = new ParametedType();
+ p.setType(type);
+// String[] ps = null;
+// try {
+// ps = type.getTypeParameterSignatures();
+ p.setSignature("Q" + type.getFullyQualifiedName() + ',');
+// } catch (CoreException e) {
+// CDICorePlugin.getDefault().logError(e);
+// }
+// if(ps == null || ps.length == 0) {
+// //type with parameters is not legal
+ result.add(p);
+// }
+ }
+ Set<IParametedType> inh = typeDeclaration.getInheritedTypes();
+ if(inh != null) result.addAll(inh);
}
return result;
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-02-04 15:53:51 UTC (rev 20131)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-02-04 16:10:07 UTC (rev 20132)
@@ -35,6 +35,7 @@
import org.jboss.tools.cdi.core.IAnnotationDeclaration;
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.ICDIProject;
+import org.jboss.tools.cdi.core.IParametedType;
import org.jboss.tools.cdi.core.IQualifierDeclaration;
import org.jboss.tools.cdi.core.IStereotype;
import org.jboss.tools.cdi.core.ITypeDeclaration;
@@ -247,14 +248,13 @@
// in the unrestricted set of bean types of a bean
Set<ITypeDeclaration> typedDeclarations = bean.getRestrictedTypeDeclaratios();
if(!typedDeclarations.isEmpty()) {
- Set<ITypeDeclaration> declarations = bean.getAllTypeDeclarations();
+ Set<IParametedType> allTypes = bean.getAllTypes();
for (ITypeDeclaration typedDeclaration : typedDeclarations) {
- IType type = typedDeclaration.getType();
- if(type!=null) {
+ IType typedType = typedDeclaration.getType();
+ if(typedType!=null) {
boolean typeWasFound = false;
- for (ITypeDeclaration declaration : declarations) {
- IType dType = declaration.getType();
- if(dType!=null && type.getFullyQualifiedName().equals(dType.getFullyQualifiedName())) {
+ for (IParametedType type : allTypes) {
+ if(type!=null && typedType.getFullyQualifiedName().equals(type.getType().getFullyQualifiedName())) {
typeWasFound = true;
break;
}
16 years, 2 months
JBoss Tools SVN: r20131 - trunk/hibernatetools/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2010-02-04 10:53:51 -0500 (Thu, 04 Feb 2010)
New Revision: 20131
Modified:
trunk/hibernatetools/docs/reference/en/modules/setup.xml
Log:
JBDS-1083 -Hibernate guide update - wrote Eclipse IDE chapter, fixed current JBossTools, Hibernate Tools, Eclipse versions.
Modified: trunk/hibernatetools/docs/reference/en/modules/setup.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en/modules/setup.xml 2010-02-04 15:38:58 UTC (rev 20130)
+++ trunk/hibernatetools/docs/reference/en/modules/setup.xml 2010-02-04 15:53:51 UTC (rev 20131)
@@ -1,81 +1,108 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<chapter id="setup">
<title>Download and install Hibernate Tools</title>
-
- <para><property>Hibernate Tools</property> can be used "standalone" via Ant
- 1.6.x or fully integrated into an Eclipse + WTP based IDE, such as <property>JBDS/JBoss
- Tools</property>, or a default Eclipse + WTP installation. The following sections describe the
- install steps in these environments.</para>
-
+ <para><property>Hibernate Tools</property> can be used "standalone" via Ant 1.6.x or
+ fully integrated into an Eclipse + WTP based IDE, such as <property>JBDS/JBoss Tools</property>,
+ or a default Eclipse + WTP installation. The following sections describe the install steps in
+ these environments.</para>
<note>
<title>Note:</title>
- <para>The <property>Hibernate Tools 3.2.4.GA</property> (the current release version) requires
- Eclipse Ganymede 3.4.2.</para>
+ <para>The <property>Hibernate Tools 3.3.0</property> (the current release version) requires
+ Eclipse Galileo 3.5.</para>
</note>
-
<section>
<title>JBoss Tools</title>
-
- <para><property>JBoss Tools 3.0.0.GA</property> (the latest release) includes
- <property>Hibernate Tools 3.2.4.GA</property> and thus nothing is required besides <ulink
- url="http://jboss.org/tools/download/stable/3_0_0_GA.html">downloading</ulink> and <ulink
- url="&gsglink;#JBossToolsInstall">installing JBoss Tools</ulink>. If you need to update
- to a newer version of the <property>Hibernate Tools</property> just follow the instructions in
- the Eclipse IDE section.</para>
+ <para><property>JBoss Tools 3.1.0</property> (the latest release) includes <property>Hibernate
+ Tools 3.3.0</property> and thus nothing is required besides <property>downloading</property>
+ and <property>installing JBoss Tools</property>. If you need to update to a newer version of
+ the <property>Hibernate Tools</property> just follow the instructions in the Eclipse IDE
+ section.</para>
</section>
-
<section>
<title>Eclipse IDE</title>
-
- <para>To install the <property>Hibernate Tools</property> into any <property>Eclipse 3.4.x</property> based IDE you
- can either download the <property>Hibernate Tools</property> distribution from the <ulink
- url="http://jboss.org/tools/download/stable/3_0_0_GA.html">JBoss Tools download page</ulink>
- or from the <ulink url="http://download.jboss.org/jbosstools/updates/stable/">JBoss Tools
- Update Site</ulink>.</para>
-
- <para>If you download the <property>Hibernate Tools</property> distribution you need to place
- the <emphasis>
- <property>/plugins</property>
- </emphasis> and <emphasis>
- <property>/feature</property>
- </emphasis> directory into your eclipse directory or eclipse extensions directory. Sometimes
- Eclipse does not automatically detect new plugins and thus the tools will not be activated. To
- ensure eclipse sees these changes just clean up the cached plugin information by running
- eclipse with the <emphasis>
- <property>-clean</property>
- </emphasis> option, e.g. <emphasis>
- <property>eclipse -clean</property>.</emphasis> Using the updatesite does not require any
- additional steps.</para>
-
+ <para>To install the <property>Hibernate Tools</property> into any <property>Eclipse
+ 3.5</property> based IDE you can either use <ulink
+ url="http://download.jboss.org/jbosstools/updates/stable/">JBoss Tools Update Site</ulink>
+ or install it manually.</para>
+ <para>If you want to install the <property>Hibernate Tools</property> distribution manually you
+ need to:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Download from www.eclipse.org:</para>
+ <itemizedlist>
+ <listitem>
+ <para>birt-report-framework-2_5_0.zip</para>
+ </listitem>
+ <listitem>
+ <para>birt-wtp-integration-sdk-2_3_2.zip</para>
+ </listitem>
+ <listitem>
+ <para>dtp-sdk_1.7.0.zip</para>
+ </listitem>
+ <listitem>
+ <para>eclipse-SDK-3.5-win32.zip</para>
+ </listitem>
+ <listitem>
+ <para>emf-runtime-2.5.0.zip</para>
+ </listitem>
+ <listitem>
+ <para>GEF-SDK-3.5.0.zip</para>
+ </listitem>
+ <listitem>
+ <para>org.eclipse.swtbot.eclipse.test-2.0.0.371-dev-e35.zip</para>
+ </listitem>
+ <listitem>
+ <para>org.eclipse.swtbot.eclipse-2.0.0.340-dev.zip</para>
+ </listitem>
+ <listitem>
+ <para>site-1.6.2.zip</para>
+ </listitem>
+ <listitem>
+ <para>tptp.sdk-TPTP-4.6.0.zip</para>
+ </listitem>
+ <listitem>
+ <para>wtp-sdk-R-3.1-20090616035105.zip</para>
+ </listitem>
+ <listitem>
+ <para>xsd-runtime-2.5.0.zip</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ <listitem>
+ <para>Then you should unpack these files into Eclipse install folder.</para>
+ </listitem>
+ <listitem>
+ <para>From <ulink url="https://www.hibernate.org/6.html">hibernate.org-Download Overview</ulink> download <ulink url="http://downloads.sourceforge.net/project/jboss/JBossTools/JBossTools3.1.0...">Hibernate Tools</ulink>
+ .</para>
+
+ </listitem>
+ <listitem>
+ <para>Unpack <property>Hibernate Tools</property> in eclipse/dropins folder</para>
+ </listitem>
+ </itemizedlist>
<note>
<title>Note:</title>
- <para>If you need more basic instructions on installing plugins and general usage of eclipse
+ <para>If you need more detailed instructions on plugins installation and general usage of eclipse
then check out <ulink url="https://eclipse-tutorial.dev.java.net/"
>https://eclipse-tutorial.dev.java.net/</ulink> and especially <ulink
url="https://eclipse-tutorial.dev.java.net/visual-tutorials/updatemanager.html"
>https://eclipse-tutorial.dev.java.net/visual-tutorials/updatemanager.html</ulink> which
covers using the update manager.</para>
</note>
-
<section>
<title>Usage of Eclipse WTP</title>
-
<para>The <property>Hibernate Tools</property> plugins currently use <property>WTP
3.x</property> which at this time is the latest stable release from the Eclipse Webtools
project.</para>
-
<para>Because the WTP project not always have had proper versioning of their plugins there
might exist WTP plugins in your existing eclipse directory from other Eclipse based projects
that are from an earlier WTP release but has either the same version number or higher. It is
thus recommended that if you have issues with WTP provided features to try and install the
plugins on a clean install of eclipse to ensure there are no version collisions.</para>
-
</section>
</section>
-
<section>
<title>Ant</title>
-
<para>To use the tools via Ant you need the <emphasis>
<property>hibernate-tools.jar</property>
</emphasis> and associated libraries. The libraries are included in the distribution from the
16 years, 2 months
JBoss Tools SVN: r20130 - in trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating: model/xml and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: tfennelly
Date: 2010-02-04 10:38:58 -0500 (Thu, 04 Feb 2010)
New Revision: 20130
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/Messages.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/messages.properties
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelBuilder.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelNodeResolver.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XMLSampleModelBuilder.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XSDModelBuilder.java
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/ValueMapping.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/csv/CSVFreeMarkerTemplateBuilder.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/exception/UnmappedCollectionNodeException.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.templating/src/org/jboss/tools/smooks/templating/template/xml/XMLFreeMarkerTemplateBuilder.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5773
Externalize strings in org.jboss.tools.smooks.templating
Redone
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelBuilder.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelBuilder.java 2010-02-04 15:38:00 UTC (rev 20129)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelBuilder.java 2010-02-04 15:38:58 UTC (rev 20130)
@@ -179,7 +179,7 @@
public static int getMinOccurs(Element element) {
String minOccurs = element.getAttributeNS(NAMESPACE, "minOccurs"); //$NON-NLS-1$
- if(minOccurs.equals("")) {
+ if(minOccurs.equals("")) { //$NON-NLS-1$
return 1;
}
@@ -189,7 +189,7 @@
public static int getMaxOccurs(Element element) {
String maxOccurs = element.getAttributeNS(NAMESPACE, "maxOccurs"); //$NON-NLS-1$
- if(maxOccurs.equals("")) {
+ if(maxOccurs.equals("")) { //$NON-NLS-1$
return 1;
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelNodeResolver.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelNodeResolver.java 2010-02-04 15:38:00 UTC (rev 20129)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelNodeResolver.java 2010-02-04 15:38:58 UTC (rev 20130)
@@ -43,7 +43,7 @@
private Map<String, String> prefixMap = new HashMap<String, String>();
public ModelNodeResolver(Document model) {
- buildModelNodeMap(model.getDocumentElement(), "");
+ buildModelNodeMap(model.getDocumentElement(), ""); //$NON-NLS-1$
}
public Node resolveNodeMapping(Node node) {
@@ -62,7 +62,7 @@
String nodeNS = node.getNamespaceURI();
if(nodeNS != null && nodeNS.length() > 0) {
if(node.getNodeType() == Node.ATTRIBUTE_NODE) {
- pathBuilder.insert(0, "@" + getPrefix(nodeNS) + ":" + ((Attr)node).getName()); //$NON-NLS-1$
+ pathBuilder.insert(0, "@" + getPrefix(nodeNS) + ":" + ((Attr)node).getName()); //$NON-NLS-1$ //$NON-NLS-2$
} else {
pathBuilder.insert(0, getPrefix(nodeNS) + ":" + DomUtils.getName((Element) node)); //$NON-NLS-1$
}
@@ -89,7 +89,7 @@
String elNS = element.getNamespaceURI();
if(parentPath.length() > 0) {
- parentPath += "/";
+ parentPath += "/"; //$NON-NLS-1$
}
if(elNS != null && elNS.length() > 0) {
@@ -107,7 +107,7 @@
if(!ModelBuilder.isInReservedNamespace(attribute)) {
String attrNS = attribute.getNamespaceURI();
if(attrNS != null && attrNS.length() > 0) {
- modelNodeMap.put(elementPath + "/@" + getPrefix(attrNS) + ":" + attribute.getName(), attribute); //$NON-NLS-1$
+ modelNodeMap.put(elementPath + "/@" + getPrefix(attrNS) + ":" + attribute.getName(), attribute); //$NON-NLS-1$ //$NON-NLS-2$
} else {
modelNodeMap.put(elementPath + "/@" + attribute.getName(), attribute); //$NON-NLS-1$
}
Added: trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/Messages.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/Messages.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/Messages.java 2010-02-04 15:38:58 UTC (rev 20130)
@@ -0,0 +1,39 @@
+/**
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2009, JBoss Inc.
+ */
+package org.jboss.tools.smooks.templating.model.xml;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ *
+ *
+ * @author <a href="mailto:tom.fennelly@jboss.com">tom.fennelly(a)jboss.com</a>
+ */
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.jboss.tools.smooks.templating.model.xml.messages"; //$NON-NLS-1$
+ public static String XMLSampleModelBuilder_UnexpectedXMLException;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XMLSampleModelBuilder.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XMLSampleModelBuilder.java 2010-02-04 15:38:00 UTC (rev 20129)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XMLSampleModelBuilder.java 2010-02-04 15:38:58 UTC (rev 20130)
@@ -61,19 +61,19 @@
try {
docBuilder = docBuilderFactory.newDocumentBuilder();
} catch (ParserConfigurationException e) {
- throw new RuntimeException("Unexpectd XML exception. Unable to create DocumentBuilder instance.", e);
+ throw new RuntimeException(Messages.XMLSampleModelBuilder_UnexpectedXMLException, e);
}
}
public XMLSampleModelBuilder(URI xmlSampleURI) throws IOException, ModelBuilderException {
- Assert.isNotNull(xmlSampleURI, "Null 'xmlSampleURI' arg in method call.");
+ Assert.isNotNull(xmlSampleURI, "Null 'xmlSampleURI' arg in method call."); //$NON-NLS-1$
File xmlSampleFile = new File(xmlSampleURI.toFileString());
if(!xmlSampleFile.exists()) {
- throw new IOException("XML Sample '" + xmlSampleFile.getAbsolutePath() + "' not found."); //$NON-NLS-1$
+ throw new IOException("XML Sample '" + xmlSampleFile.getAbsolutePath() + "' not found."); //$NON-NLS-1$ //$NON-NLS-2$
} else if(!xmlSampleFile.isFile()) {
- throw new IOException("XML Sample '" + xmlSampleFile.getAbsolutePath() + "' is not a normal file. Might be a directory etc."); //$NON-NLS-1$
+ throw new IOException("XML Sample '" + xmlSampleFile.getAbsolutePath() + "' is not a normal file. Might be a directory etc."); //$NON-NLS-1$ //$NON-NLS-2$
}
try {
@@ -123,7 +123,7 @@
if(child.getNodeType() == Node.ELEMENT_NODE) {
configureModelElementTypes((Element) child);
} else {
- throw new IllegalStateException("The configureModelElementTypes method can only be called after the model has been trimed of non-model Nodes. Call trimNonModelNodes() before calling configureModelElementTypes().");
+ throw new IllegalStateException("The configureModelElementTypes method can only be called after the model has been trimed of non-model Nodes. Call trimNonModelNodes() before calling configureModelElementTypes()."); //$NON-NLS-1$
}
}
} else {
@@ -143,7 +143,7 @@
if(child.getNodeType() == Node.ELEMENT_NODE) {
Element childElement = (Element) child;
- String elementName = DomUtils.getName(childElement) + ":" + childElement.getNamespaceURI(); // Yes, namespace can be null, but that's OK.
+ String elementName = DomUtils.getName(childElement) + ":" + childElement.getNamespaceURI(); // Yes, namespace can be null, but that's OK. //$NON-NLS-1$
Element earlierOccurance = childElementByNames.get(elementName);
// Mark every element as being optional and possibly being multiple...
@@ -164,7 +164,7 @@
configureModelElementCardinality(childElement);
} else {
- throw new IllegalStateException("The configureModelElementTypes method can only be called after the model has been trimed of non-model Nodes. Call trimNonModelNodes() before calling configureModelElementTypes().");
+ throw new IllegalStateException("The configureModelElementTypes method can only be called after the model has been trimed of non-model Nodes. Call trimNonModelNodes() before calling configureModelElementTypes()."); //$NON-NLS-1$
}
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XSDModelBuilder.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XSDModelBuilder.java 2010-02-04 15:38:00 UTC (rev 20129)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XSDModelBuilder.java 2010-02-04 15:38:58 UTC (rev 20130)
@@ -85,7 +85,7 @@
XSDElementDeclaration rootElement = elements.get(rootElementName);
if(rootElement == null) {
- throw new IllegalArgumentException("Unknown root element '" + rootElementName + "'."); //$NON-NLS-1$
+ throw new IllegalArgumentException("Unknown root element '" + rootElementName + "'."); //$NON-NLS-1$ //$NON-NLS-2$
}
Document model = createModelInstance();
@@ -108,7 +108,7 @@
File schemaFile = new File(schemaPath);
if(!schemaFile.exists()) {
- throw new IOException("XSD '" + schemaFile.getAbsolutePath() + "' not found."); //$NON-NLS-1$
+ throw new IOException("XSD '" + schemaFile.getAbsolutePath() + "' not found."); //$NON-NLS-1$ //$NON-NLS-2$
}
xsdSources[i] = new StreamSource(new FileInputStream(schemaFile));
i++;
@@ -134,7 +134,7 @@
ResourceSet resourceSet = new ResourceSetImpl();
Resource resource;
- resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("xsd", new XSDResourceFactoryImpl());
+ resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("xsd", new XSDResourceFactoryImpl()); //$NON-NLS-1$
resource = resourceSet.getResource(schemaURI, true);
Map<String, Object> options = new HashMap<String, Object>();
@@ -143,7 +143,7 @@
resource.load(options);
if(resource.getContents().isEmpty()) {
- throw new ModelBuilderException("Failed to load schema '" + schemaURI + "'."); //$NON-NLS-1$
+ throw new ModelBuilderException("Failed to load schema '" + schemaURI + "'."); //$NON-NLS-1$ //$NON-NLS-2$
}
XSDSchema schema = (XSDSchema) resource.getContents().get(0);
@@ -230,7 +230,7 @@
private String getPrefix(String elementNS) {
String nsPrefix = nsPrefixes.getProperty(elementNS);
if(nsPrefix == null) {
- nsPrefix = "ns" + nsPrefixes.size();
+ nsPrefix = "ns" + nsPrefixes.size(); //$NON-NLS-1$
nsPrefixes.setProperty(elementNS, nsPrefix);
}
return nsPrefix;
@@ -296,13 +296,13 @@
XSDSimpleTypeDefinition typeDef = attributeDecl.getTypeDefinition();
String name = attributeDecl.getName();
String attributeNS = attributeDecl.getTargetNamespace();
- String value = "";
+ String value = ""; //$NON-NLS-1$
XSDAttributeUseCategory use = attributeUse.getUse();
if(use == XSDAttributeUseCategory.REQUIRED_LITERAL) {
value = REQUIRED;
} else if(attributeUse.getValue() != null) {
- value = OPTIONAL + "=" + attributeUse.getValue().toString();
+ value = OPTIONAL + "=" + attributeUse.getValue().toString(); //$NON-NLS-1$
} else {
value = OPTIONAL;
}
Added: trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/messages.properties
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/messages.properties (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/messages.properties 2010-02-04 15:38:58 UTC (rev 20130)
@@ -0,0 +1 @@
+XMLSampleModelBuilder_UnexpectedXMLException=Unexpectd XML exception. Unable to create DocumentBuilder instance.
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-02-04 15:38:00 UTC (rev 20129)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/TemplateBuilder.java 2010-02-04 15:38:58 UTC (rev 20130)
@@ -266,11 +266,11 @@
}
if (ModelBuilder.NAMESPACE.equals(mappingNode.getNamespaceURI())) {
throw new InvalidMappingException(
- "Unsupported XML target node mapping. Cannot map to a reserved model node from the '" + ModelBuilder.NAMESPACE + "' namespace."); //$NON-NLS-1$
+ "Unsupported XML target node mapping. Cannot map to a reserved model node from the '" + ModelBuilder.NAMESPACE + "' namespace."); //$NON-NLS-1$ //$NON-NLS-2$
}
if (ModelBuilder.isHidden(mappingNode)) {
throw new InvalidMappingException(
- "Illegal XML target node mapping for node '" + mappingNode + "'. This node (or one of it's ancestors) is hidden."); //$NON-NLS-1$
+ "Illegal XML target node mapping for node '" + mappingNode + "'. This node (or one of it's ancestors) is hidden."); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -414,7 +414,7 @@
}
throw new TemplateBuilderException(
- "Unexpected Exception. Invalid <smk:list> collection node. Has no child elements!");
+ "Unexpected Exception. Invalid <smk:list> collection node. Has no child elements!"); //$NON-NLS-1$
}
protected void addValueMapping(Node modelNode, ModelNodeResolver modelNodeResolver, String dollarVariable) throws TemplateBuilderException, InvalidMappingException {
@@ -435,7 +435,7 @@
}
public static void writeListStart(StringWriter writer, String srcPath, String collectionItemName) {
- writer.write("<smk:list smk:srcPath=\"" + srcPath + "\" smk:collectionItemName=\"" + collectionItemName + "\" xmlns:smk=\"" + ModelBuilder.NAMESPACE + "\">"); //$NON-NLS-1$
+ writer.write("<smk:list smk:srcPath=\"" + srcPath + "\" smk:collectionItemName=\"" + collectionItemName + "\" xmlns:smk=\"" + ModelBuilder.NAMESPACE + "\">"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
}
public static void writeListEnd(StringWriter writer) {
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/ValueMapping.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/ValueMapping.java 2010-02-04 15:38:00 UTC (rev 20129)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/ValueMapping.java 2010-02-04 15:38:58 UTC (rev 20130)
@@ -30,7 +30,7 @@
*/
public class ValueMapping extends Mapping {
- public static final String RAW_FORMATING_KEY = ValueMapping.class.getName() + "#RAW_FORMATING_KEY";
+ public static final String RAW_FORMATING_KEY = ValueMapping.class.getName() + "#RAW_FORMATING_KEY"; //$NON-NLS-1$
private Class<?> valueType;
private Properties encodeProperties;
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/csv/CSVFreeMarkerTemplateBuilder.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/csv/CSVFreeMarkerTemplateBuilder.java 2010-02-04 15:38:00 UTC (rev 20129)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/csv/CSVFreeMarkerTemplateBuilder.java 2010-02-04 15:38:58 UTC (rev 20130)
@@ -104,10 +104,10 @@
}
private TemplateElement findListNode(TemplateElement templateNode) throws TemplateBuilderException {
- if(templateNode.getNodeName().equals("IteratorBlock")) {
+ if(templateNode.getNodeName().equals("IteratorBlock")) { //$NON-NLS-1$
String description = templateNode.getDescription();
if(!description.startsWith("list")) { //$NON-NLS-1$
- throw new TemplateBuilderException ("Unsupported CSV template IteratorBlock type '" + description + "'. Currently only support 'list' IteratorBlock nodes."); //$NON-NLS-1$
+ throw new TemplateBuilderException ("Unsupported CSV template IteratorBlock type '" + description + "'. Currently only support 'list' IteratorBlock nodes."); //$NON-NLS-1$ //$NON-NLS-2$
}
return templateNode;
} else {
@@ -196,7 +196,7 @@
template.append('\n');
}
- template.append("<#list " + collectionMapping.getSrcPath() + " as " + collectionMapping.getCollectionItemName() + ">\n"); //$NON-NLS-1$
+ template.append("<#list " + collectionMapping.getSrcPath() + " as " + collectionMapping.getCollectionItemName() + ">\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
int fieldIndex = 0;
for(int i = 0; i < nodeList.getLength(); i++) {
Node node = nodeList.item(i);
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/exception/UnmappedCollectionNodeException.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/exception/UnmappedCollectionNodeException.java 2010-02-04 15:38:00 UTC (rev 20129)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/exception/UnmappedCollectionNodeException.java 2010-02-04 15:38:58 UTC (rev 20130)
@@ -31,7 +31,7 @@
private Element unmappedCollectionNode;
public UnmappedCollectionNodeException(Element unmappedCollectionNode) {
- super("Unmapped collection node '" + DomUtils.getName(unmappedCollectionNode) + "'."); //$NON-NLS-1$
+ super("Unmapped collection node '" + DomUtils.getName(unmappedCollectionNode) + "'."); //$NON-NLS-1$ //$NON-NLS-2$
this.unmappedCollectionNode = unmappedCollectionNode;
}
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-02-04 15:38:00 UTC (rev 20129)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/util/FreeMarkerUtil.java 2010-02-04 15:38:58 UTC (rev 20130)
@@ -61,14 +61,14 @@
splitTokens[0] = splitTokens[0].substring(0, splitTokens[0].length() - 1);
}
} else {
- throw new TemplateBuilderException("Unsupported FreeMarker variable syntax '" + dollarVariable + "'."); //$NON-NLS-1$
+ throw new TemplateBuilderException("Unsupported FreeMarker variable syntax '" + dollarVariable + "'."); //$NON-NLS-1$ //$NON-NLS-2$
}
return splitTokens;
}
public static boolean isDollarVariable(String variable) {
- return (variable.startsWith("${") && variable.endsWith("}")); //$NON-NLS-1$
+ return (variable.startsWith("${") && variable.endsWith("}")); //$NON-NLS-1$ //$NON-NLS-2$
}
public static String toFreeMarkerVariable(ValueMapping mapping) {
@@ -80,12 +80,12 @@
encodeProperties = new Properties();
}
- builder.append("${" + mapping.getSrcPath() + "!?");
+ builder.append("${" + mapping.getSrcPath() + "!?"); //$NON-NLS-1$ //$NON-NLS-2$
rawFormatting = encodeProperties.getProperty(ValueMapping.RAW_FORMATING_KEY);
if(rawFormatting != null) {
builder.append(rawFormatting);
- builder.append("}");
+ builder.append("}"); //$NON-NLS-1$
} else {
Class<?> valueType = mapping.getValueType();
if(valueType != null) {
@@ -93,19 +93,19 @@
if(valueType == java.util.Date.class) {
String format = encodeProperties.getProperty(DateDecoder.FORMAT);
if(format != null) {
- builder.append("string('" + format + "')}");
+ builder.append("string('" + format + "')}"); //$NON-NLS-1$ //$NON-NLS-2$
} else {
- builder.append("string.medium}");
+ builder.append("string.medium}"); //$NON-NLS-1$
}
} else if(Number.class.isAssignableFrom(valueType)) {
- builder.append("c}");
+ builder.append("c}"); //$NON-NLS-1$
} else if(valueType == Double.TYPE || valueType == Float.TYPE || valueType == Integer.TYPE || valueType == Long.TYPE || valueType == Short.TYPE) {
- builder.append("c}");
+ builder.append("c}"); //$NON-NLS-1$
} else {
- builder.append("string}");
+ builder.append("string}"); //$NON-NLS-1$
}
} else {
- builder.append("string}");
+ builder.append("string}"); //$NON-NLS-1$
}
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/xml/XMLFreeMarkerTemplateBuilder.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/xml/XMLFreeMarkerTemplateBuilder.java 2010-02-04 15:38:00 UTC (rev 20129)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/xml/XMLFreeMarkerTemplateBuilder.java 2010-02-04 15:38:58 UTC (rev 20130)
@@ -138,7 +138,7 @@
if(mapping instanceof CollectionMapping) {
collectionMapping = (CollectionMapping) mapping;
TemplateBuilder.writeIndent(indent, templateWriter);
- templateWriter.write("<#list " + collectionMapping.getSrcPath() + " as " + collectionMapping.getCollectionItemName() + ">\n"); //$NON-NLS-1$
+ templateWriter.write("<#list " + collectionMapping.getSrcPath() + " as " + collectionMapping.getCollectionItemName() + ">\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
TemplateBuilder.writeIndent(indent, templateWriter);
@@ -334,11 +334,11 @@
// We need to rewrite the FreeMarker template so as to get rid of the FreeMarker constructs,
// such as <#list> etc. We convert these to XML elements in the ModelBuilder.NAMESPACE namespace.
- if(element.getNodeName().equals("IteratorBlock")) {
+ if(element.getNodeName().equals("IteratorBlock")) { //$NON-NLS-1$
String description = element.getDescription();
if(!description.startsWith("list")) { //$NON-NLS-1$
- throw new TemplateBuilderException ("Unsupported XML template IteratorBlock type '" + description + "'. Currently only support 'list' IteratorBlock nodes."); //$NON-NLS-1$
+ throw new TemplateBuilderException ("Unsupported XML template IteratorBlock type '" + description + "'. Currently only support 'list' IteratorBlock nodes."); //$NON-NLS-1$ //$NON-NLS-2$
}
String[] tokens = description.split(" +?"); //$NON-NLS-1$
@@ -358,7 +358,7 @@
rewriteTemplateElement(children.nextElement(), templateRewriteBuffer);
}
} else {
- if(element.getClass().getSimpleName().equals("DollarVariable")) {
+ if(element.getClass().getSimpleName().equals("DollarVariable")) { //$NON-NLS-1$
templateRewriteBuffer.append(element.toString());
} else {
templateRewriteBuffer.append(element.getCanonicalForm());
16 years, 2 months