JBoss Tools SVN: r2636 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-07-24 13:21:40 -0400 (Tue, 24 Jul 2007)
New Revision: 2636
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/InnerModelHelper.java
Log:
avoid NPE being thrown by manual checking for error
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/InnerModelHelper.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/InnerModelHelper.java 2007-07-24 17:20:36 UTC (rev 2635)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/InnerModelHelper.java 2007-07-24 17:21:40 UTC (rev 2636)
@@ -5,6 +5,7 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
import org.eclipse.jst.ws.internal.common.J2EEUtils;
+import org.eclipse.wst.common.componentcore.ComponentCore;
import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.XModelConstants;
import org.jboss.tools.common.model.XModelObject;
@@ -23,12 +24,11 @@
IPath webInfPath = null;
- try {
+ if(ComponentCore.createComponent(project)!=null) {
webInfPath = J2EEUtils.getWebInfPath(project);
- } catch (Exception e) {
- //ignore
}
+
if(webInfPath == null) return model;
IFolder webInfFolder = ResourcesPlugin.getWorkspace().getRoot().getFolder(webInfPath);
17 years, 5 months
JBoss Tools SVN: r2635 - trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/xpl.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-07-24 13:20:36 -0400 (Tue, 24 Jul 2007)
New Revision: 2635
Modified:
trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/xpl/ToggleOccurencesMarkUpAction.java
Log:
NPE was occurring at line constantly. now chekked just to not make it ignore it.
Modified: trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/xpl/ToggleOccurencesMarkUpAction.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/xpl/ToggleOccurencesMarkUpAction.java 2007-07-24 16:19:59 UTC (rev 2634)
+++ trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/xpl/ToggleOccurencesMarkUpAction.java 2007-07-24 17:20:36 UTC (rev 2635)
@@ -154,7 +154,9 @@
try {
// determine if action should be enabled or not
- markOccurences = fPreferenceStore.getBoolean(fKey);
+ if(fPreferenceStore!=null) {
+ markOccurences = fPreferenceStore.getBoolean(fKey);
+ }
enabled = (getTextEditor() != null);
} catch (Exception x) {
}
17 years, 5 months
JBoss Tools SVN: r2634 - trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/core.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-07-24 12:19:59 -0400 (Tue, 24 Jul 2007)
New Revision: 2634
Modified:
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/core/PropertyListFormLayoutData.java
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/core/SeamComponentsCoreFormLayoutData.java
Log:
EXIN-326 - xmodel objects for core:filter implemented
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/core/PropertyListFormLayoutData.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/core/PropertyListFormLayoutData.java 2007-07-24 16:19:34 UTC (rev 2633)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/core/PropertyListFormLayoutData.java 2007-07-24 16:19:59 UTC (rev 2634)
@@ -36,6 +36,9 @@
static String ENT_ENTITY_MANAGER_FACTORY = "SeamCoreEntityManagerFactory";
static String ENT_PERSISTENCE_UNIT_PROPERTIES = "SeamCorePersistenceUnitProperties";
+
+ static String ENT_FILTER = "SeamCoreFilter";
+ static String ENT_PARAMETERS = "SeamCoreParameters";
private static IFormData createListDefinition(String header) {
return new FormData(
@@ -174,6 +177,19 @@
final static IFormData ENTITY_MANAGER_FACTORY_FORM_DEFINITION = new FormData(
ENT_ENTITY_MANAGER_FACTORY, new String[]{null}, ENTITY_MANAGER_FACTORY_DEFINITIONS);
+ private final static IFormData[] PARAMETERS_DEFINITIONS = new IFormData[] {
+ createMapDefinition("Parameters")
+ };
+
+ final static IFormData PARAMETERS_FORM_DEFINITION = new FormData(
+ ENT_PARAMETERS, new String[]{null}, PARAMETERS_DEFINITIONS);
+
+ private final static IFormData[] FILTER_DEFINITIONS =
+ createDefinitionsForMapHolder("Filter", ENT_FILTER, "Parameters", "parameters");
+
+ final static IFormData FILTER_FORM_DEFINITION = new FormData(
+ ENT_FILTER, new String[]{null}, FILTER_DEFINITIONS);
+
/**
* Theme
*/
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/core/SeamComponentsCoreFormLayoutData.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/core/SeamComponentsCoreFormLayoutData.java 2007-07-24 16:19:34 UTC (rev 2633)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/core/SeamComponentsCoreFormLayoutData.java 2007-07-24 16:19:59 UTC (rev 2634)
@@ -46,6 +46,9 @@
PropertyListFormLayoutData.ENTITY_MANAGER_FACTORY_FORM_DEFINITION,
PropertyListFormLayoutData.PERSISTENCE_UNIT_PROPERTIES_FORM_DEFINITION,
+
+ PropertyListFormLayoutData.FILTER_FORM_DEFINITION,
+ PropertyListFormLayoutData.PARAMETERS_FORM_DEFINITION,
};
17 years, 5 months
JBoss Tools SVN: r2633 - trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-07-24 12:19:34 -0400 (Tue, 24 Jul 2007)
New Revision: 2633
Modified:
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-core.meta
Log:
EXIN-326 - xmodel objects for core:filter implemented
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-core.meta
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-core.meta 2007-07-24 15:39:02 UTC (rev 2632)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-core.meta 2007-07-24 16:19:34 UTC (rev 2633)
@@ -313,6 +313,63 @@
<XDependencies/>
</XModelEntity>
<XModelEntity ImplementingClass="%Custom%"
+ PROPERTIES="formFactoryClassName=org.jboss.tools.common.model.ui.forms.LayouredFormFactory;formLayoutDataClassName=org.jboss.tools.seam.xml.ui.editor.form.core.SeamComponentsCoreFormLayoutData"
+ XMLSUBPATH="core:filter" name="SeamCoreFilter">
+ <XChildrenEntities>
+ <XChildEntity maxCount="1" name="SeamCoreParameters" required="yes"/>
+ </XChildrenEntities>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.seam.core.timeZoneSelector" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="entity manager factory"
+ loader="ElementType" name="element type">
+ <Constraint/>
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttributeReference
+ attributes="name,class,scope,precedence,installed,auto-create"
+ entity="SeamComponent" name="component"/>
+ <XModelAttribute PROPERTIES="category=general" name="filter name" xmlname="core:name.#text">
+ <Constraint/>
+ <Editor/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=advanced" name="enabled" xmlname="enabled">
+ <Constraint/>
+ <Editor/>
+ </XModelAttribute>
+ <XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
+ <Constraint/>
+ <Editor name="Note"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem kind="list" name="CreateActions"/>
+ <XActionItem ICON="action.empty" displayName="Create" kind="list" name="EditActions"/>
+ <XActionItem ICON="action.copy" displayName="Copy" kind="list" name="CopyActions">
+ <XActionItem BaseActionName="Copy" HandlerClassName="%Copy%"
+ ICON="action.copy" displayName="Copy" kind="action" name="Copy"/>
+ <XActionItem BaseActionName="Cut" HandlerClassName="%Cut%"
+ ICON="action.cut" displayName="Cut" kind="action" name="Cut"/>
+ </XActionItem>
+ <XActionItem ICON="action.delete" displayName="Delete" kind="list" name="DeleteActions">
+ <XActionItem BaseActionName="Delete" HandlerClassName="%Delete%"
+ ICON="action.delete" displayName="Delete" kind="action" name="Delete"/>
+ </XActionItem>
+ <XActionItem ICON="action.empty" kind="list" name="Properties">
+ <XActionItem HandlerClassName="%Properties%" ICON="action.empty"
+ displayName="Properties..." kind="action" name="Properties"/>
+ </XActionItem>
+ <XActionItem displayName="move" kind="list" name="MoveActions">
+ <XActionItem HIDE="always" HandlerClassName="%Move%"
+ ICON="action.move" displayName="Move" kind="action" name="Move"/>
+ </XActionItem>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity ImplementingClass="%Custom%"
PROPERTIES="formFactoryClassName=org.jboss.tools.common.model.ui.forms.LayouredFormFactory;formLayoutDataClassName=org.jboss.tools.seam.xml.ui.editor.form.core.SeamComponentsCoreFormLayoutData;children=%Ordered%;childrenLoader=list;saveDefault=false"
XMLSUBPATH="core:filters" name="SeamCoreFilters">
<XChildrenEntities>
@@ -896,6 +953,67 @@
</XModelEntity>
<XModelEntity ImplementingClass="%Custom%"
PROPERTIES="formFactoryClassName=org.jboss.tools.common.model.ui.forms.LayouredFormFactory;formLayoutDataClassName=org.jboss.tools.seam.xml.ui.editor.form.core.SeamComponentsCoreFormLayoutData;children=%Ordered%;childrenLoader=map;saveDefault=false"
+ XMLSUBPATH="core:parameters" name="SeamCoreParameters">
+ <XChildrenEntities>
+ <XChildEntity name="SeamMapEntry"/>
+ </XChildrenEntities>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.seam.property" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="parameters" loader="ElementType" name="element type">
+ <Constraint/>
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="id=true;category=general"
+ default="parameters" name="name">
+ <Constraint/>
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
+ <Constraint/>
+ <Editor name="Note"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem kind="list" name="CreateActions">
+ <XActionItem HandlerClassName="%Create%" ICON="action.empty"
+ WizardClassName="%Default%" displayName="Add Entry..."
+ kind="action" name="AddEntry">
+ <EntityData EntityName="SeamMapEntry">
+ <AttributeData AttributeName="key"/>
+ <AttributeData AttributeName="value"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ <XActionItem ICON="action.newclass" displayName="Create" kind="list" name="EditActions"/>
+ <XActionItem ICON="action.copy" displayName="Copy" kind="list" name="CopyActions">
+ <XActionItem BaseActionName="Copy" HandlerClassName="%Copy%"
+ ICON="action.copy" displayName="Copy" kind="action" name="Copy"/>
+ <XActionItem BaseActionName="Cut" HandlerClassName="%Cut%"
+ ICON="action.cut" displayName="Cut" kind="action" name="Cut"/>
+ <XActionItem BaseActionName="Paste" HandlerClassName="%Paste%"
+ ICON="action.paste" displayName="Paste" kind="action" name="Paste"/>
+ </XActionItem>
+ <XActionItem ICON="action.delete" displayName="Delete" kind="list" name="DeleteActions">
+ <XActionItem BaseActionName="Delete" HandlerClassName="%Delete%"
+ ICON="action.delete" displayName="Delete" kind="action" name="Delete"/>
+ </XActionItem>
+ <XActionItem ICON="action.empty" kind="list" name="Properties">
+ <XActionItem HandlerClassName="%Properties%" ICON="action.empty"
+ displayName="Properties..." kind="action" name="Properties"/>
+ </XActionItem>
+ <XActionItem displayName="move" kind="list" name="MoveActions">
+ <XActionItem HIDE="always" HandlerClassName="%Move%"
+ ICON="action.move" displayName="Move" kind="action" name="Move"/>
+ </XActionItem>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity ImplementingClass="%Custom%"
+ PROPERTIES="formFactoryClassName=org.jboss.tools.common.model.ui.forms.LayouredFormFactory;formLayoutDataClassName=org.jboss.tools.seam.xml.ui.editor.form.core.SeamComponentsCoreFormLayoutData;children=%Ordered%;childrenLoader=map;saveDefault=false"
XMLSUBPATH="core:persistence-unit-properties" name="SeamCorePersistenceUnitProperties">
<XChildrenEntities>
<XChildEntity name="SeamMapEntry"/>
@@ -1260,6 +1378,7 @@
<XChildEntity name="SeamCoreTimeZoneSelector"/>
<XChildEntity name="SeamCoreManagedPersistenceContext"/>
<XChildEntity name="SeamCoreEntityManagerFactory"/>
+ <XChildEntity name="SeamCoreFilter"/>
</XChildrenEntities>
<XActionItem kind="list">
<XActionItem ICON="action.empty" displayName="New" group="1"
@@ -1383,6 +1502,14 @@
<AttributeData AttributeName="persistence-unit-name" Mandatory="no"/>
</EntityData>
</XActionItem>
+ <XActionItem HandlerClassName="%Create%" ICON="action.empty"
+ PROPERTIES="validator.add=true" WizardClassName="%Default%"
+ displayName="Filter..." kind="action" name="AddFilter">
+ <EntityData EntityName="SeamCoreFilter">
+ <AttributeData AttributeName="name"/>
+ <AttributeData AttributeName="filter name" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
</XActionItem>
</XActionItem>
</XActionItem>
@@ -1511,6 +1638,14 @@
<AttributeData AttributeName="persistence-unit-name" Mandatory="no"/>
</EntityData>
</XActionItem>
+ <XActionItem HandlerClassName="%Create%" ICON="action.empty"
+ PROPERTIES="validator.add=true" WizardClassName="%Default%"
+ displayName="Filter..." kind="action" name="AddFilter">
+ <EntityData EntityName="SeamCoreFilter">
+ <AttributeData AttributeName="name"/>
+ <AttributeData AttributeName="filter name" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
</XActionItem>
</XActionItem>
</XActionItem>
17 years, 5 months
JBoss Tools SVN: r2631 - trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/legacy.
by jbosstools-commits@lists.jboss.org
Author: mdryakhlenkov
Date: 2007-07-24 10:39:49 -0400 (Tue, 24 Jul 2007)
New Revision: 2631
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/legacy/CustomPersister.java
Log:
Added: trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/legacy/CustomPersister.java
===================================================================
--- trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/legacy/CustomPersister.java (rev 0)
+++ trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/legacy/CustomPersister.java 2007-07-24 14:39:49 UTC (rev 2631)
@@ -0,0 +1,627 @@
+//$Id: CustomPersister.java 11061 2007-01-19 12:55:07Z steve.ebersole(a)jboss.com $
+package mapping.legacy;
+
+import java.io.Serializable;
+import java.util.Hashtable;
+import java.util.Map;
+import java.util.Comparator;
+
+import org.hibernate.EntityMode;
+import org.hibernate.Hibernate;
+import org.hibernate.HibernateException;
+import org.hibernate.LockMode;
+import org.hibernate.MappingException;
+import org.hibernate.cache.CacheConcurrencyStrategy;
+import org.hibernate.cache.entry.CacheEntryStructure;
+import org.hibernate.cache.entry.UnstructuredCacheEntry;
+import org.hibernate.engine.CascadeStyle;
+import org.hibernate.engine.EntityKey;
+import org.hibernate.engine.Mapping;
+import org.hibernate.engine.SessionFactoryImplementor;
+import org.hibernate.engine.SessionImplementor;
+import org.hibernate.engine.TwoPhaseLoad;
+import org.hibernate.event.EventSource;
+import org.hibernate.event.PostLoadEvent;
+import org.hibernate.event.PreLoadEvent;
+import org.hibernate.id.IdentifierGenerator;
+import org.hibernate.id.UUIDHexGenerator;
+import org.hibernate.mapping.PersistentClass;
+import org.hibernate.metadata.ClassMetadata;
+import org.hibernate.persister.entity.EntityPersister;
+import org.hibernate.sql.QuerySelect;
+import org.hibernate.sql.Select;
+import org.hibernate.type.Type;
+import org.hibernate.type.VersionType;
+import org.hibernate.util.EqualsHelper;
+
+public class CustomPersister implements EntityPersister {
+
+ private static final Hashtable INSTANCES = new Hashtable();
+ private static final IdentifierGenerator GENERATOR = new UUIDHexGenerator();
+
+ private SessionFactoryImplementor factory;
+
+ public CustomPersister(
+ PersistentClass model,
+ CacheConcurrencyStrategy cache,
+ SessionFactoryImplementor factory,
+ Mapping mapping) {
+ this.factory = factory;
+ }
+
+ public boolean hasLazyProperties() {
+ return false;
+ }
+
+ private void checkEntityMode(EntityMode entityMode) {
+ if ( EntityMode.POJO != entityMode ) {
+ throw new IllegalArgumentException( "Unhandled EntityMode : " + entityMode );
+ }
+ }
+
+ public boolean isInherited() {
+ return false;
+ }
+
+ public SessionFactoryImplementor getFactory() {
+ return factory;
+ }
+
+ public Class getMappedClass() {
+ return Custom.class;
+ }
+
+ public void postInstantiate() throws MappingException {}
+
+ public String getEntityName() {
+ return Custom.class.getName();
+ }
+
+ public boolean isSubclassEntityName(String entityName) {
+ return Custom.class.getName().equals(entityName);
+ }
+
+ public boolean hasProxy() {
+ return false;
+ }
+
+ public boolean hasCollections() {
+ return false;
+ }
+
+ public boolean hasCascades() {
+ return false;
+ }
+
+ public boolean isMutable() {
+ return true;
+ }
+
+ public boolean isSelectBeforeUpdateRequired() {
+ return false;
+ }
+
+ public boolean isIdentifierAssignedByInsert() {
+ return false;
+ }
+
+ public Boolean isTransient(Object object, SessionImplementor session) {
+ return new Boolean( ( (Custom) object ).id==null );
+ }
+
+ public Object[] getPropertyValuesToInsert(Object object, Map mergeMap, SessionImplementor session)
+ throws HibernateException {
+ return getPropertyValues( object, session.getEntityMode() );
+ }
+
+ public void processInsertGeneratedProperties(Serializable id, Object entity, Object[] state, SessionImplementor session) {
+ }
+
+ public void processUpdateGeneratedProperties(Serializable id, Object entity, Object[] state, SessionImplementor session) {
+ }
+
+ public void retrieveGeneratedProperties(Serializable id, Object entity, Object[] state, SessionImplementor session) {
+ throw new UnsupportedOperationException();
+ }
+
+ public Class getMappedClass(EntityMode entityMode) {
+ checkEntityMode( entityMode );
+ return Custom.class;
+ }
+
+ public boolean implementsLifecycle(EntityMode entityMode) {
+ checkEntityMode( entityMode );
+ return false;
+ }
+
+ public boolean implementsValidatable(EntityMode entityMode) {
+ checkEntityMode( entityMode );
+ return false;
+ }
+
+ public Class getConcreteProxyClass(EntityMode entityMode) {
+ checkEntityMode( entityMode );
+ return Custom.class;
+ }
+
+ public void setPropertyValues(Object object, Object[] values, EntityMode entityMode) throws HibernateException {
+ checkEntityMode( entityMode );
+ setPropertyValue( object, 0, values[0], entityMode );
+ }
+
+ public void setPropertyValue(Object object, int i, Object value, EntityMode entityMode) throws HibernateException {
+ checkEntityMode( entityMode );
+ ( (Custom) object ).setName( (String) value );
+ }
+
+ public Object[] getPropertyValues(Object object, EntityMode entityMode) throws HibernateException {
+ checkEntityMode( entityMode );
+ Custom c = (Custom) object;
+ return new Object[] { c.getName() };
+ }
+
+ public Object getPropertyValue(Object object, int i, EntityMode entityMode) throws HibernateException {
+ checkEntityMode( entityMode );
+ return ( (Custom) object ).getName();
+ }
+
+ public Object getPropertyValue(Object object, String propertyName, EntityMode entityMode) throws HibernateException {
+ checkEntityMode( entityMode );
+ return ( (Custom) object ).getName();
+ }
+
+ public Serializable getIdentifier(Object object, EntityMode entityMode) throws HibernateException {
+ checkEntityMode( entityMode );
+ return ( (Custom) object ).id;
+ }
+
+ public void setIdentifier(Object object, Serializable id, EntityMode entityMode) throws HibernateException {
+ checkEntityMode( entityMode );
+ ( (Custom) object ).id = (String) id;
+ }
+
+ public Object getVersion(Object object, EntityMode entityMode) throws HibernateException {
+ checkEntityMode( entityMode );
+ return null;
+ }
+
+ public Object instantiate(Serializable id, EntityMode entityMode) throws HibernateException {
+ checkEntityMode( entityMode );
+ Custom c = new Custom();
+ c.id = (String) id;
+ return c;
+ }
+
+ public boolean isInstance(Object object, EntityMode entityMode) {
+ checkEntityMode( entityMode );
+ return object instanceof Custom;
+ }
+
+ public boolean hasUninitializedLazyProperties(Object object, EntityMode entityMode) {
+ checkEntityMode( entityMode );
+ return false;
+ }
+
+ public void resetIdentifier(Object entity, Serializable currentId, Object currentVersion, EntityMode entityMode) {
+ checkEntityMode( entityMode );
+ ( ( Custom ) entity ).id = ( String ) currentId;
+ }
+
+ public EntityPersister getSubclassEntityPersister(Object instance, SessionFactoryImplementor factory, EntityMode entityMode) {
+ checkEntityMode( entityMode );
+ return this;
+ }
+
+ public int[] findDirty(
+ Object[] x,
+ Object[] y,
+ Object owner,
+ SessionImplementor session
+ ) throws HibernateException {
+ if ( !EqualsHelper.equals( x[0], y[0] ) ) {
+ return new int[] { 0 };
+ }
+ else {
+ return null;
+ }
+ }
+
+ public int[] findModified(
+ Object[] x,
+ Object[] y,
+ Object owner,
+ SessionImplementor session
+ ) throws HibernateException {
+ if ( !EqualsHelper.equals( x[0], y[0] ) ) {
+ return new int[] { 0 };
+ }
+ else {
+ return null;
+ }
+ }
+
+ /**
+ * @see EntityPersister#hasIdentifierProperty()
+ */
+ public boolean hasIdentifierProperty() {
+ return true;
+ }
+
+ /**
+ * @see EntityPersister#isVersioned()
+ */
+ public boolean isVersioned() {
+ return false;
+ }
+
+ /**
+ * @see EntityPersister#getVersionType()
+ */
+ public VersionType getVersionType() {
+ return null;
+ }
+
+ /**
+ * @see EntityPersister#getVersionProperty()
+ */
+ public int getVersionProperty() {
+ return 0;
+ }
+
+ /**
+ * @see EntityPersister#getIdentifierGenerator()
+ */
+ public IdentifierGenerator getIdentifierGenerator()
+ throws HibernateException {
+ return GENERATOR;
+ }
+
+ /**
+ * @see EntityPersister#load(Serializable, Object, LockMode, SessionImplementor)
+ */
+ public Object load(
+ Serializable id,
+ Object optionalObject,
+ LockMode lockMode,
+ SessionImplementor session
+ ) throws HibernateException {
+
+ // fails when optional object is supplied
+
+ Custom clone = null;
+ Custom obj = (Custom) INSTANCES.get(id);
+ if (obj!=null) {
+ clone = (Custom) obj.clone();
+ TwoPhaseLoad.addUninitializedEntity(
+ new EntityKey( id, this, session.getEntityMode() ),
+ clone,
+ this,
+ LockMode.NONE,
+ false,
+ session
+ );
+ TwoPhaseLoad.postHydrate(
+ this, id,
+ new String[] { obj.getName() },
+ null,
+ clone,
+ LockMode.NONE,
+ false,
+ session
+ );
+ TwoPhaseLoad.initializeEntity(
+ clone,
+ false,
+ session,
+ new PreLoadEvent( (EventSource) session ),
+ new PostLoadEvent( (EventSource) session )
+ );
+ }
+ return clone;
+ }
+
+ /**
+ * @see EntityPersister#lock(Serializable, Object, Object, LockMode, SessionImplementor)
+ */
+ public void lock(
+ Serializable id,
+ Object version,
+ Object object,
+ LockMode lockMode,
+ SessionImplementor session
+ ) throws HibernateException {
+
+ throw new UnsupportedOperationException();
+ }
+
+ public void insert(
+ Serializable id,
+ Object[] fields,
+ Object object,
+ SessionImplementor session
+ ) throws HibernateException {
+
+ INSTANCES.put(id, ( (Custom) object ).clone() );
+ }
+
+ public Serializable insert(Object[] fields, Object object, SessionImplementor session)
+ throws HibernateException {
+
+ throw new UnsupportedOperationException();
+ }
+
+ public void delete(
+ Serializable id,
+ Object version,
+ Object object,
+ SessionImplementor session
+ ) throws HibernateException {
+
+ INSTANCES.remove(id);
+ }
+
+ /**
+ * @see EntityPersister
+ */
+ public void update(
+ Serializable id,
+ Object[] fields,
+ int[] dirtyFields,
+ boolean hasDirtyCollection,
+ Object[] oldFields,
+ Object oldVersion,
+ Object object,
+ Object rowId,
+ SessionImplementor session
+ ) throws HibernateException {
+
+ INSTANCES.put( id, ( (Custom) object ).clone() );
+
+ }
+
+ private static final Type[] TYPES = new Type[] { Hibernate.STRING };
+ private static final String[] NAMES = new String[] { "name" };
+ private static final boolean[] MUTABILITY = new boolean[] { true };
+ private static final boolean[] GENERATION = new boolean[] { false };
+
+ /**
+ * @see EntityPersister#getPropertyTypes()
+ */
+ public Type[] getPropertyTypes() {
+ return TYPES;
+ }
+
+ /**
+ * @see EntityPersister#getPropertyNames()
+ */
+ public String[] getPropertyNames() {
+ return NAMES;
+ }
+
+ /**
+ * @see EntityPersister#getPropertyCascadeStyles()
+ */
+ public CascadeStyle[] getPropertyCascadeStyles() {
+ return null;
+ }
+
+ /**
+ * @see EntityPersister#getIdentifierType()
+ */
+ public Type getIdentifierType() {
+ return Hibernate.STRING;
+ }
+
+ /**
+ * @see EntityPersister#getIdentifierPropertyName()
+ */
+ public String getIdentifierPropertyName() {
+ return "id";
+ }
+
+ /**
+ * @see EntityPersister#hasCache()
+ */
+ public boolean hasCache() {
+ return false;
+ }
+
+ /**
+ * @see EntityPersister#getCache()
+ */
+ public CacheConcurrencyStrategy getCache() {
+ return null;
+ }
+
+ /**
+ * @see EntityPersister#getRootEntityName()
+ */
+ public String getRootEntityName() {
+ return "CUSTOMS";
+ }
+
+ public Serializable[] getPropertySpaces() {
+ return new String[] { "CUSTOMS" };
+ }
+
+ public Serializable[] getQuerySpaces() {
+ return new String[] { "CUSTOMS" };
+ }
+
+ /**
+ * @see EntityPersister#getClassMetadata()
+ */
+ public ClassMetadata getClassMetadata() {
+ return null;
+ }
+
+ public boolean[] getPropertyUpdateability() {
+ return MUTABILITY;
+ }
+
+ public boolean[] getPropertyCheckability() {
+ return MUTABILITY;
+ }
+
+ /**
+ * @see EntityPersister#getPropertyInsertability()
+ */
+ public boolean[] getPropertyInsertability() {
+ return MUTABILITY;
+ }
+
+
+ public boolean canExtractIdOutOfEntity() {
+ return true;
+ }
+
+ public boolean isBatchLoadable() {
+ return false;
+ }
+
+ public Type getPropertyType(String propertyName) {
+ throw new UnsupportedOperationException();
+ }
+
+ public Object getPropertyValue(Object object, String propertyName)
+ throws HibernateException {
+ throw new UnsupportedOperationException();
+ }
+
+ public Object createProxy(Serializable id, SessionImplementor session)
+ throws HibernateException {
+ throw new UnsupportedOperationException("no proxy for this class");
+ }
+
+ public Object getCurrentVersion(
+ Serializable id,
+ SessionImplementor session)
+ throws HibernateException {
+
+ return INSTANCES.get(id);
+ }
+
+ public Object forceVersionIncrement(Serializable id, Object currentVersion, SessionImplementor session)
+ throws HibernateException {
+ return null;
+ }
+
+ public EntityMode guessEntityMode(Object object) {
+ if ( !isInstance(object, EntityMode.POJO) ) {
+ return null;
+ }
+ else {
+ return EntityMode.POJO;
+ }
+ }
+
+ public boolean[] getPropertyNullability() {
+ return MUTABILITY;
+ }
+
+ public boolean isDynamic() {
+ return false;
+ }
+
+ public boolean isCacheInvalidationRequired() {
+ return false;
+ }
+
+ public void applyFilters(QuerySelect select, String alias, Map filters) {
+ }
+
+ public void applyFilters(Select select, String alias, Map filters) {
+ }
+
+
+ public void afterInitialize(Object entity, boolean fetched, SessionImplementor session) {
+ }
+
+ public void afterReassociate(Object entity, SessionImplementor session) {
+ }
+
+ public Object[] getDatabaseSnapshot(Serializable id, SessionImplementor session)
+ throws HibernateException {
+ return null;
+ }
+
+ public boolean[] getPropertyVersionability() {
+ return MUTABILITY;
+ }
+
+ public CacheEntryStructure getCacheEntryStructure() {
+ return new UnstructuredCacheEntry();
+ }
+
+ public boolean hasSubselectLoadableCollections() {
+ return false;
+ }
+
+ public int[] getNaturalIdentifierProperties() {
+ return null;
+ }
+
+ public Type[] getNaturalIdentifierTypes() {
+ return null;
+ }
+
+ public boolean hasNaturalIdentifier() {
+ return false;
+ }
+
+ public boolean hasMutableProperties() {
+ return false;
+ }
+
+ public boolean isInstrumented(EntityMode entityMode) {
+ return false;
+ }
+
+ public boolean hasInsertGeneratedProperties() {
+ return false;
+ }
+
+ public boolean hasUpdateGeneratedProperties() {
+ return false;
+ }
+
+ public boolean[] getPropertyLaziness() {
+ return null;
+ }
+
+ public boolean isLazyPropertiesCacheable() {
+ return true;
+ }
+
+ public boolean hasGeneratedProperties() {
+ return false;
+ }
+
+ public boolean isVersionPropertyGenerated() {
+ return false;
+ }
+
+ public Object[] getNaturalIdentifierSnapshot(Serializable id, SessionImplementor session) throws HibernateException {
+ return null;
+ }
+
+ public Comparator getVersionComparator() {
+ return null;
+ }
+
+ public boolean[] getPropertyInsertGeneration() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean[] getPropertyUpdateGeneration() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean hasIdentifierPropertyOrEmbeddedCompositeIdentifier() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+}
17 years, 5 months
JBoss Tools SVN: r2630 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2007-07-24 10:18:21 -0400 (Tue, 24 Jul 2007)
New Revision: 2630
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmDiagram.java
Log:
http://jira.jboss.com/jira/browse/EXIN-365
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmDiagram.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmDiagram.java 2007-07-24 14:04:14 UTC (rev 2629)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmDiagram.java 2007-07-24 14:18:21 UTC (rev 2630)
@@ -339,10 +339,10 @@
}
public void setDirty(boolean dirty) {
- if(this.dirty != dirty) {
+ /*if(this.dirty != dirty) {
this.dirty = dirty;
firePropertyChange(DIRTY, null, null);
- }
+ }*/
}
public void processExpand(ExpandeableShape shape) {
17 years, 5 months
JBoss Tools SVN: r2629 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2007-07-24 10:04:14 -0400 (Tue, 24 Jul 2007)
New Revision: 2629
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/VisualEditor.java
Log:
http://jira.jboss.com/jira/browse/EXIN-402
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/VisualEditor.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/VisualEditor.java 2007-07-24 13:22:25 UTC (rev 2628)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/VisualEditor.java 2007-07-24 14:04:14 UTC (rev 2629)
@@ -17,8 +17,11 @@
import org.eclipse.gef.editparts.ScalableFreeformRootEditPart;
import org.eclipse.gef.requests.CreationFactory;
import org.eclipse.gef.requests.SimpleFactory;
+import org.eclipse.gef.ui.actions.ActionRegistry;
+import org.eclipse.gef.ui.actions.PrintAction;
import org.eclipse.gef.ui.actions.WorkbenchPartAction;
import org.eclipse.gef.ui.parts.GraphicalEditor;
+import org.eclipse.jface.action.IAction;
import org.eclipse.jface.util.TransferDropTargetListener;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
@@ -54,6 +57,7 @@
}
protected void createActions() {
+
getEditorSite().getActionBars().setGlobalActionHandler(ActionFactory.REFRESH.getId(),new WorkbenchPartAction(this){
protected boolean calculateEnabled() {
@@ -63,7 +67,10 @@
ormDiagram.refresh();
}
});
+
super.createActions();
+
+ getEditorSite().getActionBars().setGlobalActionHandler(ActionFactory.PRINT.getId(), getActionRegistry().getAction(ActionFactory.PRINT.getId()));
}
private TransferDropTargetListener createTransferDropTargetListener() {
17 years, 5 months
JBoss Tools SVN: r2628 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-07-24 09:22:25 -0400 (Tue, 24 Jul 2007)
New Revision: 2628
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamPreferences.java
Log:
http://jira.jboss.com/jira/browse/EXIN-327 Added some comments
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamPreferences.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamPreferences.java 2007-07-24 13:19:21 UTC (rev 2627)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamPreferences.java 2007-07-24 13:22:25 UTC (rev 2628)
@@ -47,39 +47,68 @@
public static final Set<String> severityOptionNames = new HashSet<String>();
//Components
+
+ // Duplicate names found in @Name annotations will be marked
public static final String NONUNIQUE_COMPONENT_NAME = createSeverityOption("nonUniqueComponentName");
+ // Components with @Stateful and without @Remove methods will be marked
public static final String STATEFUL_COMPONENT_DOES_NOT_CONTENT_REMOVE = createSeverityOption("statefulComponentDoesNotContainRemove");
+ // Components with @Stateful and without @Destroy methods will be marked
public static final String STATEFUL_COMPONENT_DOES_NOT_CONTENT_DESTROY = createSeverityOption("statefulComponentDoesNotContainDestroy");
+ // Components with @Stateful can't have PAGE or STATELESS scopes. If it has wrong scope then component will be marked.
public static final String STATEFUL_COMPONENT_WRONG_SCOPE = createSeverityOption("statefulComponentHasWrongScope");
+ // If className ('component' element) contains unknown class name then component.xml will be marked.
public static final String UNKNOWN_COMPONENT_CLASS_NAME = createSeverityOption("unknownComponentClassName");
+ // If component/property@name contains some property name which does not have setter then mark it.
public static final String UNKNOWN_COMPONENT_PROPERTY = createSeverityOption("unknownComponentProperty");
//Entities
+
+ // Component marked as @Entity can't have STATELESS scope. If it has wrong scope mark it.
public static final String ENTITY_COMPONENT_WRONG_SCOPE = createSeverityOption("entityComponentHasWrongScope");
+ // Mark any duplicated @Remove methods within one component.
public static final String DUPLICATE_REMOVE = createSeverityOption("duplicateRemove");
//Component life-cycle methods
+
+ // Mark duplicated @Destroy methods within one component.
public static final String DUPLICATE_DESTROY = createSeverityOption("duplicateDestroy");
+ // Mark duplicated @Create methods within one component.
public static final String DUPLICATE_CREATE = createSeverityOption("duplicateCreate");
+ // Mark duplicated @Unwrap methods within one component.
public static final String DUPLICATE_UNWRAP = createSeverityOption("duplicateUnwrap");
+ // Mark all @Destroy methods which are not declared in components' classes.
public static final String DESTROY_DOESNT_BELONG_TO_COMPONENT = createSeverityOption("destroyDoesNotBelongToComponent");
+ // Mark all @Create methods which are not declared in components' classes.
public static final String CREATE_DOESNT_BELONG_TO_COMPONENT = createSeverityOption("createDoesNotBelongToComponent");
+ // Mark all @Unwrap methods which are not declared in components' classes.
public static final String UNWRAP_DOESNT_BELONG_TO_COMPONENT = createSeverityOption("unwrapDoesNotBelongToComponent");
+ // Mark all @Observer methods which are not declared in components' classes.
public static final String OBSERVER_DOESNT_BELONG_TO_COMPONENT = createSeverityOption("observerDoesNotBelongToComponent");
//Factories
+
+ // Factory method with a void return type must have an associated @Out/Databinder. Mark factory otherwise.
public static final String UNKNOWN_FACTORY_NAME = createSeverityOption("unknownFactoryName");
//Bijections
+
+ // @DataModelSelection and @DataModelSelectionIndex without name requires the only one @DataModel in the component. Mark @DataModelSelection or @DataModelSelectionIndex otherwise.
public static final String MULTIPLE_DATA_BINDER = createSeverityOption("multipleDataBinder");
+ // Mark @DataModelSelection or @DataModelSelectionIndex with unknown name. We should have @DataModel or @Out with the same name.
public static final String UNKNOWN_DATA_MODEL = createSeverityOption("unknownDataModel");
//Context variables
+
+ // If factory uses a name of any components (roles) or other factories then mark all these context variables' names.
public static final String DUPLICATE_VARIABLE_NAME = createSeverityOption("duplicateVariableName");
+ // If @In uses a unknown context variable name then mark it.
public static final String UNKNOWN_VARIABLE_NAME = createSeverityOption("unknownVariableName");
// Seam Expression language
+
+ // Mark Expressions which we can't resolve.
public static final String INVALID_EXPRESSION = createSeverityOption("invalidExpression");
+ // If Expression use property of component and this property has only setter(getter) without getter(setter) then mark it.
public static final String UNPAIRED_GETTER_OR_SETTER = createSeverityOption("unpairedGetterOrSetter");
private static String createSeverityOption(String shortName) {
@@ -105,7 +134,7 @@
public static IEclipsePreferences getInstancePreferences() {
return new InstanceScope().getNode(SeamCorePlugin.PLUGIN_ID);
}
-
+
public static String getProjectPreference(ISeamProject project, String key) {
IEclipsePreferences p = getProjectPreferences(project);
if(p == null) return null;
17 years, 5 months
JBoss Tools SVN: r2627 - in trunk/documentation/GettingStartedGuide/docs/userguide/en: modules and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: afedosik
Date: 2007-07-24 09:19:21 -0400 (Tue, 24 Jul 2007)
New Revision: 2627
Added:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/JDK_compliance.png
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/installjdkwindows1.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedWithRHDS.xml
Log:
http://jira.jboss.com/jira/browse/EXIN-354 JDK on Windows improving
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/JDK_compliance.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/JDK_compliance.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/installjdkwindows1.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedWithRHDS.xml
===================================================================
--- trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedWithRHDS.xml 2007-07-24 13:02:22 UTC (rev 2626)
+++ trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedWithRHDS.xml 2007-07-24 13:19:21 UTC (rev 2627)
@@ -59,6 +59,16 @@
</mediaobject>
</figure>
<para>After accepting the license agreement just follow the intuitive installation wizard's steps.</para>
+ <para>Finally, you need to make sure that Eclipse is set to the correct Java compliance. On the Eclipse menu bar, go to Window > Preferences > expand Java > Compiler and make sure that the "Compiler
+ compliance level" is set to 5.0 (or 6.0 for JDK 1.6.). See image:</para>
+ <figure>
+ <title>JDK Compliance</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/JDK_compliance.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
</section>
</section>
<section id="InstallingRHDS">
17 years, 5 months
JBoss Tools SVN: r2626 - trunk/jst/plugins/org.jboss.tools.jst.web/META-INF.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-07-24 09:02:22 -0400 (Tue, 24 Jul 2007)
New Revision: 2626
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/META-INF/MANIFEST.MF
Log:
http://jira.jboss.com/jira/browse/EXIN-302
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/META-INF/MANIFEST.MF 2007-07-24 12:57:31 UTC (rev 2625)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/META-INF/MANIFEST.MF 2007-07-24 13:02:22 UTC (rev 2626)
@@ -63,6 +63,7 @@
org.eclipse.pde.ui,
org.eclipse.core.runtime,
org.eclipse.ant.ui,
- org.eclipse.ui.externaltools
+ org.eclipse.ui.externaltools,
+ org.jboss.ide.seam.gen
Bundle-Version: 2.0.0
17 years, 5 months