JBoss Tools SVN: r3405 - in branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces: templates and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: ezheleznyakov
Date: 2007-08-29 12:14:41 -0400 (Wed, 29 Aug 2007)
New Revision: 3405
Added:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessageTemplate.java
Modified:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
Log:
Create <rich:message> template
Added: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessageTemplate.java
===================================================================
--- branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessageTemplate.java (rev 0)
+++ branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessageTemplate.java 2007-08-29 16:14:41 UTC (rev 3405)
@@ -0,0 +1,247 @@
+package org.jboss.tools.jsf.vpe.richfaces.template;
+
+import org.jboss.tools.jsf.vpe.richfaces.HtmlComponentUtil;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
+import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMText;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+/**
+ *
+ * @author ezheleznyakov(a)exadel.com
+ *
+ */
+public class RichFacesMessageTemplate extends VpeAbstractTemplate {
+
+ private static String PASSED_LABEL_ATTRIBUTE_NAME = "passedLabel";
+ private static String LABEL_CLASS_ATTRIBUTE_NAME = "labelClass";
+ private static String MARKER_CLASS_ATTRIBUTE_NAME = "markerClass";
+ private static String MARKER_STYLE_ATTRIBUTE_NAME = "markerStyle";
+
+ private static String ERROR_MARKER_CLASS_ATTRIBUTE_NAME = "errorMarkerClass";
+ private static String ERROR_LABEL_CLASS_ATTRIBUTE_NAME = "errorLabelClass";
+ private static String ERROR_CLASS_ATTRIBUTE_NAME = "errorClass";
+
+ private static String FATAL_MARKER_CLASS_ATTRIBUTE_NAME = "fatalMarkerClass";
+ private static String FATAL_LABEL_CLASS_ATTRIBUTE_NAME = "fatalLabelClass";
+ private static String FATAL_CLASS_ATTRIBUTE_NAME = "fatalClass";
+
+ private static String INFO_MARKER_CLASS_ATTRIBUTE_NAME = "infoMarkerClass";
+ private static String INFO_LABEL_CLASS_ATTRIBUTE_NAME = "infoLabelClass";
+ private static String INFO_CLASS_ATTRIBUTE_NAME = "infoClass";
+
+ private static String WARN_MARKER_CLASS_ATTRIBUTE_NAME = "warnMarkerClass";
+ private static String WARN_LABEL_CLASS_ATTRIBUTE_NAME = "warnLabelClass";
+ private static String WARN_CLASS_ATTRIBUTE_NAME = "warnClass";
+
+ private static String ERROR_MESSAGE = "Error message";
+ private static String FATAL_MESSAGE = "Fatal message";
+ private static String INFO_MESSAGE = "Info message";
+ private static String WARNING_MESSAGE = "Warning message";
+
+ @Override
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+
+ String passedLabelValue = ((Element)sourceNode).getAttribute(PASSED_LABEL_ATTRIBUTE_NAME);
+ String labelClassValue = ((Element)sourceNode).getAttribute(LABEL_CLASS_ATTRIBUTE_NAME);
+ String markerClassValue = ((Element)sourceNode).getAttribute(MARKER_CLASS_ATTRIBUTE_NAME);
+ String markerStyleValue = ((Element)sourceNode).getAttribute(MARKER_STYLE_ATTRIBUTE_NAME);
+
+ String errorMarkerClassValue = ((Element)sourceNode).getAttribute(ERROR_MARKER_CLASS_ATTRIBUTE_NAME);
+ String errorLabelClassValue = ((Element)sourceNode).getAttribute(ERROR_LABEL_CLASS_ATTRIBUTE_NAME);
+ String errorClassValue = ((Element)sourceNode).getAttribute(ERROR_CLASS_ATTRIBUTE_NAME);
+
+ String fatalMarkerClassValue = ((Element)sourceNode).getAttribute(FATAL_MARKER_CLASS_ATTRIBUTE_NAME);
+ String fatalLabelClassValue = ((Element)sourceNode).getAttribute(FATAL_LABEL_CLASS_ATTRIBUTE_NAME);
+ String fatalClassValue = ((Element)sourceNode).getAttribute(FATAL_CLASS_ATTRIBUTE_NAME);
+
+ String infoMarkerClassValue = ((Element)sourceNode).getAttribute(INFO_MARKER_CLASS_ATTRIBUTE_NAME);
+ String infoLabelClassValue = ((Element)sourceNode).getAttribute(INFO_LABEL_CLASS_ATTRIBUTE_NAME);
+ String infoClassValue = ((Element)sourceNode).getAttribute(INFO_CLASS_ATTRIBUTE_NAME);
+
+ String warnMarkerClassValue = ((Element)sourceNode).getAttribute(WARN_MARKER_CLASS_ATTRIBUTE_NAME);
+ String warnLabelClassValue = ((Element)sourceNode).getAttribute(WARN_LABEL_CLASS_ATTRIBUTE_NAME);
+ String warnClassValue = ((Element)sourceNode).getAttribute(WARN_CLASS_ATTRIBUTE_NAME);
+
+ String styleValue = ((Element)sourceNode).getAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
+ String styleClassValue = ((Element)sourceNode).getAttribute(HtmlComponentUtil.HTML_CLASS_ATTR);
+
+
+ nsIDOMElement table = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
+
+ if(styleValue != null && !styleValue.trim().equals(""))
+ table.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, styleValue);
+ if(styleClassValue != null && !styleClassValue.trim().equals(""))
+ table.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, styleClassValue);
+
+ // Create first row PASSED
+ nsIDOMElement tr1 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ table.appendChild(tr1);
+
+ nsIDOMElement td1 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ tr1.appendChild(td1);
+
+ // set markerClass
+ if(markerClassValue != null && !markerClassValue.trim().equals(""))
+ td1.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, markerClassValue);
+
+ // set markerStyle
+ if(markerStyleValue != null && !markerStyleValue.trim().equals(""))
+ td1.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, markerStyleValue);
+
+ nsIDOMElement img = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_IMG);
+ td1.appendChild(img);
+
+ nsIDOMElement td2 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ tr1.appendChild(td2);
+
+ // set labelClass
+ if(labelClassValue != null && !labelClassValue.trim().equals(""))
+ td2.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, labelClassValue);
+
+ nsIDOMText text = visualDocument.createTextNode(passedLabelValue == null
+ ? ""
+ : passedLabelValue);
+ td2.appendChild(text);
+ // ---------------------------------------------------------------------
+
+ // Create second row ERROR
+ nsIDOMElement tr2 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ table.appendChild(tr2);
+
+ // set errorClass
+ if(errorClassValue != null && !errorClassValue.trim().equals(""))
+ tr2.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, errorClassValue);
+
+ nsIDOMElement td3 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ tr2.appendChild(td3);
+
+ // set errorMarkerClass
+ if(errorMarkerClassValue != null && !errorMarkerClassValue.trim().equals(""))
+ td3.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, errorMarkerClassValue);
+
+ img = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_IMG);
+ td3.appendChild(img);
+
+ nsIDOMElement td4 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ tr2.appendChild(td4);
+
+ // set errorLabelClass
+ if(errorLabelClassValue != null && !errorLabelClassValue.trim().equals(""))
+ td4.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, errorLabelClassValue);
+
+ text = visualDocument.createTextNode(ERROR_MESSAGE);
+ td4.appendChild(text);
+ // ---------------------------------------------------------------------
+
+ // Create third row FATAL
+ nsIDOMElement tr3 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ table.appendChild(tr3);
+
+ // set fatalClass
+ if(fatalClassValue != null && !fatalClassValue.trim().equals(""))
+ tr3.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, fatalClassValue);
+
+ nsIDOMElement td5 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ tr3.appendChild(td5);
+
+ // set fatalMarkerClass
+ if(fatalMarkerClassValue != null && !fatalMarkerClassValue.trim().equals(""))
+ td5.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, fatalMarkerClassValue);
+
+ img = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_IMG);
+ td5.appendChild(img);
+
+ nsIDOMElement td6 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ tr3.appendChild(td6);
+
+ // set fatalLabelClass
+ if(fatalLabelClassValue != null && !fatalLabelClassValue.trim().equals(""))
+ td6.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, fatalLabelClassValue);
+
+ text = visualDocument.createTextNode(FATAL_MESSAGE);
+ td6.appendChild(text);
+ // ---------------------------------------------------------------------
+
+ // Create four row INFO
+ nsIDOMElement tr4 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ table.appendChild(tr4);
+
+ // set infoClass
+ if(infoClassValue != null && !infoClassValue.trim().equals(""))
+ tr4.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, infoClassValue);
+
+ nsIDOMElement td7 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ tr4.appendChild(td7);
+
+ // set infoMarkerClass
+ if(infoMarkerClassValue != null && !infoMarkerClassValue.trim().equals(""))
+ td7.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, infoMarkerClassValue);
+
+ img = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_IMG);
+ td7.appendChild(img);
+
+ nsIDOMElement td8 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ tr4.appendChild(td8);
+
+ // set infoLabelClass
+ if(infoLabelClassValue != null && !infoLabelClassValue.trim().equals(""))
+ td8.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, infoLabelClassValue);
+
+ text = visualDocument.createTextNode(INFO_MESSAGE);
+ td8.appendChild(text);
+ // ---------------------------------------------------------------------
+
+ // Create fifth row WARNING
+ nsIDOMElement tr5 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ table.appendChild(tr5);
+
+ // set warnClass
+ if(warnClassValue != null && !warnClassValue.trim().equals(""))
+ tr5.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, warnClassValue);
+
+ nsIDOMElement td9 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ tr5.appendChild(td9);
+
+ // set warnMarkerClass
+ if(warnMarkerClassValue != null && !warnMarkerClassValue.trim().equals(""))
+ td9.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, warnMarkerClassValue);
+
+ img = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_IMG);
+ td9.appendChild(img);
+
+ nsIDOMElement td10 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ tr5.appendChild(td10);
+
+ // set warnLabelClass
+ if(warnLabelClassValue != null && !warnLabelClassValue.trim().equals(""))
+ td10.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, warnLabelClassValue);
+
+ text = visualDocument.createTextNode(WARNING_MESSAGE);
+ td10.appendChild(text);
+
+ return new VpeCreationData(table);
+ }
+}
\ No newline at end of file
Property changes on: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessageTemplate.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
===================================================================
--- branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2007-08-29 14:28:39 UTC (rev 3404)
+++ branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2007-08-29 16:14:41 UTC (rev 3405)
@@ -470,5 +470,20 @@
</vpe:dnd>
</vpe:template>
</vpe:tag>
+
+ <vpe:tag name="rich:message" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesMessageTemplate">
+
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="no"/>
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:tag>
</vpe:templates>
\ No newline at end of file
17 years, 3 months
JBoss Tools SVN: r3404 - in branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe: editor and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2007-08-29 10:28:39 -0400 (Wed, 29 Aug 2007)
New Revision: 3404
Modified:
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-743
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java 2007-08-29 14:12:00 UTC (rev 3403)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java 2007-08-29 14:28:39 UTC (rev 3404)
@@ -40,9 +40,7 @@
private static final String CID_SUPPORTSSTRING = "@mozilla.org/supports-string;1";
private static final String CID_SUPPORTSARRAY = "@mozilla.org/supports-array;1";
-
- private static final String kVpeModelFlavor = "vpe/model";
- private static final String kVpeModelTransport ="vpe/model";
+
/**
* service manager */
private nsIServiceManager serviceManager;
@@ -98,10 +96,10 @@
*/
private nsITransferable createTransferable() {
- nsITransferable iTransferable = (nsITransferable) componentManager
+ nsITransferable iTransferable = (nsITransferable) getComponentManager()
.createInstanceByContractID(CID_TRANSFERABLE, null,
nsITransferable.NS_ITRANSFERABLE_IID);
- nsISupportsString transferData = (nsISupportsString) componentManager
+ nsISupportsString transferData = (nsISupportsString) getComponentManager()
.createInstanceByContractID(CID_SUPPORTSSTRING, null,
nsISupportsString.NS_ISUPPORTSSTRING_IID);
String data="vpe-element";
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2007-08-29 14:12:00 UTC (rev 3403)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2007-08-29 14:28:39 UTC (rev 3404)
@@ -58,14 +58,18 @@
import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
import org.jboss.tools.vpe.xulrunner.editor.XulRunnerEditor;
import org.mozilla.interfaces.nsIDOMAttr;
+import org.mozilla.interfaces.nsIDOMChromeWindow;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMEventGroup;
import org.mozilla.interfaces.nsIDOMEventTarget;
import org.mozilla.interfaces.nsIDOMMouseEvent;
import org.mozilla.interfaces.nsIDOMNode;
import org.mozilla.interfaces.nsIDOMNodeList;
import org.mozilla.interfaces.nsIDOMRange;
import org.mozilla.interfaces.nsIDOMText;
+import org.mozilla.interfaces.nsIEventTarget;
+import org.mozilla.interfaces.nsIWebBrowserChrome;
import org.mozilla.xpcom.XPCOMException;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
@@ -1441,11 +1445,11 @@
void setMoveCursor(nsIDOMMouseEvent mouseEvent) {
nsIDOMElement selectedElement = xulRunnerEditor.getLastSelectedElement();
-
if (selectedElement != null && canInnerDrag(selectedElement)) {
if (inDragArea(getNodeBounds(selectedElement), VisualDomUtil.getMousePoint(mouseEvent))) {
- // TODO Max Areshkau add DnD support
- //dnd.setMoveCursor();
+ //change cursor
+ Cursor cursor1= new Cursor(xulRunnerEditor.getDisplay(),SWT.CURSOR_SIZEALL);
+ xulRunnerEditor.setCursor(cursor1);
}
}
}
17 years, 3 months
JBoss Tools SVN: r3403 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views.
by jbosstools-commits@lists.jboss.org
Author: mdryakhlenkov
Date: 2007-08-29 10:12:00 -0400 (Wed, 29 Aug 2007)
New Revision: 3403
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelImageVisitor.java
Log:
JBIDE-862: ClassNotFoundException on open mapping diagram
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelImageVisitor.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelImageVisitor.java 2007-08-29 13:20:49 UTC (rev 3402)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelImageVisitor.java 2007-08-29 14:12:00 UTC (rev 3403)
@@ -79,12 +79,12 @@
public Object visitPersistentField(Property field) {
if (field != null) {
- if (field.getPersistentClass().getVersion() == field) {
+ if (field.getPersistentClass() != null && field.getPersistentClass().getVersion() == field) {
return ViewPlugin
.getImageDescriptor(BUNDLE
.getString("OrmModelImageVisitor.PersistentFieldSimple_version"));
}
- if (field.getPersistentClass().getIdentifierProperty() == field) {
+ if (field.getPersistentClass() != null && field.getPersistentClass().getIdentifierProperty() == field) {
return ViewPlugin
.getImageDescriptor(BUNDLE
.getString("OrmModelImageVisitor.PersistentFieldSimple_id"));
17 years, 3 months
JBoss Tools SVN: r3402 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views.
by jbosstools-commits@lists.jboss.org
Author: mdryakhlenkov
Date: 2007-08-29 09:20:49 -0400 (Wed, 29 Aug 2007)
New Revision: 3402
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelNameVisitor.java
Log:
JBIDE-862: ClassNotFoundException on open mapping diagram
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelNameVisitor.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelNameVisitor.java 2007-08-29 13:05:17 UTC (rev 3401)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelNameVisitor.java 2007-08-29 13:20:49 UTC (rev 3402)
@@ -20,6 +20,7 @@
import org.hibernate.mapping.DependantValue;
import org.hibernate.mapping.Property;
import org.hibernate.mapping.RootClass;
+import org.hibernate.mapping.SimpleValue;
import org.hibernate.mapping.SingleTableSubclass;
import org.hibernate.mapping.Subclass;
import org.hibernate.mapping.Table;
@@ -268,6 +269,9 @@
typeString = field.getType().getReturnedClass().getName();
}
} catch (Exception e) {
+ if (field.getValue() instanceof Component) {
+ typeString = ((Component)field.getValue()).getComponentClassName();
+ }
}
if (typeString != null) {
name.append(typeString);
17 years, 3 months
JBoss Tools SVN: r3401 - trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-08-29 09:05:17 -0400 (Wed, 29 Aug 2007)
New Revision: 3401
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ScannerTest.java
Log:
JBIDE-867
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ScannerTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ScannerTest.java 2007-08-29 12:29:09 UTC (rev 3400)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ScannerTest.java 2007-08-29 13:05:17 UTC (rev 3401)
@@ -11,6 +11,7 @@
package org.jboss.tools.seam.core.test;
import java.util.List;
+import java.util.Properties;
import java.util.Set;
import junit.framework.TestCase;
@@ -43,6 +44,7 @@
import org.jboss.tools.seam.core.event.ISeamValueMapEntry;
import org.jboss.tools.seam.core.event.ISeamValueString;
import org.jboss.tools.seam.internal.core.SeamProject;
+import org.jboss.tools.seam.internal.core.el.SeamPromptingProvider;
import org.jboss.tools.seam.internal.core.scanner.IFileScanner;
import org.jboss.tools.seam.internal.core.scanner.LoadedDeclarations;
import org.jboss.tools.seam.internal.core.scanner.lib.ClassPath;
@@ -480,5 +482,17 @@
}
}
+
+ public void testPromptingProvider() {
+ ISeamProject seamProject = getSeamProject();
+ SeamPromptingProvider pp = new SeamPromptingProvider();
+ Properties properties = new Properties();
+ properties.put("seamProject", seamProject);
+ List list = pp.getList(null, SeamPromptingProvider.VARIABLES, "", properties);
+ assertTrue("Prompting has to contain 'myUser' variable", list.contains("myUser"));
+
+ list = pp.getList(null, SeamPromptingProvider.MEMBERS, "#{myUser.", properties);
+ assertTrue("Prompting has to contain 'payment' property for '#{myUser.' seed", list.contains("payment"));
+ }
}
17 years, 3 months
JBoss Tools SVN: r3400 - trunk/jst/tests/org.jboss.tools.jst.web.test/src/org/jboss/tools/jst/web/test.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-08-29 08:29:09 -0400 (Wed, 29 Aug 2007)
New Revision: 3400
Modified:
trunk/jst/tests/org.jboss.tools.jst.web.test/src/org/jboss/tools/jst/web/test/WebContentAssistProviderTest.java
Log:
JBIDE-867
Modified: trunk/jst/tests/org.jboss.tools.jst.web.test/src/org/jboss/tools/jst/web/test/WebContentAssistProviderTest.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.test/src/org/jboss/tools/jst/web/test/WebContentAssistProviderTest.java 2007-08-29 11:55:03 UTC (rev 3399)
+++ trunk/jst/tests/org.jboss.tools.jst.web.test/src/org/jboss/tools/jst/web/test/WebContentAssistProviderTest.java 2007-08-29 12:29:09 UTC (rev 3400)
@@ -47,10 +47,7 @@
public void testJsfBeanPropertyList() {
// seam beans list
- List beanList = webPromptingProvider.getList(projectModel, WebPromptingProvider.JSF_BEAN_PROPERTIES, "numberGuess", new Properties());
- assertTrue("Bean property list does not contain Seam bean property in XModel.", beanList.contains("remainingGuesses"));
- // jsf beans list
- beanList = webPromptingProvider.getList(projectModel, WebPromptingProvider.JSF_BEAN_PROPERTIES, "facesManagedBean", new Properties());
+ List beanList = webPromptingProvider.getList(projectModel, WebPromptingProvider.JSF_BEAN_PROPERTIES, "facesManagedBean", new Properties());
assertTrue("Bean property list does not contain Managed bean property in XModel.", beanList.contains("property1"));
}
17 years, 3 months
JBoss Tools SVN: r3399 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-08-29 07:55:03 -0400 (Wed, 29 Aug 2007)
New Revision: 3399
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamPromptingProvider.java
Log:
JBIDE-867
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamPromptingProvider.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamPromptingProvider.java 2007-08-29 10:48:41 UTC (rev 3398)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamPromptingProvider.java 2007-08-29 11:55:03 UTC (rev 3399)
@@ -27,8 +27,8 @@
public class SeamPromptingProvider implements IPromptingProvider {
static String IS_SEAM_PROJECT = "seam.is_seam_project";
- static String VARIABLES = "seam.variables";
- static String MEMBERS = "seam.members";
+ public static String VARIABLES = "seam.variables";
+ public static String MEMBERS = "seam.members";
SeamELCompletionEngine engine= new SeamELCompletionEngine();
@@ -38,6 +38,9 @@
Properties properties) {
IFile f = (IFile)properties.get("file");
ISeamProject p = (f == null) ? null : SeamCorePlugin.getSeamProject(f.getProject(), false);
+ if(f == null) {
+ p = (ISeamProject)properties.get("seamProject");
+ }
if(p == null) return null;
if(IS_SEAM_PROJECT.equals(id)) {
ArrayList<Object> list = new ArrayList<Object>();
17 years, 3 months
JBoss Tools SVN: r3398 - branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor.
by jbosstools-commits@lists.jboss.org
Author: ayukhovich
Date: 2007-08-29 06:48:41 -0400 (Wed, 29 Aug 2007)
New Revision: 3398
Modified:
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/VpeResizerMouseMotionListener.java
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerVpeResizer.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-742
Restoring functionality of resizing
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/VpeResizerMouseMotionListener.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/VpeResizerMouseMotionListener.java 2007-08-29 10:44:48 UTC (rev 3397)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/VpeResizerMouseMotionListener.java 2007-08-29 10:48:41 UTC (rev 3398)
@@ -42,7 +42,6 @@
if ( mouseEvent == null ) {
return;
}
- System.out.println("VpeResizerMouseMoti: mouseMove");
vpeResizer.mouseMove(mouseEvent);
}
@@ -51,7 +50,7 @@
}
public void handleEvent(nsIDOMEvent event) {
- if ("mousemove".equals(event.getType())) {
+ if (XulRunnerConstants.EVENT_NAME_MOUSEMOVE.equals(event.getType())) {
mouseMove(event);
}
}
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerVpeResizer.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerVpeResizer.java 2007-08-29 10:44:48 UTC (rev 3397)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerVpeResizer.java 2007-08-29 10:48:41 UTC (rev 3398)
@@ -138,7 +138,15 @@
* @see org.jboss.vpe.mozilla.resizer.IVpeResizer#show(org.mozilla.interfaces.nsIDOMElement, int)
*/
public void show(nsIDOMElement domElement, int resizers) {
+
+ if ( resizingObject != null ) {
+ System.out.println("XulRunnerVpeResizer.show before hide for element: " + resizingObject.getNodeName() );
+ hide();
+ }
+
resizingObject = domElement;
+
+ System.out.println("XulRunnerVpeResizer.show for element: " + resizingObject.getNodeName() );
elementPositionAndDimention = DOMElementUtils.getElementPositionAndDimention(domElement);
@@ -218,8 +226,11 @@
/* (non-Javadoc)
* @see org.jboss.vpe.mozilla.resizer.IVpeResizer#hide()
*/
- public void hide()
- {
+ public void hide() {
+ if ( resizingObject != null ) {
+ System.out.println("XulRunnerVpeResizer.hide for element: " + resizingObject.getNodeName() );
+ }
+
nsIDOMElement bodyElement;
bodyElement = getRootElement();
@@ -527,8 +538,7 @@
* @param aY
* @return
*/
- private int getNewResizingX(int aX, int aY)
- {
+ private int getNewResizingX(int aX, int aY) {
int resized = elementPositionAndDimention.getLeft() + getNewResizingIncrement(aX, aY, COEFFICIENT_TYPE.X) * incrementFactorX;
int max = elementPositionAndDimention.getLeft() + elementPositionAndDimention.getWidth();
return Math.min(resized, max);
@@ -540,8 +550,7 @@
* @param aY
* @return
*/
- private int getNewResizingY(int aX, int aY)
- {
+ private int getNewResizingY(int aX, int aY) {
int resized = elementPositionAndDimention.getTop() + getNewResizingIncrement(aX, aY, COEFFICIENT_TYPE.Y) * incrementFactorY;
int max = elementPositionAndDimention.getTop() + elementPositionAndDimention.getHeight();
return Math.min(resized, max);
@@ -553,8 +562,7 @@
* @param aY
* @return
*/
- private int getNewResizingWidth(int aX, int aY)
- {
+ private int getNewResizingWidth(int aX, int aY) {
int resized = elementPositionAndDimention.getWidth() + getNewResizingIncrement(aX, aY, COEFFICIENT_TYPE.WIDTH) * incrementFactorWidth;
return Math.max(resized, 1);
}
@@ -565,8 +573,7 @@
* @param aY
* @return
*/
- private int getNewResizingHeight(int aX, int aY)
- {
+ private int getNewResizingHeight(int aX, int aY) {
int resized = elementPositionAndDimention.getHeight() + getNewResizingIncrement(aX, aY, COEFFICIENT_TYPE.HEIGHT) * incrementFactorHeight;
return Math.max(resized, 1);
}
@@ -578,8 +585,7 @@
* @param coefficient_type
* @return
*/
- private int getNewResizingIncrement(int aX, int aY, COEFFICIENT_TYPE coefficient_type)
- {
+ private int getNewResizingIncrement(int aX, int aY, COEFFICIENT_TYPE coefficient_type) {
int result = 0;
switch (coefficient_type) {
17 years, 3 months
JBoss Tools SVN: r3397 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views.
by jbosstools-commits@lists.jboss.org
Author: mdryakhlenkov
Date: 2007-08-29 06:44:48 -0400 (Wed, 29 Aug 2007)
New Revision: 3397
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/HibernateUtils.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelImageVisitor.java
Log:
JBIDE-862: ClassNotFoundException on open mapping diagram
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/HibernateUtils.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/HibernateUtils.java 2007-08-29 09:29:26 UTC (rev 3396)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/HibernateUtils.java 2007-08-29 10:44:48 UTC (rev 3397)
@@ -17,7 +17,9 @@
}
public static String getPersistentClassName(String className) {
- if (className.indexOf(".") < 0) {
+ if (className == null) {
+ return "";
+ } else if (className.indexOf(".") < 0) {
return "default." + className;
}
return className;
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelImageVisitor.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelImageVisitor.java 2007-08-29 09:29:26 UTC (rev 3396)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelImageVisitor.java 2007-08-29 10:44:48 UTC (rev 3397)
@@ -12,6 +12,7 @@
import java.util.ResourceBundle;
+import org.hibernate.MappingException;
import org.hibernate.mapping.Any;
import org.hibernate.mapping.Array;
import org.hibernate.mapping.Bag;
@@ -106,39 +107,44 @@
.getImageDescriptor(BUNDLE
.getString("OrmModelImageVisitor.PersistentFieldAny"));
- if (field.getType() != null
- && field.getType().isCollectionType()) {
- if (field.getValue() instanceof PrimitiveArray)
- return ViewPlugin
- .getImageDescriptor(BUNDLE
- .getString("OrmModelImageVisitor.Collection_primitive_array"));
- else if (field.getValue() instanceof Array)
- return ViewPlugin
- .getImageDescriptor(BUNDLE
- .getString("OrmModelImageVisitor.Collection_array"));
- else if (field.getValue() instanceof List)
- return ViewPlugin
- .getImageDescriptor(BUNDLE
- .getString("OrmModelImageVisitor.Collection_list"));
- else if (field.getValue() instanceof Set)
- return ViewPlugin
- .getImageDescriptor(BUNDLE
- .getString("OrmModelImageVisitor.Collection_set"));
- else if (field.getValue() instanceof Map)
- return ViewPlugin
- .getImageDescriptor(BUNDLE
- .getString("OrmModelImageVisitor.Collection_map"));
- else if (field.getValue() instanceof Bag)
- return ViewPlugin
- .getImageDescriptor(BUNDLE
- .getString("OrmModelImageVisitor.Collection_bag"));
- else if (field.getValue() instanceof IdentifierBag)
- return ViewPlugin
- .getImageDescriptor(BUNDLE
- .getString("OrmModelImageVisitor.Collection_idbag"));
- else
- return ViewPlugin.getImageDescriptor(BUNDLE
- .getString("OrmModelImageVisitor.Collection"));
+ try {
+ if (field.getType() != null
+ && field.getType().isCollectionType()) {
+ if (field.getValue() instanceof PrimitiveArray)
+ return ViewPlugin
+ .getImageDescriptor(BUNDLE
+ .getString("OrmModelImageVisitor.Collection_primitive_array"));
+ else if (field.getValue() instanceof Array)
+ return ViewPlugin
+ .getImageDescriptor(BUNDLE
+ .getString("OrmModelImageVisitor.Collection_array"));
+ else if (field.getValue() instanceof List)
+ return ViewPlugin
+ .getImageDescriptor(BUNDLE
+ .getString("OrmModelImageVisitor.Collection_list"));
+ else if (field.getValue() instanceof Set)
+ return ViewPlugin
+ .getImageDescriptor(BUNDLE
+ .getString("OrmModelImageVisitor.Collection_set"));
+ else if (field.getValue() instanceof Map)
+ return ViewPlugin
+ .getImageDescriptor(BUNDLE
+ .getString("OrmModelImageVisitor.Collection_map"));
+ else if (field.getValue() instanceof Bag)
+ return ViewPlugin
+ .getImageDescriptor(BUNDLE
+ .getString("OrmModelImageVisitor.Collection_bag"));
+ else if (field.getValue() instanceof IdentifierBag)
+ return ViewPlugin
+ .getImageDescriptor(BUNDLE
+ .getString("OrmModelImageVisitor.Collection_idbag"));
+ else
+ return ViewPlugin.getImageDescriptor(BUNDLE
+ .getString("OrmModelImageVisitor.Collection"));
+ }
+ } catch (MappingException e) {
+ return ViewPlugin.getImageDescriptor(BUNDLE
+ .getString("OrmModelImageVisitor.PersistentFieldNot_mapped"));
}
}
if("parent".equals(field.getName()))
17 years, 3 months
JBoss Tools SVN: r3396 - in branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces: src/org/jboss/tools/jsf/vpe/richfaces/template and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: ezheleznyakov
Date: 2007-08-29 05:29:26 -0400 (Wed, 29 Aug 2007)
New Revision: 3396
Added:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/virtualearth/earth_aerial.png
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/virtualearth/earth_hibrid.png
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/virtualearth/earth_road.png
Removed:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/virtualearth/earth_aerial.jpg
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/virtualearth/earth_hybrid.jpg
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/virtualearth/earth_road.jpg
Modified:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesVirtualEarthTemplate.java
Log:
Replace image for <rich:virtualEarth>
Deleted: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/virtualearth/earth_aerial.jpg
===================================================================
(Binary files differ)
Added: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/virtualearth/earth_aerial.png
===================================================================
(Binary files differ)
Property changes on: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/virtualearth/earth_aerial.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Added: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/virtualearth/earth_hibrid.png
===================================================================
(Binary files differ)
Property changes on: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/virtualearth/earth_hibrid.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Deleted: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/virtualearth/earth_hybrid.jpg
===================================================================
(Binary files differ)
Deleted: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/virtualearth/earth_road.jpg
===================================================================
(Binary files differ)
Added: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/virtualearth/earth_road.png
===================================================================
(Binary files differ)
Property changes on: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/virtualearth/earth_road.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Modified: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesVirtualEarthTemplate.java
===================================================================
--- branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesVirtualEarthTemplate.java 2007-08-29 01:12:56 UTC (rev 3395)
+++ branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesVirtualEarthTemplate.java 2007-08-29 09:29:26 UTC (rev 3396)
@@ -28,9 +28,9 @@
*/
public class RichFacesVirtualEarthTemplate extends VpeAbstractTemplate {
- private static String EARTH_AERIAL = "/virtualearth/earth_aerial.jpg";
- private static String EARTH_HYBRID = "/virtualearth/earth_hybrid.jpg";
- private static String EARTH_ROAD = "/virtualearth/earth_road.jpg";
+ private static String EARTH_AERIAL = "/virtualearth/earth_aerial.png";
+ private static String EARTH_HYBRID = "/virtualearth/earth_hybrid.png";
+ private static String EARTH_ROAD = "/virtualearth/earth_road.png";
private static String MAP_STYLE_ATTRIBUTE_NAME = "mapStyle";
17 years, 3 months