diff options
3 files changed, 76 insertions, 2 deletions
diff --git a/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/metadata/trinidad_dti.xml b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/metadata/trinidad_dti.xml index 3b9c0b7fd..5b1cd5e5e 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/metadata/trinidad_dti.xml +++ b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/metadata/trinidad_dti.xml @@ -858,8 +858,7 @@ </tag-convert-info> <tag-decorate-info id="vpd-decorate-design" multiLevel="true" - widget="true" - setNonVisualChildElements="true" + needBorderDecorator="true" /> </value> </trait> diff --git a/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/elementedit/PanelFormLayoutChildElementEdit.java b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/elementedit/PanelFormLayoutChildElementEdit.java new file mode 100644 index 000000000..47b376f6d --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/elementedit/PanelFormLayoutChildElementEdit.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2008 Oracle Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Oracle Corporation - initial API and implementation + */ +package org.eclipse.jst.jsf.apache.trinidad.tagsupport.elementedit; + +import org.eclipse.gef.EditPart; +import org.eclipse.jst.jsf.apache.trinidad.tagsupport.ITrinidadConstants; +import org.eclipse.jst.jsf.common.dom.TagIdentifier; +import org.eclipse.jst.jsf.core.internal.tld.IJSFConstants; +import org.eclipse.jst.pagedesigner.parts.ElementEditPart; +import org.w3c.dom.Element; + +/** + * IElementEdit implementation for Trinidad tags that are potentially children + * of the panelFormLayout tag, and therefore may need to refresh panelFormLayout + * on model change. + * + * @author Ian Trimble - Oracle + */ +public class PanelFormLayoutChildElementEdit extends + DefaultTrinidadCoreElementEdit { + + /* (non-Javadoc) + * @see org.eclipse.jst.pagedesigner.elementedit.AbstractElementEdit#handleModelChange(org.w3c.dom.Element, org.eclipse.jst.pagedesigner.parts.ElementEditPart, boolean) + */ + @Override + public boolean handleModelChange(Element ele, ElementEditPart part, + boolean recursive) { + boolean handled = false; + EditPart parentPart = part.getParent(); + while (parentPart instanceof ElementEditPart) { + ElementEditPart parentElementEditPart = (ElementEditPart)parentPart; + TagIdentifier tagID = parentElementEditPart.getTagIdentifier(); + if (tagID != null) { + if (ITrinidadConstants.TAG_IDENTIFIER_PANELFORMLAYOUT.isSameTagType(tagID)) { + parentElementEditPart.refreshModelChange(recursive); + handled = true; + break; + } else if ( + ITrinidadConstants.TAG_IDENTIFIER_GROUP.isSameTagType(tagID) || + IJSFConstants.TAG_IDENTIFIER_FACET.isSameTagType(tagID)) { + parentPart = parentPart.getParent(); + } else { + break; + } + } + } + return handled; + } + +} diff --git a/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/elementedit/TrinidadCoreElementEditFactory.java b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/elementedit/TrinidadCoreElementEditFactory.java index 9460623ad..3a1d3c688 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/elementedit/TrinidadCoreElementEditFactory.java +++ b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/elementedit/TrinidadCoreElementEditFactory.java @@ -39,6 +39,23 @@ public class TrinidadCoreElementEditFactory extends AbstractElementEditFactory { return new PanelTabbedElementEdit(); } else if (ITrinidadConstants.TAG_IDENTIFIER_SHOWDETAILITEM.isSameTagType(tagIdentifier)) { return new ShowDetailItemElementEdit(); + } else if ( + ITrinidadConstants.TAG_IDENTIFIER_INPUTCOLOR.isSameTagType(tagIdentifier) || + ITrinidadConstants.TAG_IDENTIFIER_INPUTDATE.isSameTagType(tagIdentifier) || + ITrinidadConstants.TAG_IDENTIFIER_INPUTFILE.isSameTagType(tagIdentifier) || + ITrinidadConstants.TAG_IDENTIFIER_INPUTLISTOFVALUES.isSameTagType(tagIdentifier) || + ITrinidadConstants.TAG_IDENTIFIER_INPUTNUMBERSPINBOX.isSameTagType(tagIdentifier) || + ITrinidadConstants.TAG_IDENTIFIER_INPUTTEXT.isSameTagType(tagIdentifier) || + ITrinidadConstants.TAG_IDENTIFIER_SELECTBOOLEANCHECKBOX.isSameTagType(tagIdentifier) || + ITrinidadConstants.TAG_IDENTIFIER_SELECTBOOLEANRADIO.isSameTagType(tagIdentifier) || + ITrinidadConstants.TAG_IDENTIFIER_SELECTMANYCHECKBOX.isSameTagType(tagIdentifier) || + ITrinidadConstants.TAG_IDENTIFIER_SELECTMANYLISTBOX.isSameTagType(tagIdentifier) || + ITrinidadConstants.TAG_IDENTIFIER_SELECTONECHOICE.isSameTagType(tagIdentifier) || + ITrinidadConstants.TAG_IDENTIFIER_SELECTONELISTBOX.isSameTagType(tagIdentifier) || + ITrinidadConstants.TAG_IDENTIFIER_SELECTONERADIO.isSameTagType(tagIdentifier) || + ITrinidadConstants.TAG_IDENTIFIER_PANELLABELANDMESSAGE.isSameTagType(tagIdentifier) + ) { + return new PanelFormLayoutChildElementEdit(); } else { return new DefaultTrinidadCoreElementEdit(); } |