JBoss Tools SVN: r4675 - in trunk/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: mareshkau
Date: 2007-11-02 15:58:46 -0400 (Fri, 02 Nov 2007)
New Revision: 4675
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColumnTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1213, rich:dataTable was adjusted(was added support of h:column, not only rich:column, and was added possability to show text, from it's node)
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java 2007-11-02 19:53:15 UTC (rev 4674)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java 2007-11-02 19:58:46 UTC (rev 4675)
@@ -48,7 +48,7 @@
NodeList children = sourceElement.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
Node node = children.item(i);
- if (node instanceof Element && "f:facet".equals(node.getNodeName())) {
+ if (node instanceof Element && node.getNodeName()!=null && node.getNodeName().indexOf(":facet")>0) {
Element element = (Element) node;
String name = element.getAttribute("name");
if (facetName.equals(name)) {
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColumnTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColumnTemplate.java 2007-11-02 19:53:15 UTC (rev 4674)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColumnTemplate.java 2007-11-02 19:58:46 UTC (rev 4675)
@@ -41,7 +41,7 @@
// Create mapping to Encode body
VpeChildrenInfo tdInfo = new VpeChildrenInfo(td);
- List<Node> children = ComponentUtil.getChildren(sourceElement);
+ List<Node> children = ComponentUtil.getChildren(sourceElement,true);
for (Node child : children) {
tdInfo.addSourceChild(child);
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java 2007-11-02 19:53:15 UTC (rev 4674)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java 2007-11-02 19:58:46 UTC (rev 4675)
@@ -62,7 +62,7 @@
encodeCaption(creationData, sourceElement, visualDocument, table);
// Encode Header
- Element header = ComponentUtil.getFacet(sourceElement, "header");
+ Node header = ComponentUtil.getFacet((Element)sourceElement, "header",true);
ArrayList<Element> columnsHeaders = getColumnsWithFacet(columns, "header");
if(header!=null || !columnsHeaders.isEmpty()) {
nsIDOMElement thead = visualDocument.createElement("thead");
@@ -141,7 +141,8 @@
tbody.appendChild(tr);
creationData.addChildrenInfo(trInfo);
}
- trInfo.addSourceChild(child);
+ trInfo.addSourceChild(child);
+
} else if(child.getNodeName().endsWith(":columnGroup")) {
RichFacesColumnGroupTemplate.DEFAULT_INSTANCE.encode(creationData, (Element)child, visualDocument, tbody);
tr = null;
@@ -198,7 +199,7 @@
if(colspan!=null && colspan.length()>0) {
td.setAttribute("colspan", colspan);
}
- Element facetBody = ComponentUtil.getFacet(column, facetName);
+ Node facetBody = ComponentUtil.getFacet(column, facetName,true);
VpeChildrenInfo child = new VpeChildrenInfo(td);
child.addSourceChild(facetBody);
@@ -206,13 +207,13 @@
}
}
- protected void encodeTableHeaderOrFooterFacet(VpeCreationData creationData, nsIDOMElement parentTheadOrTfood, int columns, nsIDOMDocument visualDocument, Element facetBody, String skinFirstRowClass, String skinRowClass, String skinCellClass, String facetBodyClass, String element) {
+ protected void encodeTableHeaderOrFooterFacet(VpeCreationData creationData, nsIDOMElement parentTheadOrTfood, int columns, nsIDOMDocument visualDocument, Node facetBody, String skinFirstRowClass, String skinRowClass, String skinCellClass, String facetBodyClass, String element) {
boolean isColumnGroup = facetBody.getNodeName().endsWith(":columnGroup");
boolean isSubTable = facetBody.getNodeName().endsWith(":subTable");
if(isColumnGroup) {
- RichFacesColumnGroupTemplate.DEFAULT_INSTANCE.encode(creationData, facetBody, visualDocument, parentTheadOrTfood);
+ RichFacesColumnGroupTemplate.DEFAULT_INSTANCE.encode(creationData, (Element)facetBody, visualDocument, parentTheadOrTfood);
} else if(isSubTable) {
- RichFacesSubTableTemplate.DEFAULT_INSTANCE.encode(creationData, facetBody, visualDocument, parentTheadOrTfood);
+ RichFacesSubTableTemplate.DEFAULT_INSTANCE.encode(creationData, (Element)facetBody, visualDocument, parentTheadOrTfood);
} else {
nsIDOMElement tr = visualDocument.createElement("tr");
parentTheadOrTfood.appendChild(tr);
@@ -243,7 +244,7 @@
}
}
- public static ArrayList<Element> getColumns(Element parentSourceElement) {
+ public static ArrayList<Element> getColumns(Node parentSourceElement) {
ArrayList<Element> columns = new ArrayList<Element>();
NodeList children = parentSourceElement.getChildNodes();
for(int i=0; i<children.getLength(); i++) {
@@ -258,7 +259,7 @@
public static ArrayList<Element> getColumnsWithFacet(ArrayList<Element> columns, String facetName) {
ArrayList<Element> columnsWithFacet = new ArrayList<Element>();
for (Element column : columns) {
- Element body = ComponentUtil.getFacet(column, facetName);
+ Node body = ComponentUtil.getFacet(column, facetName,true);
if(body!=null) {
columnsWithFacet.add(column);
}
17 years, 1 month
JBoss Tools SVN: r4674 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2007-11-02 15:53:15 -0400 (Fri, 02 Nov 2007)
New Revision: 4674
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/TypeInfoCollector.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1203 EL autocompletion prompts static members
All the fields are excluded from valid proposals
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/TypeInfoCollector.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/TypeInfoCollector.java 2007-11-02 19:47:15 UTC (rev 4673)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/TypeInfoCollector.java 2007-11-02 19:53:15 UTC (rev 4674)
@@ -314,7 +314,6 @@
char[][] parameterNames, char[] completionName,
int modifiers, int completionStart,
int completionEnd, int relevance) {
- // TODO Auto-generated method stub
}
@@ -322,12 +321,10 @@
char[] className, char[] completionName,
int modifiers, int completionStart,
int completionEnd, int relevance) {
- // TODO Auto-generated method stub
}
public void acceptError(IProblem error) {
- // TODO Auto-generated method stub
}
@@ -350,30 +347,23 @@
char[] interfaceName, char[] completionName,
int modifiers, int completionStart,
int completionEnd, int relevance) {
- // TODO Auto-generated method stub
-
}
public void acceptKeyword(char[] keywordName,
int completionStart, int completionEnd,
int relevance) {
- // TODO Auto-generated method stub
}
public void acceptLabel(char[] labelName,
int completionStart, int completionEnd,
int relevance) {
- // TODO Auto-generated method stub
-
}
public void acceptLocalVariable(char[] name,
char[] typePackageName, char[] typeName,
int modifiers, int completionStart,
int completionEnd, int relevance) {
- // TODO Auto-generated method stub
-
}
public void acceptMethod(
@@ -406,21 +396,17 @@
char[] returnTypeName, char[] completionName,
int modifiers, int completionStart,
int completionEnd, int relevance) {
- // TODO Auto-generated method stub
-
}
public void acceptModifier(char[] modifierName,
int completionStart, int completionEnd,
int relevance) {
- // TODO Auto-generated method stub
}
public void acceptPackage(char[] packageName,
char[] completionName, int completionStart,
int completionEnd, int relevance) {
- // TODO Auto-generated method stub
}
@@ -428,7 +414,6 @@
char[] typeName, char[] completionName,
int completionStart, int completionEnd,
int relevance) {
- // TODO Auto-generated method stub
}
@@ -436,8 +421,6 @@
char[] typeName, char[] name,
char[] completionName, int completionStart,
int completionEnd, int relevance) {
- // TODO Auto-generated method stub
-
}
};
@@ -540,13 +523,20 @@
&& (info.isGetter() || info.isSetter()))
properties.add(info);
}
+
+ /*
+ * The following code was excluded due to the following issue:
+ *
+ * http://jira.jboss.com/jira/browse/JBIDE-1203#action_12385823
+ *
+ *
for (FieldInfo info : fFields) {
if (info.isPublic()
&& !info.isStatic() && !info.isJavaLangObject())
properties.add(info);
}
+ */
-
return properties;
}
17 years, 1 month
JBoss Tools SVN: r4673 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-11-02 15:47:15 -0400 (Fri, 02 Nov 2007)
New Revision: 4673
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java
Log:
NPE
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java 2007-11-02 19:20:48 UTC (rev 4672)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java 2007-11-02 19:47:15 UTC (rev 4673)
@@ -290,6 +290,7 @@
protected int countChanges(IModuleResourceDelta[] deltas) {
IModuleResource res;
int count = 0;
+ if( deltas == null ) return 0;
for( int i = 0; i < deltas.length; i++ ) {
res = deltas[i].getModuleResource();
if( res != null && res instanceof IModuleFile)
@@ -308,6 +309,7 @@
}
protected int countMembers(IModuleResource[] resources) {
int count = 0;
+ if( resources == null ) return 0;
for( int i = 0; i < resources.length; i++ ) {
if( resources[i] instanceof IModuleFile ) {
count++;
17 years, 1 month
JBoss Tools SVN: r4672 - in trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces: src/org/jboss/tools/jsf/vpe/richfaces and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-11-02 15:20:48 -0400 (Fri, 02 Nov 2007)
New Revision: 4672
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/inputNumberSlider/inputbg.gif
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/inputNumberSlider/sliderbg.gif
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/inputNumberSlider/inputNumberSlider.css
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInputNumberSliderTemplate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1249 fixed
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/inputNumberSlider/inputNumberSlider.css
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/inputNumberSlider/inputNumberSlider.css 2007-11-02 18:37:39 UTC (rev 4671)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/inputNumberSlider/inputNumberSlider.css 2007-11-02 19:20:48 UTC (rev 4672)
@@ -8,6 +8,7 @@
padding: 0px 3px;
text-align:left;
}
+
.maxValueStyle {
border-color: ;
color: #000000;
@@ -18,18 +19,20 @@
padding: 0px 3px;
text-align: right;
}
+
.inputStyleClass {
- background-color:#FFFFFF;
+ border: 1px solid;
+ padding: 0px 0px 0px 3px;
+ margin-top: 0px;
+ margin-bottom: 0px;
+ background-position: left top;
+ background-repeat: repeat-x;
+ background-color:#ffffff;
+ font-family:Arial, Verdana, sans-serif ;font-size:11px;
color:#000000;
- font-family:Arial,Verdana,sans-serif;
- font-size:11px;
- background-position:left top;
- background-repeat:repeat-x;
- border-color:#000000 rgb(176, 176, 176) rgb(176, 176, 176) rgb(0, 0, 0);
- border-style:solid;
- border-width:1px;
- margin:0px 0px 0px 10px;
- padding:0px 0px 0px 3px;
+ border-color:#C4C0B9;
+ border-bottom-color:#ffffff;
+ border-right-color:#ffffff;
}
.cellForTableStyleClass {
@@ -75,8 +78,6 @@
width:100%;
}
.cell-with-picture {
- background-color : transparent;
- border: 1px solid transparent;
align: left;
height: 4px;
width: 7px;
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/inputNumberSlider/inputbg.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/inputNumberSlider/inputbg.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/inputNumberSlider/sliderbg.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/inputNumberSlider/sliderbg.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java 2007-11-02 18:37:39 UTC (rev 4671)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java 2007-11-02 19:20:48 UTC (rev 4672)
@@ -272,13 +272,21 @@
}
/**
+ * Returns Style with default background image for default RichFaces skin.
+ *
+ * @return
+ */
+ public static String getHeaderBackgoundImgStyle() {
+ return getBackgoundImgStyle("common/background.gif");
+ }
+
+ /**
* Returns Style with background image for default RichFaces skin.
*
* @return
*/
- public static String getHeaderBackgoundImgStyle() {
- String imgPath = ComponentUtil
- .getAbsoluteResourcePath("common/background.gif");
+ public static String getBackgoundImgStyle(String imagePath) {
+ String imgPath = ComponentUtil.getAbsoluteResourcePath(imagePath);
String style = "background-image: url(file:///"
+ imgPath.replace('\\', '/') + ");";
return style;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInputNumberSliderTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInputNumberSliderTemplate.java 2007-11-02 18:37:39 UTC (rev 4671)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInputNumberSliderTemplate.java 2007-11-02 19:20:48 UTC (rev 4672)
@@ -85,7 +85,9 @@
defaultArgsMappedMethods[0] = nsIDOMElement.class;
defaultArgsMappedMethods[1] = Element.class;
}
-
+
+ private boolean rightInputPosition = true;
+
/**
* Default constructor
*/
@@ -96,6 +98,7 @@
addMapAttibuteToMethod("inputSize", "setInputSize");
addMapAttibuteToMethod("inputClass", "setInputClass");
addMapAttibuteToMethod("inputStyle", "setInputStyle");
+ addMapAttibuteToMethod("inputPosition", "setInputPosition");
addMapAttibuteToMethod("maxlength", "setMaxlength");
addMapAttibuteToMethod("showInput", "showInput");
addMapAttibuteToMethod("showBoundaryValues", "showBoundaryValues");
@@ -152,7 +155,8 @@
* @return The information on the created node of the visual tree.
*/
public VpeCreationData create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument) {
-
+ setInputPosition(sourceNode);
+
nsIDOMElement table1 = null;
nsIDOMElement table1Tr1 = null;
nsIDOMElement table1Tr1Td1 = null;
@@ -165,10 +169,14 @@
nsIDOMElement table1Tr2Td1 = null;
nsIDOMElement table1Tr2Td1Table2 = null;
nsIDOMElement table1Tr2Td1Table2Tr1 = null;
- nsIDOMElement table1Tr2Td1Table2Tr1Td1 = null;
- nsIDOMElement table1Tr2Td1Table2Tr1Td2 = null;
- nsIDOMElement table1Tr2Td1Table2Tr1Td2Img = null;
- nsIDOMElement table1Tr2Td1Table2Tr1Td3 = null;
+ nsIDOMElement table1Tr2Td1Table2Tr1Td = null;
+ nsIDOMElement table1Tr2Td1Table2Tr1TdTable = null;
+ nsIDOMElement table1Tr2Td1Table2Tr1TdTableTr = null;
+
+ nsIDOMElement table1Tr2Td1Table2Tr1TdTableTrTd1 = null;
+ nsIDOMElement table1Tr2Td1Table2Tr1TdTableTrTd2 = null;
+ nsIDOMElement table1Tr2Td1Table2Tr1TdTableTrTd2Img = null;
+ nsIDOMElement table1Tr2Td1Table2Tr1TdTableTrTd3 = null;
// sets css link
ComponentUtil.setCSSLink(pageContext, CSS_FILE, "inputNumberSlider");
@@ -200,7 +208,11 @@
INPUT_STYLE_CLASS);
table1Tr1Td3input.setAttribute(HtmlComponentUtil.HTML_SIZE_ATTR, "3");
table1Tr1Td3input.setAttribute(HtmlComponentUtil.HTML_VALUE_ATTR, "50");
- table1Tr1Td3input.setAttribute("style", ComponentUtil.getHeaderBackgoundImgStyle());
+ String positionStyle = "margin-left: 10px;";
+ if(!rightInputPosition) {
+ positionStyle = "margin-right: 10px;";
+ }
+ table1Tr1Td3input.setAttribute("style", positionStyle + ComponentUtil.getBackgoundImgStyle("inputNumberSlider/inputbg.gif"));
table1Tr2 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TR);
table1Tr2Td1 = visualDocument
@@ -215,59 +227,80 @@
table1Tr2Td1Table2.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
INNER_TABLE_STYLE);
table1Tr2Td1Table2.setAttribute(
- HtmlComponentUtil.HTML_CELLPADDING_ATTR, "0");
+ HtmlComponentUtil.HTML_CELLPADDING_ATTR, "1");
table1Tr2Td1Table2.setAttribute(
HtmlComponentUtil.HTML_CELLSPACING_ATTR, "0");
table1Tr2Td1Table2Tr1 = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TR);
+
+ table1Tr2Td1Table2Tr1Td = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
+ table1Tr2Td1Table2Tr1TdTable = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TABLE);
+ table1Tr2Td1Table2Tr1TdTable.setAttribute(HtmlComponentUtil.HTML_CELLPADDING_ATTR, "0");
+ table1Tr2Td1Table2Tr1TdTable.setAttribute(HtmlComponentUtil.HTML_CELLSPACING_ATTR, "0");
+ table1Tr2Td1Table2Tr1TdTable.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR, "0");
+
+ table1Tr2Td1Table2Tr1TdTableTr = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TR);
- table1Tr2Td1Table2Tr1Td1 = visualDocument
+ table1Tr2Td1Table2Tr1TdTableTrTd1 = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TD);
- table1Tr2Td1Table2Tr1Td1.setAttribute(
+ table1Tr2Td1Table2Tr1TdTableTrTd1.setAttribute(
HtmlComponentUtil.HTML_CLASS_ATTR, "empty-cell-style");
- table1Tr2Td1Table2Tr1Td1.setAttribute("style", ComponentUtil.getHeaderBackgoundImgStyle());
+ table1Tr2Td1Table2Tr1TdTableTrTd1.setAttribute("style", ComponentUtil.getBackgoundImgStyle("inputNumberSlider/sliderbg.gif"));
- table1Tr2Td1Table2Tr1Td1.setAttribute(
+ table1Tr2Td1Table2Tr1TdTableTrTd1.setAttribute(
HtmlComponentUtil.HTML_WIDTH_ATTR, "50%");
- table1Tr2Td1Table2Tr1Td2 = visualDocument
+ table1Tr2Td1Table2Tr1TdTableTrTd2 = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TD);
- table1Tr2Td1Table2Tr1Td2.setAttribute(
+ table1Tr2Td1Table2Tr1TdTableTrTd2.setAttribute(
HtmlComponentUtil.HTML_CLASS_ATTR, "cell-with-picture");
- table1Tr2Td1Table2Tr1Td2.setAttribute("style", ComponentUtil.getHeaderBackgoundImgStyle());
+ table1Tr2Td1Table2Tr1TdTableTrTd2.setAttribute("style", ComponentUtil.getBackgoundImgStyle("inputNumberSlider/inputbg.gif"));
- table1Tr2Td1Table2Tr1Td2Img = visualDocument
+ table1Tr2Td1Table2Tr1TdTableTrTd2Img = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_IMG);
- ComponentUtil.setImg(table1Tr2Td1Table2Tr1Td2Img, IMAGE_SLIDER);
+ ComponentUtil.setImg(table1Tr2Td1Table2Tr1TdTableTrTd2Img, IMAGE_SLIDER);
- table1Tr2Td1Table2Tr1Td3 = visualDocument
+ table1Tr2Td1Table2Tr1TdTableTrTd3 = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TD);
- table1Tr2Td1Table2Tr1Td3.setAttribute(
+ table1Tr2Td1Table2Tr1TdTableTrTd3.setAttribute(
HtmlComponentUtil.HTML_CLASS_ATTR, "empty-cell-style");
- table1Tr2Td1Table2Tr1Td3.setAttribute("style", ComponentUtil.getHeaderBackgoundImgStyle());
+ table1Tr2Td1Table2Tr1TdTableTrTd3.setAttribute("style", ComponentUtil.getBackgoundImgStyle("inputNumberSlider/sliderbg.gif"));
- table1Tr2Td1Table2Tr1Td3.setAttribute(
+ table1Tr2Td1Table2Tr1TdTableTrTd3.setAttribute(
HtmlComponentUtil.HTML_WIDTH_ATTR, "50%");
table1.appendChild(table1Tr1);
table1.appendChild(table1Tr2);
- table1Tr1.appendChild(table1Tr1Td1);
- table1Tr1.appendChild(table1Tr1Td2);
- table1Tr1.appendChild(table1Tr1Td3);
+
+ if(rightInputPosition) {
+ table1Tr1.appendChild(table1Tr1Td1);
+ table1Tr1.appendChild(table1Tr1Td2);
+ table1Tr1.appendChild(table1Tr1Td3);
+ } else {
+ table1Tr1.appendChild(table1Tr1Td3);
+ table1Tr1.appendChild(table1Tr1Td1);
+ table1Tr1.appendChild(table1Tr1Td2);
+ }
+
table1Tr2.appendChild(table1Tr2Td1);
table1Tr1Td1.appendChild(table1Tr1Td1Text);
table1Tr1Td2.appendChild(table1Tr1Td2Text);
- table1Tr1Td3.appendChild(table1Tr1Td3input);
+
+ table1Tr1Td3.appendChild(table1Tr1Td3input);
+
table1Tr2Td1.appendChild(table1Tr2Td1Table2);
- table1Tr2Td1Table2.appendChild(table1Tr2Td1Table2Tr1);
- table1Tr2Td1Table2Tr1.appendChild(table1Tr2Td1Table2Tr1Td1);
- table1Tr2Td1Table2Tr1.appendChild(table1Tr2Td1Table2Tr1Td2);
- table1Tr2Td1Table2Tr1.appendChild(table1Tr2Td1Table2Tr1Td3);
- table1Tr2Td1Table2Tr1Td2.appendChild(table1Tr2Td1Table2Tr1Td2Img);
+ table1Tr2Td1Table2.appendChild(table1Tr2Td1Table2Tr1);
+ table1Tr2Td1Table2Tr1.appendChild(table1Tr2Td1Table2Tr1Td);
+ table1Tr2Td1Table2Tr1Td.appendChild(table1Tr2Td1Table2Tr1TdTable);
+ table1Tr2Td1Table2Tr1TdTable.appendChild(table1Tr2Td1Table2Tr1TdTableTr);
+ table1Tr2Td1Table2Tr1TdTableTr.appendChild(table1Tr2Td1Table2Tr1TdTableTrTd1);
+ table1Tr2Td1Table2Tr1TdTableTr.appendChild(table1Tr2Td1Table2Tr1TdTableTrTd2);
+ table1Tr2Td1Table2Tr1TdTableTr.appendChild(table1Tr2Td1Table2Tr1TdTableTrTd3);
+ table1Tr2Td1Table2Tr1TdTableTrTd2.appendChild(table1Tr2Td1Table2Tr1TdTableTrTd2Img);
//
// set a default values
@@ -296,7 +329,12 @@
VpeCreationData creationData = new VpeCreationData(table1);
return creationData;
}
-
+
+ private void setInputPosition(Node sourceNode) {
+ String position = getAttribute("inputPosition", sourceNode);
+ rightInputPosition = !"left".equalsIgnoreCase(position);
+ }
+
/**
*
* @see com.exadel.vpe.editor.template.VpeAbstractTemplate#setAttribute(com.exadel.vpe.editor.context.VpePageContext,
@@ -361,8 +399,13 @@
nsIDOMElement table = visualNode;
nsIDOMNodeList tableList = table.getChildNodes();
nsIDOMNode tr = tableList.item(0);
- nsIDOMNodeList trList = tr.getChildNodes();
- nsIDOMNode td1 = trList.item(2);
+ nsIDOMNodeList trList = tr.getChildNodes();
+ nsIDOMNode td1 = null;
+ if(rightInputPosition) {
+ td1 = trList.item(2);
+ } else {
+ td1 = trList.item(0);
+ }
nsIDOMNodeList td1List = td1.getChildNodes();
nsIDOMNode input = td1List.item(0);
nsIDOMElement inputElement = (nsIDOMElement) input.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
@@ -580,8 +623,7 @@
}
double h1 = ((roundForStep(step, value) - min) / (max - min)) * 100;
double h2 = 100 - h1;
-
-
+
nsIDOMNodeList nodeList = visualElement.getChildNodes();
nsIDOMNode node_01 = nodeList.item(1);
nsIDOMNodeList nodeList_01 = node_01.getChildNodes();
@@ -598,11 +640,11 @@
table1Tr2Td1Table2Tr1Td1.setAttribute(
HtmlComponentUtil.HTML_WIDTH_ATTR, (int) h1 + "%");
-
- nsIDOMElement table1Tr2Td1Table2Tr1Td2 = (nsIDOMElement)node_01_00_00_00_02.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
-
- table1Tr2Td1Table2Tr1Td2.setAttribute(
- HtmlComponentUtil.HTML_WIDTH_ATTR, (int) h2 + "%");
+ if(node_01_00_00_00_02!=null) {
+ nsIDOMElement table1Tr2Td1Table2Tr1Td2 = (nsIDOMElement)node_01_00_00_00_02.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ table1Tr2Td1Table2Tr1Td2.setAttribute(
+ HtmlComponentUtil.HTML_WIDTH_ATTR, (int) h2 + "%");
+ }
}
/**
@@ -655,9 +697,22 @@
nsIDOMElement input = getInputElement(visualNode);
if (input != null) {
String tmp = getAttribute("inputStyle", sourceNode);
- input.setAttribute("style", tmp);
+ String style = getAttribute("style", (Element)input);
+ if(style!=null) {
+ input.setAttribute("style", tmp + style);
+ } else {
+ input.setAttribute("style", tmp);
+ }
}
}
+
+ /**
+ *
+ * @param visualNode
+ * @param sourceNode
+ */
+ public void setInputPosition(nsIDOMElement visualNode, Element sourceNode) {
+ }
/**
*
@@ -670,5 +725,12 @@
String tmp = getAttribute("maxlength", sourceNode);
input.setAttribute("maxlength", tmp);
}
+ }
+
+ @Override
+ public boolean isRecreateAtAttrChange(VpePageContext pageContext,
+ Element sourceElement, nsIDOMDocument visualDocument,
+ nsIDOMElement visualNode, Object data, String name, String value) {
+ return true;
}
}
\ No newline at end of file
17 years, 1 month
JBoss Tools SVN: r4671 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-11-02 14:37:39 -0400 (Fri, 02 Nov 2007)
New Revision: 4671
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/CompletionHelper.java
Log:
3.2 comment.
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/CompletionHelper.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/CompletionHelper.java 2007-11-02 17:26:28 UTC (rev 4670)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/CompletionHelper.java 2007-11-02 18:37:39 UTC (rev 4671)
@@ -83,6 +83,7 @@
}
proposal.setReplacementOffset(wanted);
} else {
+ // Workaround for Eclipse 3.x changes.
Class c = results[i].getClass();
try {
Method setMethod = c.getMethod("setReplacementOffset", new Class[] { int.class });
@@ -93,19 +94,19 @@
setMethod.invoke(results[i], new Object[] { new Integer(wanted) });
} catch (SecurityException e) {
// TODO Auto-generated catch block
- e.printStackTrace();
+ //e.printStackTrace();
} catch (NoSuchMethodException e) {
// TODO Auto-generated catch block
- e.printStackTrace();
+ //e.printStackTrace();
} catch (IllegalArgumentException e) {
// TODO Auto-generated catch block
- e.printStackTrace();
+ //e.printStackTrace();
} catch (IllegalAccessException e) {
// TODO Auto-generated catch block
- e.printStackTrace();
+ //e.printStackTrace();
} catch (InvocationTargetException e) {
// TODO Auto-generated catch block
- e.printStackTrace();
+ //e.printStackTrace();
}
// M7
// LazyJavaCompletionProposal proposal = (LazyJavaCompletionProposal) results[i]; // TODO: eclipse bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=84998
17 years, 1 month
JBoss Tools SVN: r4670 - trunk/documentation/qa.
by jbosstools-commits@lists.jboss.org
Author: anis
Date: 2007-11-02 13:26:28 -0400 (Fri, 02 Nov 2007)
New Revision: 4670
Removed:
trunk/documentation/qa/RHDS Testcases.doc
trunk/documentation/qa/RHDS-Testcases.doc
Log:
Removed file/folder
Deleted: trunk/documentation/qa/RHDS Testcases.doc
===================================================================
(Binary files differ)
Deleted: trunk/documentation/qa/RHDS-Testcases.doc
===================================================================
(Binary files differ)
17 years, 1 month
JBoss Tools SVN: r4669 - trunk/documentation/qa.
by jbosstools-commits@lists.jboss.org
Author: anis
Date: 2007-11-02 13:26:12 -0400 (Fri, 02 Nov 2007)
New Revision: 4669
Added:
trunk/documentation/qa/RedHatDevStudio Testcases.zip
Log:
Added a file remotely
Added: trunk/documentation/qa/RedHatDevStudio Testcases.zip
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/qa/RedHatDevStudio Testcases.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 1 month
JBoss Tools SVN: r4668 - in trunk/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: sdzmitrovich
Date: 2007-11-02 12:43:59 -0400 (Fri, 02 Nov 2007)
New Revision: 4668
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/calendar/calendar.css
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCalendarTemplate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1247
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/calendar/calendar.css
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/calendar/calendar.css 2007-11-02 16:10:24 UTC (rev 4667)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/calendar/calendar.css 2007-11-02 16:43:59 UTC (rev 4668)
@@ -71,6 +71,10 @@
vertical-align: middle;
}
+.rich-calendar-days-holly {
+ color: RED;
+}
+
.rich-calendar-week {
border-bottom: 1px solid #c0c0c0; /*panelBorderColor*/
border-right: 1px solid #c0c0c0; /*panelBorderColor*/
@@ -83,7 +87,7 @@
}
.rich-calendar-holly {
- background-color: # #FFEBDA; /*unknown parameter - need to add*/
+ background-color: #FFEBDA; /*unknown parameter - need to add*/
color: #FF7800; /*unknown parameter - need to add*/
}
@@ -134,4 +138,14 @@
.rich-calendar-popupicon {
cursor: pointer;
vertical-align: middle;
+}
+
+.rich-calendar-today {
+ background-color: #ff7800; /*unknown parameter - need to add*/
+ color: #ffebda; /*unknown parameter - need to add*/
+ font-weight: bold;
+}
+
+.rich-calendar-other-month {
+ color: #C7D7EC
}
\ No newline at end of file
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCalendarTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCalendarTemplate.java 2007-11-02 16:10:24 UTC (rev 4667)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCalendarTemplate.java 2007-11-02 16:43:59 UTC (rev 4668)
@@ -11,7 +11,9 @@
package org.jboss.tools.jsf.vpe.richfaces.template;
import java.text.SimpleDateFormat;
+import java.util.ArrayList;
import java.util.Calendar;
+import java.util.List;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
import org.jboss.tools.jsf.vpe.richfaces.HtmlComponentUtil;
@@ -35,36 +37,53 @@
public class RichFacesCalendarTemplate extends VpeAbstractTemplate {
static String[] HEADER_CONTENT = { "<<", "<", "", ">", ">>" };
+ private List<String> holidays = new ArrayList<String>();
private String[] weeks = new String[7];
- private int[] monthDays = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
-
+ final static int MONTH_LENGTH[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31,
+ 30, 31 };
+ final static int LEAP_MONTH_LENGTH[] = { 31, 29, 31, 30, 31, 30, 31, 31,
+ 30, 31, 30, 31 };
final static String STYLE_PATH = "calendar/calendar.css";
final static String BUTTON_IMG = "calendar/calendar.gif";
final static int COLUMN = 8;
final static String FILL_WIDTH = "100%";
final static int NUM_DAYS_IN_WEEK = 7;
+ final static int NUM_WEEK_ON_PAGE = 6;
final static String TODAY = "Today";
final static int CALENDAR_WIDTH = 200;
final static int CALENDAR_IMAGE_WIDTH = 20;
final static String ATTRIBUTE_POPUP = "popup";
final static String ATTRIBUTE_TEXT = "text";
-
+
+ final static String WEEK_DAY_HTML_CLASS_ATTR = "rich-calendar-days";
+ final static String HOL_WEEK_DAY_HTML_CLASS_ATTR = "rich-calendar-days rich-calendar-days-holly";
+ final static String TODAY_HTML_CLASS_ATTR = "rich-cell-size rich-calendar-cell rich-calendar-today ";
+ final static String CUR_MONTH_HTML_CLASS_ATTR = "rich-cell-size rich-calendar-cell";
+ final static String HOL_CUR_MONTH_HTML_CLASS_ATTR = "rich-cell-size rich-calendar-cell rich-calendar-holly "/* rich-right-cell " */;
+ final static String OTHER_MONTH_HTML_CLASS_ATTR = "rich-cell-size rich-calendar-cell rich-calendar-other-month ";
+ final static String HOL_OTHER_MONTH_HTML_CLASS_ATTR = "rich-cell-size rich-calendar-cell rich-calendar-holly rich-calendar-other-month" /* rich-right-cell " */;
+
public RichFacesCalendarTemplate() {
- super();
- Calendar cal = Calendar.getInstance();
- int firstDayOfWeek = cal.getFirstDayOfWeek();
- while (firstDayOfWeek != cal.get(Calendar.DAY_OF_WEEK)) {
- cal.add(Calendar.DAY_OF_MONTH, 1);
- }
+ super();
+ Calendar cal = Calendar.getInstance();
+ int firstDayOfWeek = cal.getFirstDayOfWeek();
+ while (firstDayOfWeek != cal.get(Calendar.DAY_OF_WEEK)) {
+ cal.add(Calendar.DAY_OF_MONTH, 1);
+ }
- SimpleDateFormat sdf = new SimpleDateFormat("EE");
- for (int i = 0; i < NUM_DAYS_IN_WEEK; i++) {
- weeks[i] = new String(sdf.format(cal.getTime()));
- cal.add(Calendar.DAY_OF_MONTH, 1);
+ SimpleDateFormat sdf = new SimpleDateFormat("EE");
+ String dayOfWeek = "";
+ for (int i = 0; i < NUM_DAYS_IN_WEEK; i++) {
+ dayOfWeek = sdf.format(cal.getTime());
+ weeks[i] = dayOfWeek;
+ if (cal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY
+ || cal.get(Calendar.DAY_OF_WEEK) == Calendar.SATURDAY)
+ holidays.add(dayOfWeek);
+ cal.add(Calendar.DAY_OF_MONTH, 1);
+ }
+
}
- }
-
/**
* Creates a node of the visual tree on the node of the source tree. This
* visual node should not have the parent node This visual node can have
@@ -239,177 +258,181 @@
}
/**
- *
- * @param visualDocument
- * @return Node of the visual tree.
- */
- private nsIDOMElement createCalendarBody(nsIDOMDocument visualDocument) {
- nsIDOMElement tbody = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TBODY);
+ *
+ * @param visualDocument
+ * @return Node of the visual tree.
+ */
+ private nsIDOMElement createCalendarBody(nsIDOMDocument visualDocument) {
- nsIDOMElement bodyTR = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
- for (int i = 0; i < COLUMN; i++) {
- nsIDOMElement td = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
- td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- "rich-calendar-days");
- if (i == 0) {
- nsIDOMElement br = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_BR);
- td.appendChild(br);
- } else {
- nsIDOMText text = visualDocument.createTextNode(i == 0 ? ""
- : weeks[i - 1]);
- td.appendChild(text);
- }
- bodyTR.appendChild(td);
- }
+ nsIDOMElement tbody = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TBODY);
- tbody.appendChild(bodyTR);
+ nsIDOMElement bodyTR = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TR);
- // // Calendar body
- int jumped = 0;
- int inserted = 1;
+ Calendar cal1 = Calendar.getInstance();
- Calendar cal = Calendar.getInstance();
- int month = cal.get(Calendar.MONTH);
- int day = cal.get(Calendar.DAY_OF_WEEK);
- int dayN = cal.get(Calendar.DAY_OF_MONTH);
- int days = monthDays[month];
- if (month == 1) {
- int year = cal.get(Calendar.YEAR);
- if (year % 4 == 0)
- days = 29;
- }
+ SimpleDateFormat wdf = new SimpleDateFormat("EE");
- int start = day - (dayN % NUM_DAYS_IN_WEEK + cal.getFirstDayOfWeek() - 1);
- if (start < 0)
- start += NUM_DAYS_IN_WEEK;
- int weeks = (start + days) / NUM_DAYS_IN_WEEK;
- if ((start + days) % NUM_DAYS_IN_WEEK != 0)
- weeks++;
- for (int i = weeks; i > 0; i--) {
- nsIDOMElement tr = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
- // Week in year
- nsIDOMElement weekTD = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
- weekTD.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- "rich-calendar-week");
- cal.set(Calendar.DAY_OF_MONTH, inserted);
- nsIDOMText weekText = visualDocument.createTextNode(""
- + cal.get(Calendar.WEEK_OF_YEAR));
- weekTD.appendChild(weekText);
- tr.appendChild(weekTD);
- for (int j = NUM_DAYS_IN_WEEK; j > 0; j--) {
- nsIDOMElement td = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
- if (jumped < start || inserted > days) {
- cal.set(Calendar.DAY_OF_MONTH, inserted);
- int dayOfWeek = cal.get(Calendar.DAY_OF_WEEK);
- td
- .setAttribute(
- HtmlComponentUtil.HTML_CLASS_ATTR,
- (dayOfWeek == Calendar.SATURDAY || dayOfWeek == Calendar.SUNDAY) ? "rich-cell-size rich-calendar-cell rich-calendar-holly rich-right-cell"
- : "rich-cell-size rich-calendar-cell rich-calendar-cell");
- nsIDOMElement br = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_BR);
- td.appendChild(br);
- tr.appendChild(td);
- jumped++;
- } else {
- if (inserted == dayN) {
+ cal1.set(Calendar.WEEK_OF_MONTH, Calendar.SATURDAY);
+ System.out.print(wdf.format(cal1.getTime()));
- td
- .setAttribute(
- HtmlComponentUtil.HTML_CLASS_ATTR,
- "rich-cell-size rich-calendar-cell rich-calendar-today ");
- nsIDOMText text = visualDocument.createTextNode(""
- + inserted);
- td.appendChild(text);
- tr.appendChild(td);
- } else {
- cal.set(Calendar.DAY_OF_MONTH, inserted);
- int dayOfWeek = cal.get(Calendar.DAY_OF_WEEK);
- td
- .setAttribute(
- HtmlComponentUtil.HTML_CLASS_ATTR,
- (dayOfWeek == Calendar.SATURDAY || dayOfWeek == Calendar.SUNDAY) ? "rich-cell-size rich-calendar-cell rich-calendar-holly rich-right-cell "
- : "rich-cell-size rich-calendar-cell");
- nsIDOMText text = visualDocument.createTextNode(""
- + inserted);
- td.appendChild(text);
- tr.appendChild(td);
- }
- inserted++;
+ for (int i = 0; i < COLUMN; i++) {
+ nsIDOMElement td = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+
+ if (i == 0) {
+ td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ WEEK_DAY_HTML_CLASS_ATTR);
+ nsIDOMElement br = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_BR);
+ td.appendChild(br);
+ } else {
+ if (holidays.contains(weeks[i - 1])) {
+ td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ HOL_WEEK_DAY_HTML_CLASS_ATTR);
+ } else {
+ td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ WEEK_DAY_HTML_CLASS_ATTR);
+ }
+ nsIDOMText text = visualDocument.createTextNode(i == 0 ? ""
+ : weeks[i - 1]);
+ td.appendChild(text);
+ }
+ bodyTR.appendChild(td);
}
- }
- tbody.appendChild(tr);
- }
- // Footer for calendar
+ tbody.appendChild(bodyTR);
- nsIDOMElement tr = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ // Calendar body
- nsIDOMElement td = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
- td.setAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN, "" + COLUMN);
+ Calendar cal = Calendar.getInstance();
- nsIDOMElement table = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
- table.setAttribute(HtmlComponentUtil.HTML_CELLSPACING_ATTR, "0");
- table.setAttribute(HtmlComponentUtil.HTML_CELLPADDING_ATTR, "0");
- table.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR, "0");
- table.setAttribute(HtmlComponentUtil.HTML_ATR_WIDTH, FILL_WIDTH);
+ int month = cal.get(Calendar.MONTH);
+ int day = cal.get(Calendar.DAY_OF_WEEK);
+ int dayN = cal.get(Calendar.DAY_OF_MONTH);
+ int start = day - (dayN % NUM_DAYS_IN_WEEK + cal.getFirstDayOfWeek());
- nsIDOMElement tr1 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ cal.add(Calendar.DAY_OF_MONTH, -(start + dayN));
- nsIDOMElement td1 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
- td1.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- "rich-calendar-toolfooter");
+ for (int i = NUM_WEEK_ON_PAGE; i > 0; i--) {
- SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy");
- cal = Calendar.getInstance();
+ nsIDOMElement tr = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ // Week in year
+ nsIDOMElement weekTD = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ weekTD.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ "rich-calendar-week");
+ nsIDOMText weekText = visualDocument.createTextNode(""
+ + cal.get(Calendar.WEEK_OF_YEAR));
+ weekTD.appendChild(weekText);
+ tr.appendChild(weekTD);
+ for (int j = NUM_DAYS_IN_WEEK; j > 0; j--) {
- nsIDOMText text1 = visualDocument.createTextNode(sdf.format(cal
- .getTime()));
- td1.appendChild(text1);
- tr1.appendChild(td1);
+ nsIDOMElement td = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
- nsIDOMElement td2 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
- td2.setAttribute(HtmlComponentUtil.HTML_ATR_WIDTH, FILL_WIDTH);
- td2.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- "rich-calendar-toolfooter");
- tr1.appendChild(td2);
+ String currentAttr = "";
- nsIDOMElement td3 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
- td3.setAttribute(HtmlComponentUtil.HTML_ATR_WIDTH, FILL_WIDTH);
- td3.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- "rich-calendar-toolfooter");
- td3.setAttribute(HtmlComponentUtil.HTML_ALIGN_ATTR,
- HtmlComponentUtil.HTML_ALIGN_RIGHT_VALUE);
- nsIDOMText text3 = visualDocument.createTextNode(TODAY);
- td3.appendChild(text3);
- tr1.appendChild(td3);
+ int dayOfWeek = cal.get(Calendar.DAY_OF_WEEK);
- table.appendChild(tr1);
- td.appendChild(table);
- tr.appendChild(td);
+ if (cal.get(Calendar.MONTH) == month) {
- tbody.appendChild(tr);
+ // if this is current day
+ if (cal.get(Calendar.DAY_OF_MONTH) == dayN
+ && cal.get(Calendar.MONTH) == month) {
+ currentAttr = TODAY_HTML_CLASS_ATTR;
- return tbody;
- }
+ } else if (dayOfWeek == Calendar.SATURDAY
+ || dayOfWeek == Calendar.SUNDAY) {
+ currentAttr = HOL_CUR_MONTH_HTML_CLASS_ATTR;
+ } else {
+ currentAttr = CUR_MONTH_HTML_CLASS_ATTR;
+ }
+ } else {
+ if (dayOfWeek == Calendar.SATURDAY
+ || dayOfWeek == Calendar.SUNDAY) {
+ currentAttr = HOL_OTHER_MONTH_HTML_CLASS_ATTR;
+ } else {
+ currentAttr = OTHER_MONTH_HTML_CLASS_ATTR;
+ }
+ }
+ td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, currentAttr);
+ nsIDOMText text = visualDocument.createTextNode(""
+ + cal.get(Calendar.DAY_OF_MONTH));
+ td.appendChild(text);
+ tr.appendChild(td);
+
+ cal.add(Calendar.DAY_OF_MONTH, 1);
+
+ }
+ tbody.appendChild(tr);
+ }
+
+ // Footer for calendar
+
+ nsIDOMElement tr = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TR);
+
+ nsIDOMElement td = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ td.setAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN, "" + COLUMN);
+
+ nsIDOMElement table = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
+ table.setAttribute(HtmlComponentUtil.HTML_CELLSPACING_ATTR, "0");
+ table.setAttribute(HtmlComponentUtil.HTML_CELLPADDING_ATTR, "0");
+ table.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR, "0");
+ table.setAttribute(HtmlComponentUtil.HTML_ATR_WIDTH, FILL_WIDTH);
+
+ nsIDOMElement tr1 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TR);
+
+ nsIDOMElement td1 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ td1.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ "rich-calendar-toolfooter");
+
+ SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy");
+ cal = Calendar.getInstance();
+
+ nsIDOMText text1 = visualDocument.createTextNode(sdf.format(cal
+ .getTime()));
+ td1.appendChild(text1);
+ tr1.appendChild(td1);
+
+ nsIDOMElement td2 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ td2.setAttribute(HtmlComponentUtil.HTML_ATR_WIDTH, FILL_WIDTH);
+ td2.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ "rich-calendar-toolfooter");
+ tr1.appendChild(td2);
+
+ nsIDOMElement td3 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ td3.setAttribute(HtmlComponentUtil.HTML_ATR_WIDTH, FILL_WIDTH);
+ td3.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ "rich-calendar-toolfooter");
+ td3.setAttribute(HtmlComponentUtil.HTML_ALIGN_ATTR,
+ HtmlComponentUtil.HTML_ALIGN_RIGHT_VALUE);
+ nsIDOMText text3 = visualDocument.createTextNode(TODAY);
+ td3.appendChild(text3);
+ tr1.appendChild(td3);
+
+ table.appendChild(tr1);
+ td.appendChild(table);
+ tr.appendChild(td);
+
+ tbody.appendChild(tr);
+
+ return tbody;
+ }
+
/**
- *
- */
+ *
+ */
public void setAttribute(VpePageContext pageContext, Element sourceElement,
nsIDOMDocument visualDocument, nsIDOMNode visualNode, Object data,
String name, String value) {
17 years, 1 month
JBoss Tools SVN: r4666 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-11-02 12:01:36 -0400 (Fri, 02 Nov 2007)
New Revision: 4666
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetProjectCreationDataModelProvider.java
Log:
JBIDE-1230
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetProjectCreationDataModelProvider.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetProjectCreationDataModelProvider.java 2007-11-02 15:44:56 UTC (rev 4665)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetProjectCreationDataModelProvider.java 2007-11-02 16:01:36 UTC (rev 4666)
@@ -81,7 +81,10 @@
if(r == null) {
r = s.addNewSection(JSFUiPlugin.PLUGIN_ID + ".jsfFacetInstall");
}
- r.put("deployImplType", "SERVER_SUPPLIED");
+ String deployImplType = r.get("deployImplType");
+ if(deployImplType == null || !deployImplType.endsWith("_SUPPLIED")) {
+ r.put("deployImplType", "SERVER_SUPPLIED");
+ }
IDialogSettings u = r.getSection("urlMappings");
if(u == null) {
u = r.addNewSection("urlMappings");
17 years, 2 months
JBoss Tools SVN: r4665 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-11-02 11:44:56 -0400 (Fri, 02 Nov 2007)
New Revision: 4665
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetProjectCreationDataModelProvider.java
Log:
JBIDE-1230
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetProjectCreationDataModelProvider.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetProjectCreationDataModelProvider.java 2007-11-02 15:40:32 UTC (rev 4664)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetProjectCreationDataModelProvider.java 2007-11-02 15:44:56 UTC (rev 4665)
@@ -81,6 +81,7 @@
if(r == null) {
r = s.addNewSection(JSFUiPlugin.PLUGIN_ID + ".jsfFacetInstall");
}
+ r.put("deployImplType", "SERVER_SUPPLIED");
IDialogSettings u = r.getSection("urlMappings");
if(u == null) {
u = r.addNewSection("urlMappings");
17 years, 2 months