Author: dgolovin
Date: 2012-01-17 14:14:35 -0500 (Tue, 17 Jan 2012)
New Revision: 37910
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/Facelets.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/Messages.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/messages.properties
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/JsfLocaleProvider.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/VpeElementProxyData.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/ComponentUtil.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JSF.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfTemplateInvocationHandler.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/NodeProxyUtil.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/AttributeMap.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFaces.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAdapterFactory.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamUtil.java
Removed:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/messages/
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/util/
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/util/
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/i18n/
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/ComponentUtil.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/JSF.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/NodeProxyUtil.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/model/
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/proxy/
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/util/
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFLogTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFStatusTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeCompositionTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeDecorateTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeDefineTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeInsertTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/META-INF/MANIFEST.MF
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/plugin.xml
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstarctLinkJsfTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractEditableJsfTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractOutputJsfTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JSF2CompositeAttributeTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfBodyTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfFacet.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfForm.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfInputTextAreaTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfInputTextTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputFormatTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputLabelTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputLinkTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputScriptTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputTextTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectManyCheckbox.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectManyListbox.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectOneListbox.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectOneMenuTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectOneRadioTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSubView.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfView.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/selectitem/AbstractCheckboxSelectItemTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/selectitem/AbstractOptionSelectItemTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/selectitem/AbstractRadioSelectItemTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/selectitem/AbstractSelectItemTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/selectitem/SelectItemType.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/META-INF/MANIFEST.MF
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/plugin.xml
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/HtmlComponentUtil.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/InputNumberSliderTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractInplaceTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAutocompleteTemplate.java
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/RichFacesCollapsibleSubTableTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCollapsibleSubTableTogglerTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColumnGroupTemplate.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/RichFacesComboBoxTemplateHelper.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataDefinitionListTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataFilterSliderTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataGridTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataListTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataOrderedListTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableChildrenEncoder.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableScrollerTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableStyleClassesApplier.java
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/RichFacesDropDownMenuTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesEditorTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesExtendedDataTableTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesFileUploadTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesGMapTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceInputTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInputNumberSpinnerTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesLayoutPanelTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesLayoutTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesListShuttleTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesListTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMenuGroupTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMenuItemTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessageTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessagesTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPageTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPaint2DTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelBarTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelItemTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPickListTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesProgressBarTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSelectTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSimpleTogglePanelTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSpacerTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableToggleControlTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabPanelTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesToggleControlTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamDecorateTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamGraphicImageTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamLinkTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfAbstractChapterTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfAbstractTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfBarChartTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfCellTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfDocumentTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfFontTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfFooterTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfHTMLTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfLineChartTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfParagraphTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfPieChartTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfSectionTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfTableTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfTextTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfTitleTemplate.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/OpenOnJsf20Test_JBIDE5382.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/TestFViewLocaleAttribute_JBIDE5218.java
Log:
packages structure unified for vpe template plugins
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFLogTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFLogTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFLogTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -15,7 +15,7 @@
import java.util.List;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
+import org.jboss.tools.jsf.vpe.richfaces.template.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFStatusTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFStatusTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFStatusTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -10,9 +10,9 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.ajax4jsf.template;
-import org.jboss.tools.jsf.vpe.jsf.template.util.model.VpeElementProxyData;
+import org.jboss.tools.jsf.vpe.jsf.VpeElementProxyData;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
+import org.jboss.tools.jsf.vpe.richfaces.template.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.mapping.AttributeData;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
Copied:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/Facelets.java
(from rev 37881,
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/util/Facelets.java)
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/Facelets.java
(rev 0)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/Facelets.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.jsf.vpe.facelets;
+
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+
+/**
+ * @author Sergey Dzmitrovich
+ *
+ */
+public class Facelets {
+
+ public static final String TAG_DEFINE = "define"; //$NON-NLS-1$
+
+ public static final String TAG_PARAM = "param"; //$NON-NLS-1$
+
+ public static final String ATTR_NAME = "name"; //$NON-NLS-1$
+
+ public static final String ATTR_VALUE = "value"; //$NON-NLS-1$
+
+ public static final String ATTR_TEMPLATE = "template"; //$NON-NLS-1$
+
+ /**
+ * Creates and returns a DIV element composed of name of JSP tag
+ * and the errorMessage.
+ * <P>
+ * Should be used to show messages in the VPE like:
+ * <pre>ui:composition Template is not found.</pre>
+ */
+ public static nsIDOMElement createErrorMessageElement(
+ nsIDOMDocument visualDocument,
+ String tagName, String errorMessage) {
+
+ final String ANY_TAG_CAPTION_CLASS = "__any__tag__caption"; //$NON-NLS-1$
+ final String MESSAGE_STYLE = "color:red;font-style:italic;"; //$NON-NLS-1$
+
+ nsIDOMElement element = visualDocument.createElement(HTML.TAG_DIV);
+
+ nsIDOMElement nameTag = visualDocument.createElement(HTML.TAG_SPAN);
+ nameTag.setAttribute(HTML.ATTR_CLASS, ANY_TAG_CAPTION_CLASS);
+ nameTag.appendChild(visualDocument.createTextNode(tagName));
+ element.appendChild(nameTag);
+
+ nsIDOMElement messageTag = visualDocument.createElement(HTML.TAG_SPAN);
+ messageTag.setAttribute(HTML.ATTR_CLASS, ANY_TAG_CAPTION_CLASS);
+ messageTag.setAttribute(HTML.ATTR_STYLE, MESSAGE_STYLE);
+ messageTag.appendChild(visualDocument.createTextNode(
+ " " + errorMessage));//$NON-NLS-1$
+ element.appendChild(messageTag);
+
+ return element;
+ }
+
+}
Copied:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/Messages.java
(from rev 37881,
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/messages/Messages.java)
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/Messages.java
(rev 0)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/Messages.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.vpe.facelets;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author yradtsevich
+ *
+ */
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME
+ = "org.jboss.tools.jsf.vpe.facelets.messages";//$NON-NLS-1$
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+ private Messages(){}
+
+ public static String TEMPLATE_NOT_FOUND;
+ public static String UNKNOWN_NAME;
+ public static String NAME_NOT_SPECIFIED;
+}
Copied:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/messages.properties
(from rev 37881,
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/messages/messages.properties)
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/messages.properties
(rev 0)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/messages.properties 2012-01-17
19:14:35 UTC (rev 37910)
@@ -0,0 +1,3 @@
+TEMPLATE_NOT_FOUND=Template file is not found: "{0}"
+UNKNOWN_NAME=Unknown name: "{0}"
+NAME_NOT_SPECIFIED=Name is not specified.
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeCompositionTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeCompositionTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeCompositionTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -13,9 +13,8 @@
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.Region;
import org.eclipse.osgi.util.NLS;
-import org.jboss.tools.jsf.vpe.facelets.template.messages.Messages;
-import org.jboss.tools.jsf.vpe.facelets.template.util.Facelets;
-import org.jboss.tools.jsf.vpe.facelets.util.FaceletsUtil;
+import org.jboss.tools.jsf.vpe.facelets.Facelets;
+import org.jboss.tools.jsf.vpe.facelets.Messages;
import org.jboss.tools.jst.jsp.util.NodesManagingUtil;
import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.context.VpePageContext;
@@ -50,7 +49,7 @@
if (fileName != null) {
container.setAttribute(HTML.ATTR_STYLE, "border: 1px dashed #2A7F00");
//$NON-NLS-1$
String message = NLS.bind(Messages.TEMPLATE_NOT_FOUND, fileName);
- container.appendChild(FaceletsUtil.createErrorMessageElement(
+ container.appendChild(Facelets.createErrorMessageElement(
visualDocument, sourceElement.getNodeName(), message));
}
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeDecorateTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeDecorateTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeDecorateTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -12,16 +12,17 @@
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.Region;
-import org.jboss.tools.jsf.vpe.facelets.template.util.Facelets;
+import org.jboss.tools.jsf.vpe.facelets.Facelets;
import org.jboss.tools.jst.jsp.util.NodesManagingUtil;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.template.VpeDefineContainerTemplate;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMNode;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
-public class VpeDecorateTemplate extends
org.jboss.tools.vpe.editor.template.VpeDefineContainerTemplate{
+public class VpeDecorateTemplate extends VpeDefineContainerTemplate{
public VpeCreationData create(VpePageContext pageContext,
Node sourceNode, nsIDOMDocument visualDocument) {
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeDefineTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeDefineTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeDefineTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -11,9 +11,8 @@
package org.jboss.tools.jsf.vpe.facelets.template;
import org.eclipse.osgi.util.NLS;
-import org.jboss.tools.jsf.vpe.facelets.template.messages.Messages;
-import org.jboss.tools.jsf.vpe.facelets.template.util.Facelets;
-import org.jboss.tools.jsf.vpe.facelets.util.FaceletsUtil;
+import org.jboss.tools.jsf.vpe.facelets.Facelets;
+import org.jboss.tools.jsf.vpe.facelets.Messages;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
@@ -71,7 +70,7 @@
message = Messages.NAME_NOT_SPECIFIED;
}
- container.appendChild(FaceletsUtil.createErrorMessageElement(
+ container.appendChild(Facelets.createErrorMessageElement(
visualDocument, sourceElement.getNodeName(), message));
return new VpeCreationData(container);
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeInsertTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeInsertTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeInsertTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -13,7 +13,7 @@
import java.util.ArrayList;
import java.util.List;
-import org.jboss.tools.jsf.vpe.facelets.template.util.Facelets;
+import org.jboss.tools.jsf.vpe.facelets.Facelets;
import org.jboss.tools.vpe.editor.VpeIncludeInfo;
import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.context.VpePageContext;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/META-INF/MANIFEST.MF 2012-01-17 19:07:46
UTC (rev 37909)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/META-INF/MANIFEST.MF 2012-01-17 19:14:35
UTC (rev 37910)
@@ -21,10 +21,9 @@
org.eclipse.ui.editors;bundle-version="3.7.0",
org.jboss.tools.vpe.xulrunner
Bundle-ActivationPolicy: lazy
-Export-Package: org.jboss.tools.jsf.vpe.jsf.template,
- org.jboss.tools.jsf.vpe.jsf.template.selectitem,
- org.jboss.tools.jsf.vpe.jsf.template.util,
- org.jboss.tools.jsf.vpe.jsf.template.util.model
+Export-Package: org.jboss.tools.jsf.vpe.jsf,
+ org.jboss.tools.jsf.vpe.jsf.template,
+ org.jboss.tools.jsf.vpe.jsf.template.selectitem
Bundle-Localization: plugin
Import-Package: org.eclipse.wst.sse.ui,
org.jboss.tools.jst.web.tld
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/plugin.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/plugin.xml 2012-01-17 19:07:46 UTC (rev
37909)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/plugin.xml 2012-01-17 19:14:35 UTC (rev
37910)
@@ -10,7 +10,7 @@
<extension
point="org.jboss.tools.jst.jsp.localeProvider">
<localeProvider
- class="org.jboss.tools.jsf.vpe.jsf.i18n.JsfLocaleProvider">
+ class="org.jboss.tools.jsf.vpe.jsf.JsfLocaleProvider">
</localeProvider>
<nature
id="org.jboss.tools.jsf.jsfnature">
Copied:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/JsfLocaleProvider.java
(from rev 37881,
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/i18n/JsfLocaleProvider.java)
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/JsfLocaleProvider.java
(rev 0)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/JsfLocaleProvider.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.vpe.jsf;
+
+import java.util.Locale;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.jboss.tools.common.model.XModel;
+import org.jboss.tools.common.model.project.IModelNature;
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.jsf.model.helpers.converter.OpenKeyHelper;
+import org.jboss.tools.jst.jsp.i18n.ILocaleProvider;
+
+/**
+ * Implementation of {@link ILocaleProvider} for JSF projects.
+ *
+ * @author yradtsevich
+ */
+public class JsfLocaleProvider implements ILocaleProvider {
+
+ /*
+ * Stores the string representation of the current locale.
+ */
+ private String localeString = ""; //$NON-NLS-1$
+
+ /**
+ * Returns the locale for given {@code editor}, or {@code null} if it
+ * can not determine it.
+ */
+ public Locale getLocale(ITextEditor editor) {
+ IEditorInput editorInput = editor.getEditorInput();
+ IProject fileProject = null;
+ if (editorInput instanceof IFileEditorInput) {
+ fileProject=((IFileEditorInput)editorInput).getFile().getProject();
+ }
+ return getLocale(fileProject);
+ }
+
+ public String getLocaleString() {
+ return localeString;
+ }
+
+ public Locale getLocale(IProject project) {
+ if (project !=null) {
+
+ IModelNature modelNature = EclipseResourceUtil.getModelNature(project);
+ if (modelNature == null) {
+ return null;
+ }
+ XModel model = modelNature.getModel();
+ localeString = OpenKeyHelper.getDeafultLocaleFromFacesConfig(model);
+ return new Locale(localeString);
+ } else {
+ return null;
+ }
+ }
+
+}
Copied:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/VpeElementProxyData.java
(from rev 37881,
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/model/VpeElementProxyData.java)
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/VpeElementProxyData.java
(rev 0)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/VpeElementProxyData.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.vpe.jsf;
+
+import org.jboss.tools.vpe.editor.mapping.VpeElementData;
+import org.w3c.dom.NodeList;
+
+/**
+ *
+ */
+public class VpeElementProxyData extends VpeElementData {
+
+ private NodeList nodelist;
+
+ public NodeList getNodelist() {
+ return nodelist;
+ }
+
+ public void setNodelist(NodeList nodelist) {
+ this.nodelist = nodelist;
+ }
+
+}
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstarctLinkJsfTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstarctLinkJsfTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstarctLinkJsfTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -13,7 +13,6 @@
import java.util.HashSet;
import java.util.Set;
-import org.jboss.tools.jsf.vpe.jsf.template.util.ComponentUtil;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractEditableJsfTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractEditableJsfTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractEditableJsfTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -19,7 +19,6 @@
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.Region;
import org.eclipse.wst.xml.core.internal.document.AttrImpl;
-import org.jboss.tools.jsf.vpe.jsf.template.util.JSF;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.util.HTML;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractOutputJsfTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractOutputJsfTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractOutputJsfTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -13,9 +13,7 @@
import org.eclipse.swt.graphics.Point;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
-import org.jboss.tools.jsf.vpe.jsf.template.util.JSF;
-import org.jboss.tools.jsf.vpe.jsf.template.util.NodeProxyUtil;
-import org.jboss.tools.jsf.vpe.jsf.template.util.model.VpeElementProxyData;
+import org.jboss.tools.jsf.vpe.jsf.VpeElementProxyData;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.mapping.AttributeData;
import org.jboss.tools.vpe.editor.mapping.NodeData;
Copied:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/ComponentUtil.java
(from rev 37881,
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/ComponentUtil.java)
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/ComponentUtil.java
(rev 0)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/ComponentUtil.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -0,0 +1,212 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.vpe.jsf.template;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+
+import org.jboss.tools.jst.jsp.bundle.BundleMap;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.util.Constants;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * Utilities for jsf templates
+ *
+ * @author Dzmitry Sakovich (dsakovich(a)exadel.com)
+ *
+ */
+public class ComponentUtil {
+
+ /**
+ * Returns value of attribute.
+ *
+ * @param sourceElement
+ * @param attributeName
+ * @return
+ */
+ public static String getAttribute(Element sourceElement,
+ String attributeName) {
+ String attribute = sourceElement.getAttribute(attributeName);
+ if (attribute == null) {
+ attribute = ""; //$NON-NLS-1$
+ }
+ return attribute;
+ }
+
+ /**
+ * Returns value of attribute.
+ *
+ * @param sourceElement
+ * @param attributeName
+ * @return
+ */
+ public static String getAttribute(nsIDOMElement sourceElement,
+ String attributeName) {
+ String attribute = sourceElement.getAttribute(attributeName);
+ if (attribute == null) {
+ attribute = ""; //$NON-NLS-1$
+ }
+ return attribute;
+ }
+
+ /**
+ * Returns {@code true} if the {@code element} has attribute {@code
+ * disabled} and its value is {@link #string2boolean(String) true}
+ */
+ public static boolean isDisabled(Element element) {
+ return ComponentUtil.string2boolean(ComponentUtil.getAttribute(element,
+ JSF.ATTR_DISABLED));
+ }
+
+ /**
+ * Sets attribute {@code "disabled"} of the {@code element} to {@code
+ * "disabled"} if the parameter {@code disabled} is {@code true},
<br/>
+ * otherwise removes attribute {@code "disabled"} from the {@code element}
+ * if it is present.
+ */
+ public static void setDisabled(nsIDOMElement element, boolean disabled) {
+ if (disabled) {
+ element.setAttribute(HTML.ATTR_DISABLED, HTML.ATTR_DISABLED);
+ } else {
+ element.removeAttribute(HTML.ATTR_DISABLED);
+ }
+ }
+
+ /**
+ * Copies {@code "disabled"} attribute from JSF {@code sourceElement} to
+ * HTML {@code targetElement}.
+ *
+ * @see #isDisabled(Element)
+ * @see #setDisabled(nsIDOMElement, boolean)
+ */
+ public static void copyDisabled(Element sourceElement,
+ nsIDOMElement targetElement) {
+ boolean disabled = ComponentUtil.isDisabled(sourceElement);
+ ComponentUtil.setDisabled(targetElement, disabled);
+ }
+
+ /**
+ * Parses string value retrieved from sourceElement.getAttribure(..) method
+ * to its boolean value.
+ * <p>
+ * <code>true</code> is returned only if it specified explicitly,
otherwise
+ * <code>false</code> is returned.
+ *
+ * @param str
+ * the string to parse
+ * @return boolean value from string
+ */
+ public static boolean string2boolean(String str) {
+ return Boolean.parseBoolean(str);
+ }
+
+ /**
+ * get bundle
+ *
+ * @param pageContext
+ * @param attr
+ * @return
+ */
+ public static String getBundleValue(VpePageContext pageContext, Attr attr) {
+
+ return getBundleValue(pageContext, attr.getNodeValue());
+
+ }
+
+ /**
+ *
+ * @param pageContext
+ * @param value
+ * @param offfset
+ * @return
+ */
+ public static String getBundleValue(VpePageContext pageContext, String value) {
+
+ BundleMap bundle = pageContext.getBundle();
+
+ return bundle.getBundleValue(value);
+
+ }
+
+ /**
+ * Gets the children.
+ *
+ * @param sourceElement
+ * the source element
+ *
+ * @return the children
+ */
+ public static List<Node> getChildren(Element sourceElement) {
+ ArrayList<Node> children = new ArrayList<Node>();
+ NodeList nodeList = sourceElement.getChildNodes();
+ for (int i = 0; i < nodeList.getLength(); i++) {
+ Node child = nodeList.item(i);
+ children.add(child);
+ }
+ return children;
+ }
+
+ /**
+ * Checks if is blank.
+ *
+ * @param value
+ * the value
+ *
+ * @return true, if is blank
+ */
+ public static boolean isBlank(String value) {
+ return ((value == null) || (value.trim().length() == 0));
+ }
+
+ /**
+ * Checks if is not blank.
+ *
+ * @param value
+ * the value
+ *
+ * @return true, if is not blank
+ */
+ public static boolean isNotBlank(String value) {
+ return !isBlank(value);
+ }
+
+ /**
+ * Creates the locale.
+ * <p>If the locale string could be parsed into language and country -
+ * creates Locale for this arguments.
+ * <p> By default - locale for empty string is created.
+ *
+ * @param localeString the locale string
+ * @return Locale object
+ */
+ public static Locale createLocale(String localeString) {
+ Locale newLocale = null;
+ if (null != localeString) {
+ if (localeString.length() == 2) {
+ newLocale = new Locale(localeString);
+ } else if ((localeString.length() == 5) &&
(localeString.indexOf("_") == 2)) { //$NON-NLS-1$
+ newLocale = new Locale(localeString.substring(0, 2), localeString.substring(3));
+ } else {
+ newLocale = new Locale(Constants.EMPTY);
+ }
+ } else {
+ newLocale = new Locale(Constants.EMPTY);
+ }
+ return newLocale;
+ }
+}
Copied:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JSF.java
(from rev 37881,
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/JSF.java)
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JSF.java
(rev 0)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JSF.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.vpe.jsf.template;
+
+/**
+ *
+ * @author Sergey Dzmitrovich
+ *
+ */
+public class JSF {
+
+ public static final String TAG_SELECT_ITEM = "selectItem"; //$NON-NLS-1$
+
+ public static final String TAG_SELECT_ITEMS = "selectItems"; //$NON-NLS-1$
+
+ public static final String TAG_PARAM = "param"; //$NON-NLS-1$
+
+ public static final String ATTR_VALUE = "value"; //$NON-NLS-1$
+
+ public static final String ATTR_BINDING = "binding"; //$NON-NLS-1$
+
+ public static final String ATTR_ESCAPE = "escape"; //$NON-NLS-1$
+
+ public static final String ATTR_DIR = "dir"; //$NON-NLS-1$
+
+ public static final String ATTR_FOR = "for"; //$NON-NLS-1$
+
+ public static final String ATTR_ID = "id";//$NON-NLS-1$
+
+ public static final String ATTR_ITEM_LABEL = "itemLabel"; //$NON-NLS-1$
+
+ public static final String ATTR_ITEM_VALUE = "itemValue"; //$NON-NLS-1$
+
+ public static final String ATTR_DISABLED = "disabled"; //$NON-NLS-1$
+
+ public static final String ATTR_ENABLED_CLASS = "enabledClass"; //$NON-NLS-1$
+
+ public static final String ATTR_DISABLED_CLASS = "disabledClass";
//$NON-NLS-1$
+
+ public static final String ATTR_STYLE_CLASS = "styleClass"; //$NON-NLS-1$
+
+ public static final String ATTR_STYLE = "style"; //$NON-NLS-1$
+
+ public static final String ATTR_SIZE = "size"; //$NON-NLS-1$
+
+ public static final String ATTR_ROWS = "rows"; //$NON-NLS-1$
+
+ public static final String ATTR_COLS = "cols"; //$NON-NLS-1$
+
+ public static final String ATTR_ITEM_DISABLED = "itemDisabled"; //$NON-NLS-1$
+
+ public static final String ATTR_LAYOUT = "layout"; //$NON-NLS-1$
+
+ public static final String ATTR_TITLE = "title"; //$NON-NLS-1$
+
+ public static final String ATTR_LANG = "lang"; //$NON-NLS-1$
+
+ public static final String ATTR_NAME = "name"; //$NON-NLS-1$
+
+ public static final String ATTR_DEFAULT = "default"; //$NON-NLS-1$
+
+ public static final String CUSTOM_COMPONENT_ATTR_PREFIX="cc.attrs.";
//$NON-NLS-1$
+}
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JSF2CompositeAttributeTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JSF2CompositeAttributeTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JSF2CompositeAttributeTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.jsf.template;
-import org.jboss.tools.jsf.vpe.jsf.template.util.JSF;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfBodyTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfBodyTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfBodyTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.jsf.template;
-import org.jboss.tools.jsf.vpe.jsf.template.util.JSF;
import org.jboss.tools.vpe.editor.template.VpeAbstractBodyTemplate;
import org.jboss.tools.vpe.editor.util.HTML;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfFacet.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfFacet.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfFacet.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -12,7 +12,6 @@
import java.util.List;
-import org.jboss.tools.jsf.vpe.jsf.template.util.JSF;
import org.jboss.tools.jst.web.tld.TaglibData;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfForm.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfForm.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfForm.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.jsf.template;
-import org.jboss.tools.jsf.vpe.jsf.template.util.JSF;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfInputTextAreaTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfInputTextAreaTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfInputTextAreaTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -11,8 +11,6 @@
package org.jboss.tools.jsf.vpe.jsf.template;
-import org.jboss.tools.jsf.vpe.jsf.template.util.ComponentUtil;
-import org.jboss.tools.jsf.vpe.jsf.template.util.JSF;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.mapping.AttributeData;
import org.jboss.tools.vpe.editor.mapping.VpeElementData;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfInputTextTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfInputTextTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfInputTextTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -11,8 +11,6 @@
package org.jboss.tools.jsf.vpe.jsf.template;
-import org.jboss.tools.jsf.vpe.jsf.template.util.ComponentUtil;
-import org.jboss.tools.jsf.vpe.jsf.template.util.JSF;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.mapping.AttributeData;
import org.jboss.tools.vpe.editor.mapping.VpeElementData;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputFormatTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputFormatTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputFormatTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -16,8 +16,6 @@
import java.util.regex.Pattern;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
-import org.jboss.tools.jsf.vpe.jsf.template.util.ComponentUtil;
-import org.jboss.tools.jsf.vpe.jsf.template.util.JSF;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputLabelTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputLabelTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputLabelTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.jsf.template;
-import org.jboss.tools.jsf.vpe.jsf.template.util.JSF;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputLinkTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputLinkTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputLinkTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.jsf.template;
-import org.jboss.tools.jsf.vpe.jsf.template.util.ComponentUtil;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputScriptTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputScriptTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputScriptTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -12,7 +12,6 @@
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.Region;
-import org.jboss.tools.jsf.vpe.jsf.template.util.JSF;
import org.jboss.tools.jst.jsp.util.NodesManagingUtil;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputTextTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputTextTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputTextTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.jsf.template;
-import org.jboss.tools.jsf.vpe.jsf.template.util.JSF;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectManyCheckbox.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectManyCheckbox.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectManyCheckbox.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -13,7 +13,6 @@
import java.util.ArrayList;
import java.util.List;
-import org.jboss.tools.jsf.vpe.jsf.template.util.JSF;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectManyListbox.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectManyListbox.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectManyListbox.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -18,7 +18,6 @@
import java.util.Map;
import java.util.Set;
-import org.jboss.tools.jsf.vpe.jsf.template.util.JSF;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectOneListbox.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectOneListbox.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectOneListbox.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -19,8 +19,6 @@
import java.util.Map;
import java.util.Set;
-import org.jboss.tools.jsf.vpe.jsf.template.util.ComponentUtil;
-import org.jboss.tools.jsf.vpe.jsf.template.util.JSF;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectOneMenuTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectOneMenuTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectOneMenuTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -18,8 +18,6 @@
import java.util.Map;
import java.util.Set;
-import org.jboss.tools.jsf.vpe.jsf.template.util.ComponentUtil;
-import org.jboss.tools.jsf.vpe.jsf.template.util.JSF;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectOneRadioTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectOneRadioTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectOneRadioTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -13,7 +13,6 @@
import static org.jboss.tools.vpe.xulrunner.util.XPCOM.queryInterface;
import org.jboss.tools.jsf.vpe.jsf.template.selectitem.AbstractRadioSelectItemTemplate;
-import org.jboss.tools.jsf.vpe.jsf.template.util.ComponentUtil;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSubView.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSubView.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSubView.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.jsf.template;
-import org.jboss.tools.jsf.vpe.jsf.template.util.ComponentUtil;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
Copied:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfTemplateInvocationHandler.java
(from rev 37881,
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/proxy/JsfTemplateInvocationHandler.java)
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfTemplateInvocationHandler.java
(rev 0)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfTemplateInvocationHandler.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.jsf.vpe.jsf.template;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.NodeList;
+
+/**
+ * @author Sergey Dzmitrovich
+ *
+ */
+public class JsfTemplateInvocationHandler implements InvocationHandler {
+
+ private static String KEY_WORD = "Offset"; //$NON-NLS-1$
+
+ private int offset;
+
+ private Object nodeItem;
+
+ public static NodeList createNodeListProxy(Object nodeList, int offset) {
+
+ Class<?>[] classes = { NodeList.class };
+ return (NodeList) Proxy.newProxyInstance(nodeList.getClass()
+ .getClassLoader(), classes, new JsfTemplateInvocationHandler(
+ nodeList, offset));
+ }
+
+ public static Object createNodeItemProxy(Object nodeItem, int offset) {
+
+ Class<?>[] classes = new Class<?>[1];
+
+ if (nodeItem instanceof IDOMElement)
+ classes[0] = IDOMElement.class;
+ else if (nodeItem instanceof IDOMAttr)
+ classes[0] = IDOMAttr.class;
+ else if (nodeItem instanceof IDOMNode)
+ classes[0] = IDOMNode.class;
+ else if (nodeItem instanceof NamedNodeMap)
+ classes[0] = NamedNodeMap.class;
+ else
+ return null;
+
+ return Proxy.newProxyInstance(nodeItem.getClass().getClassLoader(),
+ classes, new JsfTemplateInvocationHandler(nodeItem, offset));
+
+ }
+
+ private JsfTemplateInvocationHandler(Object nodeItem, int offset) {
+ this.offset = offset;
+ this.nodeItem = nodeItem;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.lang.reflect.InvocationHandler#invoke(java.lang.Object,
+ * java.lang.reflect.Method, java.lang.Object[])
+ */
+ public Object invoke(Object proxy, Method method, Object[] args)
+ throws Throwable {
+
+ Object result = method.invoke(nodeItem, args);
+
+ if (method.getReturnType() == NodeList.class)
+ return JsfTemplateInvocationHandler.createNodeListProxy(result,
+ offset);
+ if ((result instanceof IDOMNode) || (result instanceof NamedNodeMap))
+ return JsfTemplateInvocationHandler.createNodeItemProxy(result,
+ offset);
+ if ((result instanceof Integer)
+ && (method.getName().contains(KEY_WORD))) {
+ return Integer.valueOf(((Integer) result).intValue() + offset);
+ }
+
+ return result;
+ }
+}
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfView.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfView.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfView.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -14,7 +14,6 @@
import java.util.List;
import java.util.Locale;
-import org.jboss.tools.jsf.vpe.jsf.template.util.ComponentUtil;
import org.jboss.tools.jst.jsp.i18n.MainLocaleProvider;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
Copied:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/NodeProxyUtil.java
(from rev 37881,
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/NodeProxyUtil.java)
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/NodeProxyUtil.java
(rev 0)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/NodeProxyUtil.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.vpe.jsf.template;
+
+import org.eclipse.jst.jsp.core.internal.parser.JSPSourceParser;
+import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.document.StructuredDocumentFactory;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
+import org.jboss.tools.jsf.vpe.jsf.VpeElementProxyData;
+import org.jboss.tools.jst.jsp.util.NodesManagingUtil;
+import org.jboss.tools.vpe.editor.mapping.VpeDomMapping;
+import org.jboss.tools.vpe.editor.mapping.VpeNodeMapping;
+import org.jboss.tools.vpe.editor.util.VpeNodesManagingUtil;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+public class NodeProxyUtil {
+
+ static public NodeList reparseAttributeValue(VpeElementProxyData data,
+ String attrString, int offset) {
+ IStructuredDocument newStructuredDocument = StructuredDocumentFactory
+ .getNewStructuredDocumentInstance(new JSPSourceParser());
+
+ newStructuredDocument.set(attrString);
+
+ IDOMModel modelForJSP = (IDOMModel) StructuredModelManager
+ .getModelManager().createUnManagedStructuredModelFor(
+ ContentTypeIdForJSP.ContentTypeID_JSP);
+
+ modelForJSP.setStructuredDocument(newStructuredDocument);
+
+ // data.setModel(modelForJSP);
+ // data.setOffset(offset);
+
+ IDOMDocument document = modelForJSP.getDocument();
+
+ NodeList list = document.getChildNodes();
+
+ NodeList adaptersList = (NodeList) JsfTemplateInvocationHandler
+ .createNodeListProxy(list, offset);
+
+ data.setNodelist(adaptersList);
+
+ return (NodeList) adaptersList;
+
+ }
+
+ static public NodeList reparseAttributeValue(VpeElementProxyData data,
+ Attr attr) {
+
+ return reparseAttributeValue(data, attr.getValue(), ((IDOMAttr) attr)
+ .getValueRegionStartOffset() + 1);
+
+ }
+
+ /**
+ *
+ * @param nodeList
+ * @param focusPosition
+ * @param anchorPosition
+ * @return
+ */
+ static public VpeNodeMapping findNodeByPosition(VpeDomMapping domMapping,
+ NodeList nodeList, Point selectionRange) {
+ int beginPosition = Math.min(selectionRange.x, selectionRange.x + selectionRange.y);
+ int endPosition = Math.max(selectionRange.x, selectionRange.x + selectionRange.y);
+
+ for (int i = 0; i < nodeList.getLength(); i++) {
+
+ Node child = nodeList.item(i);
+
+ VpeNodeMapping result = null;
+ if (child.hasChildNodes()) {
+ result = findNodeByPosition(domMapping, child.getChildNodes(),
+ selectionRange);
+ }
+
+ if (result != null)
+ return result;
+
+ if ((beginPosition >= (NodesManagingUtil.getStartOffsetNode(child)))
+ && (endPosition <= (NodesManagingUtil
+ .getEndOffsetNode(child)))) {
+
+ return VpeNodesManagingUtil.getNodeMapping(domMapping, child);
+ }
+ }
+
+ return null;
+
+ }
+
+}
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/selectitem/AbstractCheckboxSelectItemTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/selectitem/AbstractCheckboxSelectItemTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/selectitem/AbstractCheckboxSelectItemTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -10,7 +10,7 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.jsf.template.selectitem;
-import org.jboss.tools.jsf.vpe.jsf.template.util.JSF;
+import org.jboss.tools.jsf.vpe.jsf.template.JSF;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.Constants;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/selectitem/AbstractOptionSelectItemTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/selectitem/AbstractOptionSelectItemTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/selectitem/AbstractOptionSelectItemTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -10,7 +10,7 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.jsf.template.selectitem;
-import org.jboss.tools.jsf.vpe.jsf.template.util.JSF;
+import org.jboss.tools.jsf.vpe.jsf.template.JSF;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.Constants;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/selectitem/AbstractRadioSelectItemTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/selectitem/AbstractRadioSelectItemTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/selectitem/AbstractRadioSelectItemTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -11,7 +11,7 @@
package org.jboss.tools.jsf.vpe.jsf.template.selectitem;
import org.eclipse.wst.xml.core.internal.document.ElementImpl;
-import org.jboss.tools.jsf.vpe.jsf.template.util.JSF;
+import org.jboss.tools.jsf.vpe.jsf.template.JSF;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.Constants;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/selectitem/AbstractSelectItemTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/selectitem/AbstractSelectItemTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/selectitem/AbstractSelectItemTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -11,10 +11,10 @@
package org.jboss.tools.jsf.vpe.jsf.template.selectitem;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
+import org.jboss.tools.jsf.vpe.jsf.VpeElementProxyData;
import org.jboss.tools.jsf.vpe.jsf.template.AbstractOutputJsfTemplate;
-import org.jboss.tools.jsf.vpe.jsf.template.util.JSF;
-import org.jboss.tools.jsf.vpe.jsf.template.util.NodeProxyUtil;
-import org.jboss.tools.jsf.vpe.jsf.template.util.model.VpeElementProxyData;
+import org.jboss.tools.jsf.vpe.jsf.template.JSF;
+import org.jboss.tools.jsf.vpe.jsf.template.NodeProxyUtil;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.mapping.AttributeData;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/selectitem/SelectItemType.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/selectitem/SelectItemType.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/selectitem/SelectItemType.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -11,8 +11,8 @@
package org.jboss.tools.jsf.vpe.jsf.template.selectitem;
import org.jboss.tools.jsf.vpe.jsf.template.AbstractOutputJsfTemplate;
-import org.jboss.tools.jsf.vpe.jsf.template.util.ComponentUtil;
-import org.jboss.tools.jsf.vpe.jsf.template.util.JSF;
+import org.jboss.tools.jsf.vpe.jsf.template.ComponentUtil;
+import org.jboss.tools.jsf.vpe.jsf.template.JSF;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
Deleted:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/ComponentUtil.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/ComponentUtil.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/ComponentUtil.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -1,212 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributor:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.jsf.vpe.jsf.template.util;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Locale;
-
-import org.jboss.tools.jst.jsp.bundle.BundleMap;
-import org.jboss.tools.vpe.editor.context.VpePageContext;
-import org.jboss.tools.vpe.editor.util.Constants;
-import org.jboss.tools.vpe.editor.util.HTML;
-import org.mozilla.interfaces.nsIDOMElement;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * Utilities for jsf templates
- *
- * @author Dzmitry Sakovich (dsakovich(a)exadel.com)
- *
- */
-public class ComponentUtil {
-
- /**
- * Returns value of attribute.
- *
- * @param sourceElement
- * @param attributeName
- * @return
- */
- public static String getAttribute(Element sourceElement,
- String attributeName) {
- String attribute = sourceElement.getAttribute(attributeName);
- if (attribute == null) {
- attribute = ""; //$NON-NLS-1$
- }
- return attribute;
- }
-
- /**
- * Returns value of attribute.
- *
- * @param sourceElement
- * @param attributeName
- * @return
- */
- public static String getAttribute(nsIDOMElement sourceElement,
- String attributeName) {
- String attribute = sourceElement.getAttribute(attributeName);
- if (attribute == null) {
- attribute = ""; //$NON-NLS-1$
- }
- return attribute;
- }
-
- /**
- * Returns {@code true} if the {@code element} has attribute {@code
- * disabled} and its value is {@link #string2boolean(String) true}
- */
- public static boolean isDisabled(Element element) {
- return ComponentUtil.string2boolean(ComponentUtil.getAttribute(element,
- JSF.ATTR_DISABLED));
- }
-
- /**
- * Sets attribute {@code "disabled"} of the {@code element} to {@code
- * "disabled"} if the parameter {@code disabled} is {@code true},
<br/>
- * otherwise removes attribute {@code "disabled"} from the {@code element}
- * if it is present.
- */
- public static void setDisabled(nsIDOMElement element, boolean disabled) {
- if (disabled) {
- element.setAttribute(HTML.ATTR_DISABLED, HTML.ATTR_DISABLED);
- } else {
- element.removeAttribute(HTML.ATTR_DISABLED);
- }
- }
-
- /**
- * Copies {@code "disabled"} attribute from JSF {@code sourceElement} to
- * HTML {@code targetElement}.
- *
- * @see #isDisabled(Element)
- * @see #setDisabled(nsIDOMElement, boolean)
- */
- public static void copyDisabled(Element sourceElement,
- nsIDOMElement targetElement) {
- boolean disabled = ComponentUtil.isDisabled(sourceElement);
- ComponentUtil.setDisabled(targetElement, disabled);
- }
-
- /**
- * Parses string value retrieved from sourceElement.getAttribure(..) method
- * to its boolean value.
- * <p>
- * <code>true</code> is returned only if it specified explicitly,
otherwise
- * <code>false</code> is returned.
- *
- * @param str
- * the string to parse
- * @return boolean value from string
- */
- public static boolean string2boolean(String str) {
- return Boolean.parseBoolean(str);
- }
-
- /**
- * get bundle
- *
- * @param pageContext
- * @param attr
- * @return
- */
- public static String getBundleValue(VpePageContext pageContext, Attr attr) {
-
- return getBundleValue(pageContext, attr.getNodeValue());
-
- }
-
- /**
- *
- * @param pageContext
- * @param value
- * @param offfset
- * @return
- */
- public static String getBundleValue(VpePageContext pageContext, String value) {
-
- BundleMap bundle = pageContext.getBundle();
-
- return bundle.getBundleValue(value);
-
- }
-
- /**
- * Gets the children.
- *
- * @param sourceElement
- * the source element
- *
- * @return the children
- */
- public static List<Node> getChildren(Element sourceElement) {
- ArrayList<Node> children = new ArrayList<Node>();
- NodeList nodeList = sourceElement.getChildNodes();
- for (int i = 0; i < nodeList.getLength(); i++) {
- Node child = nodeList.item(i);
- children.add(child);
- }
- return children;
- }
-
- /**
- * Checks if is blank.
- *
- * @param value
- * the value
- *
- * @return true, if is blank
- */
- public static boolean isBlank(String value) {
- return ((value == null) || (value.trim().length() == 0));
- }
-
- /**
- * Checks if is not blank.
- *
- * @param value
- * the value
- *
- * @return true, if is not blank
- */
- public static boolean isNotBlank(String value) {
- return !isBlank(value);
- }
-
- /**
- * Creates the locale.
- * <p>If the locale string could be parsed into language and country -
- * creates Locale for this arguments.
- * <p> By default - locale for empty string is created.
- *
- * @param localeString the locale string
- * @return Locale object
- */
- public static Locale createLocale(String localeString) {
- Locale newLocale = null;
- if (null != localeString) {
- if (localeString.length() == 2) {
- newLocale = new Locale(localeString);
- } else if ((localeString.length() == 5) &&
(localeString.indexOf("_") == 2)) { //$NON-NLS-1$
- newLocale = new Locale(localeString.substring(0, 2), localeString.substring(3));
- } else {
- newLocale = new Locale(Constants.EMPTY);
- }
- } else {
- newLocale = new Locale(Constants.EMPTY);
- }
- return newLocale;
- }
-}
Deleted:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/JSF.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/JSF.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/JSF.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributor:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.jsf.vpe.jsf.template.util;
-
-/**
- *
- * @author Sergey Dzmitrovich
- *
- */
-public class JSF {
-
- public static final String TAG_SELECT_ITEM = "selectItem"; //$NON-NLS-1$
-
- public static final String TAG_SELECT_ITEMS = "selectItems"; //$NON-NLS-1$
-
- public static final String TAG_PARAM = "param"; //$NON-NLS-1$
-
- public static final String ATTR_VALUE = "value"; //$NON-NLS-1$
-
- public static final String ATTR_BINDING = "binding"; //$NON-NLS-1$
-
- public static final String ATTR_ESCAPE = "escape"; //$NON-NLS-1$
-
- public static final String ATTR_DIR = "dir"; //$NON-NLS-1$
-
- public static final String ATTR_FOR = "for"; //$NON-NLS-1$
-
- public static final String ATTR_ID = "id";//$NON-NLS-1$
-
- public static final String ATTR_ITEM_LABEL = "itemLabel"; //$NON-NLS-1$
-
- public static final String ATTR_ITEM_VALUE = "itemValue"; //$NON-NLS-1$
-
- public static final String ATTR_DISABLED = "disabled"; //$NON-NLS-1$
-
- public static final String ATTR_ENABLED_CLASS = "enabledClass"; //$NON-NLS-1$
-
- public static final String ATTR_DISABLED_CLASS = "disabledClass";
//$NON-NLS-1$
-
- public static final String ATTR_STYLE_CLASS = "styleClass"; //$NON-NLS-1$
-
- public static final String ATTR_STYLE = "style"; //$NON-NLS-1$
-
- public static final String ATTR_SIZE = "size"; //$NON-NLS-1$
-
- public static final String ATTR_ROWS = "rows"; //$NON-NLS-1$
-
- public static final String ATTR_COLS = "cols"; //$NON-NLS-1$
-
- public static final String ATTR_ITEM_DISABLED = "itemDisabled"; //$NON-NLS-1$
-
- public static final String ATTR_LAYOUT = "layout"; //$NON-NLS-1$
-
- public static final String ATTR_TITLE = "title"; //$NON-NLS-1$
-
- public static final String ATTR_LANG = "lang"; //$NON-NLS-1$
-
- public static final String ATTR_NAME = "name"; //$NON-NLS-1$
-
- public static final String ATTR_DEFAULT = "default"; //$NON-NLS-1$
-
- public static final String CUSTOM_COMPONENT_ATTR_PREFIX="cc.attrs.";
//$NON-NLS-1$
-}
Deleted:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/NodeProxyUtil.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/NodeProxyUtil.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/NodeProxyUtil.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.jsf.vpe.jsf.template.util;
-
-import org.eclipse.jst.jsp.core.internal.parser.JSPSourceParser;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.document.StructuredDocumentFactory;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.jboss.tools.jsf.vpe.jsf.template.util.model.VpeElementProxyData;
-import org.jboss.tools.jsf.vpe.jsf.template.util.proxy.JsfTemplateInvocationHandler;
-import org.jboss.tools.jst.jsp.util.NodesManagingUtil;
-import org.jboss.tools.vpe.editor.mapping.VpeDomMapping;
-import org.jboss.tools.vpe.editor.mapping.VpeNodeMapping;
-import org.jboss.tools.vpe.editor.util.VpeNodesManagingUtil;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-public class NodeProxyUtil {
-
- static public NodeList reparseAttributeValue(VpeElementProxyData data,
- String attrString, int offset) {
- IStructuredDocument newStructuredDocument = StructuredDocumentFactory
- .getNewStructuredDocumentInstance(new JSPSourceParser());
-
- newStructuredDocument.set(attrString);
-
- IDOMModel modelForJSP = (IDOMModel) StructuredModelManager
- .getModelManager().createUnManagedStructuredModelFor(
- ContentTypeIdForJSP.ContentTypeID_JSP);
-
- modelForJSP.setStructuredDocument(newStructuredDocument);
-
- // data.setModel(modelForJSP);
- // data.setOffset(offset);
-
- IDOMDocument document = modelForJSP.getDocument();
-
- NodeList list = document.getChildNodes();
-
- NodeList adaptersList = (NodeList) JsfTemplateInvocationHandler
- .createNodeListProxy(list, offset);
-
- data.setNodelist(adaptersList);
-
- return (NodeList) adaptersList;
-
- }
-
- static public NodeList reparseAttributeValue(VpeElementProxyData data,
- Attr attr) {
-
- return reparseAttributeValue(data, attr.getValue(), ((IDOMAttr) attr)
- .getValueRegionStartOffset() + 1);
-
- }
-
- /**
- *
- * @param nodeList
- * @param focusPosition
- * @param anchorPosition
- * @return
- */
- static public VpeNodeMapping findNodeByPosition(VpeDomMapping domMapping,
- NodeList nodeList, Point selectionRange) {
- int beginPosition = Math.min(selectionRange.x, selectionRange.x + selectionRange.y);
- int endPosition = Math.max(selectionRange.x, selectionRange.x + selectionRange.y);
-
- for (int i = 0; i < nodeList.getLength(); i++) {
-
- Node child = nodeList.item(i);
-
- VpeNodeMapping result = null;
- if (child.hasChildNodes()) {
- result = findNodeByPosition(domMapping, child.getChildNodes(),
- selectionRange);
- }
-
- if (result != null)
- return result;
-
- if ((beginPosition >= (NodesManagingUtil.getStartOffsetNode(child)))
- && (endPosition <= (NodesManagingUtil
- .getEndOffsetNode(child)))) {
-
- return VpeNodesManagingUtil.getNodeMapping(domMapping, child);
- }
- }
-
- return null;
-
- }
-
-}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/META-INF/MANIFEST.MF 2012-01-17
19:07:46 UTC (rev 37909)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/META-INF/MANIFEST.MF 2012-01-17
19:14:35 UTC (rev 37910)
@@ -23,5 +23,5 @@
Bundle-ClassPath: lib/jhighlight-1.0.jar,
.
Export-Package: org.jboss.tools.jsf.vpe.richfaces,
- org.jboss.tools.jsf.vpe.richfaces.template.util
+ org.jboss.tools.jsf.vpe.richfaces.template
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/plugin.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/plugin.xml 2012-01-17 19:07:46 UTC
(rev 37909)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/plugin.xml 2012-01-17 19:14:35 UTC
(rev 37910)
@@ -18,7 +18,7 @@
<extension point="org.eclipse.core.runtime.adapters">
<factory
-
class="org.jboss.tools.jsf.vpe.richfaces.template.util.RichFacesAdapterFactory"
+
class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesAdapterFactory"
adaptableType="org.jboss.tools.vpe.editor.template.VpeTemplateSafeWrapper">
<adapter
type="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesTogglePanelTemplate"/>
<adapter
type="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesCollapsibleSubTableTemplate"/>
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 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -27,7 +27,7 @@
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.editors.text.ILocationProvider;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
+import org.jboss.tools.jsf.vpe.richfaces.template.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.util.Constants;
import org.jboss.tools.vpe.editor.util.ElService;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/HtmlComponentUtil.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/HtmlComponentUtil.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/HtmlComponentUtil.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -10,7 +10,7 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.richfaces;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
+import org.jboss.tools.jsf.vpe.richfaces.template.RichFaces;
import org.jboss.tools.vpe.editor.util.HTML;
/**
Copied:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/AttributeMap.java
(from rev 37881,
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/AttributeMap.java)
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/AttributeMap.java
(rev 0)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/AttributeMap.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.vpe.richfaces.template;
+
+import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
+import org.w3c.dom.Element;
+
+/**
+ * A wrapper of DOM Element that can extract its attributes as objects of different
types.
+ * The methods of the class never throw any exception. In case if parsing is impossible
they
+ * always return a correct value(see methods descriptions).
+ *
+ * @author yradtsevich
+ * @see Element
+ */
+public class AttributeMap {
+ private static final String FALSE_VALUE = "false"; //$NON-NLS-1$
+ private static final String TRUE_VALUE = "true"; //$NON-NLS-1$
+ private Element element;
+
+ public AttributeMap(Element element) {
+ this.element = element;
+ }
+
+ /**
+ * A wrapper of <code>ComponentUtil.getAttribute(sourceElement,
attributeName)</code>
+ *
+ * @param attributeName attribute name
+ * @return <code>ComponentUtil.getAttribute(sourceElement,
attributeName)</code>
+ *
+ * @see ComponentUtil
+ */
+ public String getString(String attributeName) {
+ return ComponentUtil.getAttribute(element, attributeName);
+ }
+
+ /**
+ * Returns Boolean representation of the attribute.
+ *
+ * @param attributeName attribute name
+ * @return attribute value.
+ * <code>Boolean.TRUE</code>, if the attribute equals "true",
+ * <code>Boolean.False</code>, if the attribute equals "false",
+ * <code>null</code> otherwise.
+ */
+ public Boolean getBoolean(String attributeName) {
+ String attribute = element.getAttribute(attributeName);
+
+ Boolean ret;
+
+ if (TRUE_VALUE.equals(attribute)) {
+ ret = Boolean.TRUE;
+ } else if (FALSE_VALUE.equals(attribute)) {
+ ret = Boolean.FALSE;
+ } else {
+ ret = null;
+ }
+
+ return ret;
+ }
+
+ public void setAttribute(String name, boolean value) {
+ if (value) {
+ element.setAttribute(name, TRUE_VALUE);
+ } else {
+ element.setAttribute(name, FALSE_VALUE);
+ }
+ }
+
+ /**
+ * Tests if its parameter is blank string
+ *
+ * @param attributeName
+ * @return <code>true</code> if and only if
<code>attributeName</code> is
+ * either <code>null</code>, or blank, or contains non-printable characters
only
+ */
+ public boolean isBlank(String attributeName) {
+ String value = getString(attributeName);
+ return ComponentUtil.isBlank(value);
+ }
+
+}
Property changes on:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/AttributeMap.java
___________________________________________________________________
Added: svn:mergeinfo
+
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/InputNumberSliderTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/InputNumberSliderTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/InputNumberSliderTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -17,7 +17,6 @@
import java.util.Set;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.mapping.AttributeData;
import org.jboss.tools.vpe.editor.mapping.NodeData;
Copied:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFaces.java
(from rev 37881,
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java)
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFaces.java
(rev 0)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFaces.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -0,0 +1,265 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.jsf.vpe.richfaces.template;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
+import org.jboss.tools.vpe.editor.template.expression.VpeExpression;
+import org.jboss.tools.vpe.editor.template.expression.VpeExpressionBuilder;
+import org.jboss.tools.vpe.editor.template.expression.VpeExpressionBuilderException;
+import org.jboss.tools.vpe.editor.util.Constants;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * contain rich faces tags and general attributes.
+ *
+ * @author Sergey Dzmitrovich
+ */
+public class RichFaces {
+ /**
+ * The Constructor.
+ */
+ private RichFaces() {
+ }
+
+ public static final String ATTR_ADD_CONTROL_LABEL = "addControlLabel";
//$NON-NLS-1$
+ public static final String ATTR_ALIGN = "align"; //$NON-NLS-1$
+ public static final String ATTR_BREAK_BEFORE = "breakBefore"; //$NON-NLS-1$
+ public static final String ATTR_BREAK_ROW_BEFORE = "breakRowBefore"; //
RichFaces 4.0 attribute //$NON-NLS-1$
+ public static final String ATTR_CAPTION_CLASS = "captionClass"; //$NON-NLS-1$
+ public static final String ATTR_CAPTION_STYLE = "captionStyle"; //$NON-NLS-1$
+ public static final String ATTR_COLLAPSE_ICON = "collapseIcon"; //$NON-NLS-1$
+ public static final String ATTR_COLLAPSE_LABEL = "collapseLabel";
//$NON-NLS-1$
+ public static final String ATTR_COLUMN_CLASSES = "columnClasses";
//$NON-NLS-1$
+ public static final String ATTR_COLUMNS = "columns"; //$NON-NLS-1$
+ public static final String ATTR_COLUMNS_WIDTH = "columnsWidth"; //$NON-NLS-1$
+ public static final String ATTR_BUTTON_ICON = "buttonIcon"; //$NON-NLS-1$
+ public static final String ATTR_BUTTON_ICON_DISABLED = "buttonIconDisabled";
//$NON-NLS-1$
+ public static final String ATTR_BUTTON_CLASS = "buttonClass"; //$NON-NLS-1$
+ public static final String ATTR_SHOW_INPUT = "showInput"; //$NON-NLS-1$
+ public static final String ATTR_LOCALE = "locale"; //$NON-NLS-1$
+ public static final String ATTR_CONTROLS_TYPE = "controlsType"; //$NON-NLS-1$
+ public static final String ATTR_DEFAULT_LABEL = "defaultLabel"; //$NON-NLS-1$
+ public static final String ATTR_LABEL = "label"; //$NON-NLS-1$
+ public static final String ATTR_DIRECTION = "direction"; //$NON-NLS-1$
+ public static final String ATTR_JOINT_POINT = "jointPoint"; //$NON-NLS-1$
+ public static final String ATTR_DISABLED = "disabled";//$NON-NLS-1$
+ public static final String ATTR_ELEMENTS = "elements"; //$NON-NLS-1$
+ public static final String ATTR_HEADER_CLASS = "headerClass"; //$NON-NLS-1$
+ public static final String ATTR_BODY_CLASS = "bodyClass"; //$NON-NLS-1$
+ public static final String ATTR_FOOTER_CLASS = "footerClass"; //$NON-NLS-1$
+ public static final String ATTR_INPUT_CLASS = "inputClass"; //$NON-NLS-1$
+ public static final String ATTR_INPUT_SIZE = "inputSize"; //$NON-NLS-1$
+ public static final String ATTR_INPUT_STYLE = "inputStyle"; //$NON-NLS-1$
+ public static final String ATTR_LIST_HEIGHT = "listHeight"; //$NON-NLS-1$
+ public static final String ATTR_LIST_WIDTH = "listWidth"; //$NON-NLS-1$
+ public static final String ATTR_NAME = "name"; //$NON-NLS-1$
+ public static final String ATTR_POPUP = "popup";//$NON-NLS-1$
+ public static final String ATTR_ROWS = "rows"; //$NON-NLS-1$
+ public static final String ATTR_ROW_CLASS = "rowClass"; //$NON-NLS-1$
+ public static final String ATTR_ROW_CLASSES = "rowClasses"; //$NON-NLS-1$
+ public static final String ATTR_SELECT_ITEM_LABEL = "itemLabel";
//$NON-NLS-1$
+ public static final String ATTR_SELECT_ITEM_VALUE = "itemValue";
//$NON-NLS-1$showButton
+ public static final String ATTR_SHOW_BUTTON = "showButton"; //$NON-NLS-1$
+ public static final String ATTR_SHOW_BUTTON_LABELS = "showButtonLabels";
//$NON-NLS-1$
+ public static final String ATTR_SORT_BY = "sortBy"; //$NON-NLS-1$
+ public static final String ATTR_SORT_ICON = "sortIcon"; //$NON-NLS-1$
+ public static final String ATTR_SORTABLE = "sortable"; //$NON-NLS-1$
+ public static final String ATTR_STYLE = "style"; //$NON-NLS-1$
+ public static final String ATTR_STYLE_CLASS = "styleClass"; //$NON-NLS-1$
+ public static final String ATTR_TYPE = "type"; //$NON-NLS-1$
+ public static final String ATTR_VALUE = "value"; //$NON-NLS-1$
+ public static final String ATTR_VISIBLE = "visible"; //$NON-NLS-1$
+ public static final String ATTR_WIDTH = "width"; //$NON-NLS-1$
+ public static final String ATTR_HEIGHT = "height"; //$NON-NLS-1$
+ public static final String ATTR_HORIZONTAL_OFFSET = "horizontalOffset";
//$NON-NLS-1$
+ public static final String ATTR_VERTICAL_OFFSET = "verticalOffset";
//$NON-NLS-1$
+ public static final String ATTR_ZINDEX = "zindex"; //$NON-NLS-1$
+ public static final String ATTR_POSITION = "position"; //$NON-NLS-1$
+
+ /** FACETS NAMES **/
+ public static final String NAME_FACET_LABEL = "label"; //$NON-NLS-1$
+ public static final String NAME_FACET_CAPTION = "caption"; //$NON-NLS-1$
+ public static final String NAME_FACET_FOOTER = "footer"; //$NON-NLS-1$
+ public static final String NAME_FACET_HEADER = "header"; //$NON-NLS-1$
+ public static final String NAME_FACET_TERM = "term"; //$NON-NLS-1$
+ public static final String NAME_FACET_CONTROLS = "controls"; //$NON-NLS-1$
+
+ /** jsf tags which are used with richFaces. */
+ public static final String TAG_COLUMN = "column"; //$NON-NLS-1$
+ public static final String TAG_COLUMN_GROUP = "columnGroup"; //$NON-NLS-1$
+ public static final String TAG_COLUMNS = "columns"; //$NON-NLS-1$
+ public static final String TAG_FACET = "facet"; //$NON-NLS-1$
+ public static final String TAG_SUB_TABLE = "subTable"; //$NON-NLS-1$
+
+ public static final String VALUE_TRUE = "true"; //$NON-NLS-1$
+ public static final String VALUE_FALSE = "false"; //$NON-NLS-1$
+ public static final String VALUE_LEFT = "left"; //$NON-NLS-1$
+ public static final String VALUE_RIGHT = "right"; //$NON-NLS-1$
+ public static final String VALUE_TOP = "top"; //$NON-NLS-1$
+ public static final String VALUE_BOTTOM = "bottom"; //$NON-NLS-1$
+ public static final String VALUE_CENTER = "center"; //$NON-NLS-1$
+
+ public static final String COLLAPSED_STATE = "collapsedState";
+
+ private static VpeExpression exprColumnClasses = null;
+ /**
+ * Returns the expression to extract style-classes from a {@code
'columnClasses'} attribute.
+ */
+ public static VpeExpression getExprColumnClasses() {
+ if (exprColumnClasses == null) {
+ try {
+ exprColumnClasses = VpeExpressionBuilder
+ .buildCompletedExpression("{@" + ATTR_COLUMN_CLASSES + "}",
true) //$NON-NLS-1$ //$NON-NLS-2$
+ .getExpression();
+ } catch (VpeExpressionBuilderException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ return exprColumnClasses;
+ }
+
+ private static VpeExpression exprRowClasses = null;
+ /**
+ * Returns the expression to extract style-classes from a {@code 'rowClasses'}
attribute.
+ */
+ public static VpeExpression getExprRowClasses() {
+ if (exprRowClasses == null) {
+ try {
+ exprRowClasses = VpeExpressionBuilder
+ .buildCompletedExpression("{@" + ATTR_ROW_CLASSES + "}", true)
//$NON-NLS-1$ //$NON-NLS-2$
+ .getExpression();
+ } catch (VpeExpressionBuilderException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ return exprRowClasses;
+ }
+
+ public static List<Element> findElementsById(Element root, String id, String
tagName) {
+ ArrayList<Element> list = new ArrayList<Element>();
+ NodeList nodeList = root.getChildNodes();
+ for (int i = 0; i < nodeList.getLength(); i++) {
+ Node child = nodeList.item(i);
+ if (child instanceof Element) {
+ Element childElement = (Element) child;
+ if (childElement.getNodeName().endsWith(tagName)
+ && id.equals(childElement.getAttribute("id"))) { //$NON-NLS-1$
+ list.add(childElement);
+ }
+ list.addAll(findElementsById(childElement, id, tagName));
+ }
+ }
+ return list;
+ }
+
+ /**
+ * Reads COLLAPSED_STATE attribute's value from the source node
+ *
+ * @param sourceNode the verifiable source node
+ * @return true, if node is collapsed
+ */
+ public static boolean readCollapsedStateFromSourceNode(Node sourceNode) {
+ boolean isCollapsed = false;
+ String collapsedState = (String) sourceNode.getUserData(COLLAPSED_STATE);
+ if ((collapsedState != null) &&
("true".equalsIgnoreCase(collapsedState))){ //$NON-NLS-1$
+ isCollapsed = true;
+ }
+ return isCollapsed;
+ }
+
+ 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++) {
+ Node child = children.item(i);
+ String nodeName = child.getNodeName();
+ if((child instanceof Element) && (nodeName.endsWith(TAG_COLUMN)
+ || nodeName.endsWith(TAG_COLUMNS))) {
+ columns.add((Element)child);
+ }
+ }
+ return columns;
+ }
+
+ /**
+ * Returns true if and only if {@code columns} contains at least one column that have
facet
+ * with given {@code facetName}.
+ */
+ public static boolean hasColumnWithFacet(ArrayList<Element> columns, String
facetName) {
+ for (Element column : columns) {
+ Node body = ComponentUtil.getFacet(column, facetName, true);
+ if(body!=null) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public static int getColumnsCount(Element sourceElement, ArrayList<Element>
columns) {
+ int count = 0;
+ // check for exact value in component
+ try {
+ count = Integer.parseInt(sourceElement.getAttribute(ATTR_COLUMNS));
+ } catch (NumberFormatException e) {
+ count = calculateRowColumns(sourceElement, columns);
+ }
+ return count;
+ }
+
+ /*
+ * Calculate max number of columns per row.
+ * For rows, recursive calculate max length.
+ */
+ public static int calculateRowColumns(Element sourceElement, ArrayList<Element>
columns) {
+ int count = 0;
+ int currentLength = 0;
+ for (Element column : columns) {
+ if (ComponentUtil.isRendered(column)) {
+ String nodeName = column.getNodeName();
+ if (nodeName.endsWith(TAG_COLUMN_GROUP)) {
+ // Store max calculated value of previous rows.
+ count = Math.max(currentLength,count);
+ // Calculate number of columns in row.
+ currentLength = calculateRowColumns(sourceElement, getColumns(column));
+ // Store max calculated value
+ count = Math.max(currentLength,count);
+ currentLength = 0;
+ } else if (nodeName.equals(sourceElement.getPrefix() + Constants.COLON + TAG_COLUMN)
||
+ nodeName.equals(sourceElement.getPrefix() + Constants.COLON + TAG_COLUMNS)) {
+ // For new row, save length of previous.
+ if (RichFacesColumnTemplate.isBreakBefore(column)) {
+ count = Math.max(currentLength,count);
+ currentLength = 0;
+ }
+ String colspanStr = column.getAttribute("colspan"); //$NON-NLS-1$
+ try {
+ currentLength += Integer.parseInt(colspanStr);
+ } catch (NumberFormatException e) {
+ currentLength++;
+ }
+ } else if (nodeName.endsWith(TAG_COLUMN)) {
+ // UIColumn always have colspan == 1.
+ currentLength++;
+ }
+ }
+ }
+ return Math.max(currentLength, count);
+ }
+
+}
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractInplaceTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractInplaceTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractInplaceTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -15,7 +15,6 @@
import java.util.Map;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.jst.jsp.util.Constants;
import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.context.VpePageContext;
Copied:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAdapterFactory.java
(from rev 37881,
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFacesAdapterFactory.java)
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAdapterFactory.java
(rev 0)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAdapterFactory.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2011 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.vpe.richfaces.template;
+
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.jboss.tools.vpe.editor.template.VpeTemplateSafeWrapper;
+
+public class RichFacesAdapterFactory implements IAdapterFactory {
+
+ private static final Class[] types = {
+ RichFacesCollapsibleSubTableTemplate.class, RichFacesTogglePanelTemplate.class
+ };
+
+ @Override
+ public Class[] getAdapterList() {
+ return types;
+ }
+
+ @Override
+ public Object getAdapter(Object adaptableObject, Class adapterType) {
+ Object result = null;
+ if (adaptableObject instanceof VpeTemplateSafeWrapper) {
+ VpeTemplateSafeWrapper wrapper = (VpeTemplateSafeWrapper) adaptableObject;
+ if (adapterType == RichFacesCollapsibleSubTableTemplate.class) {
+ result = wrapper.castDelegateTo(RichFacesCollapsibleSubTableTemplate.class);
+ } else if (adapterType == RichFacesTogglePanelTemplate.class) {
+ result = wrapper.castDelegateTo(RichFacesTogglePanelTemplate.class);
+ }
+ }
+ return result;
+ }
+
+}
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAutocompleteTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAutocompleteTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAutocompleteTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -11,7 +11,6 @@
package org.jboss.tools.jsf.vpe.richfaces.template;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.Constants;
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 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCalendarTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -23,7 +23,6 @@
import java.util.regex.Pattern;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.mapping.AttributeData;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCollapsibleSubTableTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCollapsibleSubTableTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCollapsibleSubTableTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.richfaces.template;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCollapsibleSubTableTogglerTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCollapsibleSubTableTogglerTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCollapsibleSubTableTogglerTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -13,7 +13,6 @@
import java.util.List;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.mapping.VpeElementMapping;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColumnGroupTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColumnGroupTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColumnGroupTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -11,7 +11,6 @@
package org.jboss.tools.jsf.vpe.richfaces.template;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.mozilla.interfaces.nsIDOMDocument;
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 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColumnTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -15,7 +15,6 @@
import java.util.Map;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.mapping.VpeDomMapping;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplateHelper.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplateHelper.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplateHelper.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -17,8 +17,6 @@
import java.util.WeakHashMap;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.AttributeMap;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataDefinitionListTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataDefinitionListTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataDefinitionListTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -14,7 +14,6 @@
import java.util.Map;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataFilterSliderTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataFilterSliderTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataFilterSliderTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -11,7 +11,6 @@
package org.jboss.tools.jsf.vpe.richfaces.template;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.Constants;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataGridTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataGridTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataGridTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -18,7 +18,6 @@
import java.util.StringTokenizer;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataListTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataListTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataListTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -13,7 +13,6 @@
import java.util.List;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataOrderedListTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataOrderedListTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataOrderedListTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -22,7 +22,6 @@
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.util.HTML;
public class RichFacesDataOrderedListTemplate extends VpeAbstractTemplate {
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableChildrenEncoder.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableChildrenEncoder.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableChildrenEncoder.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -16,7 +16,6 @@
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
import org.jboss.tools.jsf.vpe.richfaces.RichFacesTemplatesActivator;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableScrollerTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableScrollerTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableScrollerTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -11,7 +11,6 @@
package org.jboss.tools.jsf.vpe.richfaces.template;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableStyleClassesApplier.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableStyleClassesApplier.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableStyleClassesApplier.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -14,7 +14,6 @@
import java.util.List;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
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 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -18,7 +18,6 @@
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
import org.jboss.tools.jsf.vpe.richfaces.RichFacesTemplatesActivator;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDropDownMenuTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDropDownMenuTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDropDownMenuTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -13,7 +13,6 @@
import java.util.List;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesEditorTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesEditorTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesEditorTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -11,7 +11,6 @@
package org.jboss.tools.jsf.vpe.richfaces.template;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesExtendedDataTableTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesExtendedDataTableTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesExtendedDataTableTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -14,7 +14,6 @@
import java.util.List;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesFileUploadTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesFileUploadTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesFileUploadTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -2,7 +2,6 @@
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesGMapTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesGMapTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesGMapTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -11,7 +11,6 @@
package org.jboss.tools.jsf.vpe.richfaces.template;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceInputTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceInputTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceInputTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -16,7 +16,6 @@
import java.util.Map;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInputNumberSpinnerTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInputNumberSpinnerTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInputNumberSpinnerTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -13,7 +13,6 @@
import java.util.List;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.mapping.AttributeData;
import org.jboss.tools.vpe.editor.mapping.NodeData;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesLayoutPanelTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesLayoutPanelTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesLayoutPanelTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -11,7 +11,6 @@
package org.jboss.tools.jsf.vpe.richfaces.template;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesLayoutTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesLayoutTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesLayoutTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -15,7 +15,6 @@
import java.util.Map;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesListShuttleTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesListShuttleTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesListShuttleTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -18,7 +18,6 @@
import java.util.Set;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesListTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesListTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesListTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.richfaces.template;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMenuGroupTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMenuGroupTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMenuGroupTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -13,7 +13,6 @@
import java.util.List;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMenuItemTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMenuItemTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMenuItemTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -13,7 +13,6 @@
import java.util.List;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessageTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessageTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessageTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -13,7 +13,6 @@
import java.util.HashMap;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.VpeSourceDomBuilder;
import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.context.VpePageContext;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessagesTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessagesTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessagesTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -13,7 +13,6 @@
import java.util.HashMap;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -8,7 +8,6 @@
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
import org.jboss.tools.jsf.vpe.richfaces.Messages;
import org.jboss.tools.jsf.vpe.richfaces.RichFacesTemplatesActivator;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPageTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPageTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPageTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -11,7 +11,6 @@
package org.jboss.tools.jsf.vpe.richfaces.template;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPaint2DTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPaint2DTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPaint2DTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -11,7 +11,6 @@
package org.jboss.tools.jsf.vpe.richfaces.template;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelBarTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelBarTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelBarTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -11,7 +11,6 @@
package org.jboss.tools.jsf.vpe.richfaces.template;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelItemTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelItemTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelItemTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -14,7 +14,6 @@
import java.util.Map;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -19,7 +19,6 @@
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
import
org.jboss.tools.jsf.vpe.richfaces.template.RichFacesFileUploadTemplate.StyleClasses;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.VpeSourceDomBuilder;
import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.context.VpePageContext;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -14,7 +14,6 @@
import java.util.List;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -14,7 +14,6 @@
import java.util.Map;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPickListTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPickListTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPickListTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -21,7 +21,6 @@
import java.util.Set;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesProgressBarTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesProgressBarTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesProgressBarTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -17,7 +17,6 @@
import java.util.Map;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -16,7 +16,6 @@
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
import org.jboss.tools.jsf.vpe.richfaces.RichFacesTemplatesActivator;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSelectTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSelectTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSelectTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -11,7 +11,6 @@
package org.jboss.tools.jsf.vpe.richfaces.template;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.Constants;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSimpleTogglePanelTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSimpleTogglePanelTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSimpleTogglePanelTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -15,7 +15,6 @@
import java.util.Map;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSpacerTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSpacerTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSpacerTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -13,7 +13,6 @@
import java.util.List;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -15,7 +15,6 @@
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
import org.jboss.tools.jsf.vpe.richfaces.RichFacesTemplatesActivator;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableToggleControlTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableToggleControlTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableToggleControlTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -11,7 +11,6 @@
package org.jboss.tools.jsf.vpe.richfaces.template;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.mapping.AttributeData;
import org.jboss.tools.vpe.editor.mapping.VpeElementData;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabPanelTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabPanelTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabPanelTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -18,7 +18,6 @@
import java.util.Map;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -14,7 +14,6 @@
import java.util.Map;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesToggleControlTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesToggleControlTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesToggleControlTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -20,7 +20,6 @@
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
import org.jboss.tools.jsf.vpe.richfaces.HtmlComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.mapping.VpeElementMapping;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamDecorateTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamDecorateTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamDecorateTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -12,8 +12,7 @@
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.Region;
-import org.jboss.tools.jsf.vpe.jsf.template.util.ComponentUtil;
-import org.jboss.tools.jsf.vpe.seam.template.util.SeamUtil;
+import org.jboss.tools.jsf.vpe.jsf.template.ComponentUtil;
import org.jboss.tools.jst.jsp.util.NodesManagingUtil;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamGraphicImageTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamGraphicImageTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamGraphicImageTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -12,8 +12,7 @@
import java.util.List;
-import org.jboss.tools.jsf.vpe.jsf.template.util.ComponentUtil;
-import org.jboss.tools.jsf.vpe.seam.template.util.SeamUtil;
+import org.jboss.tools.jsf.vpe.jsf.template.ComponentUtil;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamLinkTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamLinkTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamLinkTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -10,13 +10,13 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.seam.template;
-import org.jboss.tools.jsf.vpe.jsf.template.util.ComponentUtil;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.editor.util.VisualDomUtil;
import org.jboss.tools.jsf.vpe.jsf.template.AbstractOutputJsfTemplate;
+import org.jboss.tools.jsf.vpe.jsf.template.ComponentUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.w3c.dom.Element;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfAbstractChapterTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfAbstractChapterTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfAbstractChapterTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -16,7 +16,6 @@
import static org.jboss.tools.vpe.xulrunner.util.XPCOM.queryInterface;
-import org.jboss.tools.jsf.vpe.seam.template.util.SeamUtil;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfAbstractTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfAbstractTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfAbstractTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -14,7 +14,6 @@
* @author yzhishko
*/
-import org.jboss.tools.jsf.vpe.seam.template.util.SeamUtil;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.util.HTML;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfBarChartTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfBarChartTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfBarChartTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.seam.template;
-import org.jboss.tools.jsf.vpe.seam.template.util.SeamUtil;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfCellTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfCellTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfCellTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -15,7 +15,6 @@
*/
import static org.jboss.tools.vpe.xulrunner.util.XPCOM.queryInterface;
-import org.jboss.tools.jsf.vpe.seam.template.util.SeamUtil;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfDocumentTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfDocumentTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfDocumentTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -18,7 +18,6 @@
import java.util.ArrayList;
import java.util.List;
-import org.jboss.tools.jsf.vpe.seam.template.util.SeamUtil;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfFontTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfFontTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfFontTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -12,7 +12,6 @@
import static org.jboss.tools.vpe.xulrunner.util.XPCOM.queryInterface;
-import org.jboss.tools.jsf.vpe.seam.template.util.SeamUtil;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfFooterTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfFooterTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfFooterTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -16,7 +16,6 @@
import static org.jboss.tools.vpe.xulrunner.util.XPCOM.queryInterface;
-import org.jboss.tools.jsf.vpe.seam.template.util.SeamUtil;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfHTMLTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfHTMLTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfHTMLTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -15,10 +15,9 @@
*/
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
+import org.jboss.tools.jsf.vpe.jsf.VpeElementProxyData;
import org.jboss.tools.jsf.vpe.jsf.template.AbstractOutputJsfTemplate;
-import org.jboss.tools.jsf.vpe.jsf.template.util.NodeProxyUtil;
-import org.jboss.tools.jsf.vpe.jsf.template.util.model.VpeElementProxyData;
-import org.jboss.tools.jsf.vpe.seam.template.util.SeamUtil;
+import org.jboss.tools.jsf.vpe.jsf.template.NodeProxyUtil;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.mapping.AttributeData;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfLineChartTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfLineChartTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfLineChartTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.seam.template;
-import org.jboss.tools.jsf.vpe.seam.template.util.SeamUtil;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfParagraphTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfParagraphTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfParagraphTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -15,7 +15,6 @@
*/
import static org.jboss.tools.vpe.xulrunner.util.XPCOM.queryInterface;
-import org.jboss.tools.jsf.vpe.seam.template.util.SeamUtil;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfPieChartTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfPieChartTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfPieChartTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.seam.template;
-import org.jboss.tools.jsf.vpe.seam.template.util.SeamUtil;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfSectionTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfSectionTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfSectionTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -17,7 +17,6 @@
import java.util.StringTokenizer;
-import org.jboss.tools.jsf.vpe.seam.template.util.SeamUtil;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfTableTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfTableTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfTableTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -18,7 +18,6 @@
import java.util.ArrayList;
import java.util.List;
-import org.jboss.tools.jsf.vpe.seam.template.util.SeamUtil;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfTextTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfTextTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfTextTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -15,7 +15,6 @@
*/
import org.jboss.tools.jsf.vpe.jsf.template.AbstractOutputJsfTemplate;
-import org.jboss.tools.jsf.vpe.seam.template.util.SeamUtil;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.VisualDomUtil;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfTitleTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfTitleTemplate.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfTitleTemplate.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.seam.template;
-import org.jboss.tools.jsf.vpe.seam.template.util.SeamUtil;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.VisualDomUtil;
Copied:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamUtil.java
(from rev 37881,
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/util/SeamUtil.java)
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamUtil.java
(rev 0)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamUtil.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -0,0 +1,215 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.vpe.seam.template;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.jboss.tools.jsf.vpe.seam.SeamTemplatesActivator;
+import org.jboss.tools.jst.web.tld.TaglibData;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.VpeTemplateManager;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.editor.util.XmlUtil;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * Class contains Seam tags, general attributes and static methods usually used
+ * in Seam template classes.
+ *
+ * @author dmaliarevich
+ *
+ */
+public class SeamUtil {
+
+ public static final String ATTR_TEMPLATE = "template"; //$NON-NLS-1$
+ public static final String ATTR_STYLE_CLASS = "styleClass"; //$NON-NLS-1$
+ public static final String ATTR_URL = "url"; //$NON-NLS-1$
+ public final static String SEAM_ATTR_MARGINS = "margins"; //$NON-NLS-1$
+ public final static String[] POSSIBLE_ALIGNS = new String[] { "left",
//$NON-NLS-1$
+ "right", "center", "justify", "justifyall" };
//$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$
+ public final static String SEAM_ATTR_ALIGNMENT = "alignment"; //$NON-NLS-1$
+ public final static String SEAM_DIV_BASIC_STYLE_VALUE = "line-height: 142.0pt;
font-family: unknown;"; //$NON-NLS-1$
+ public final static String SEAM_SPAN_BASIC_STYLE_VALUE = "font-family:
unknown;"; //$NON-NLS-1$
+ public final static String SEAM_ATTR_HORIZONAL_ALIGNMENT =
"horizontalAlignment"; //$NON-NLS-1$
+ public final static String SEAM_ATTR_VERTICAL_ALIGNMENT = "verticalAlignment";
//$NON-NLS-1$
+ public final static String SEAM_ATTR_WIDTH_PERCENTAGE = "widthPercentage";
//$NON-NLS-1$
+ public final static String SEAM_ATTR_TYPE_ID_VALUE_PDF_TITLE = "pdf-title";
//$NON-NLS-1$
+ public final static String SEAM_ATTR_TYPE_ID = "TYPEID"; //$NON-NLS-1$
+ public final static String SEAM_ATTR_TYPE_ID_VALUE_PDF_FOOTER = "pdf-footer";
//$NON-NLS-1$
+
+ public static Node getParentByName(VpePageContext pageContext,
+ Node sourceNode, String parentName) {
+
+ Node parentNode = sourceNode.getParentNode();
+ VpeTemplateManager templateManager = VpeTemplateManager.getInstance();
+
+ while (parentNode != null) {
+ if (parentName.equals(
+ templateManager.getTemplateName(pageContext, parentNode))) {
+ return parentNode;
+ }
+ parentNode = parentNode.getParentNode();
+ }
+ return null;
+ }
+
+ public static void setAlignment(Element sourceElement,
+ nsIDOMElement visualElement) {
+
+ if (sourceElement.hasAttribute(SeamUtil.SEAM_ATTR_ALIGNMENT)) {
+ String align = sourceElement.getAttribute(SeamUtil.SEAM_ATTR_ALIGNMENT);
+ visualElement.setAttribute(HTML.ATTR_ALIGN, HTML.VALUE_ALIGN_LEFT);
+ for (int i = 0; i < SeamUtil.POSSIBLE_ALIGNS.length; i++) {
+ if (SeamUtil.POSSIBLE_ALIGNS[i].equalsIgnoreCase(align)) {
+ if (SeamUtil.POSSIBLE_ALIGNS[i]
+ .equalsIgnoreCase("justifyall")) { //$NON-NLS-1$
+ visualElement.setAttribute(HTML.ATTR_ALIGN,
+ HTML.VALUE_ALIGN_JUSTIFY);
+ return;
+ }
+ visualElement.setAttribute(HTML.ATTR_ALIGN,
+ SeamUtil.POSSIBLE_ALIGNS[i]);
+ return;
+ }
+ }
+ }
+ }
+
+ public static void getChildsByName(VpePageContext pageContext,
+ Node sourceNode, String childName, List<Node> childNodes) {
+ NodeList children = sourceNode.getChildNodes();
+ if (children != null) {
+ for (int i = 0; i < children.getLength(); i++) {
+ Node childNode = children.item(i);
+ String childSourcePrefix = childNode.getPrefix();
+ if (childSourcePrefix == null) {
+ childSourcePrefix = ""; //$NON-NLS-1$
+ }
+ List<TaglibData> taglibs = XmlUtil.getTaglibsForNode(childNode,
+ pageContext);
+
+ TaglibData sourceNodeTaglib = XmlUtil.getTaglibForPrefix(
+ childSourcePrefix, taglibs);
+
+ String childNodeName = childNode.getNodeName();
+ if (sourceNodeTaglib != null) {
+ String sourceNodeUri = sourceNodeTaglib.getUri();
+ String templateTaglibPrefix = VpeTemplateManager
+ .getInstance().getTemplateTaglibPrefix(
+ sourceNodeUri);
+
+ if (templateTaglibPrefix != null) {
+ childNodeName = templateTaglibPrefix
+ + ":" + childNode.getLocalName(); //$NON-NLS-1$
+ }
+ }
+ if (childNodeName.equals(childName)) {
+ childNodes.add(childNode);
+ }
+ getChildsByName(pageContext, childNode, childName, childNodes);
+ }
+ }
+ }
+
+ public static Node[] getChildsByName(VpePageContext pageContext,
+ Node sourceNode, String childName) {
+ List<Node> footerNodes = new ArrayList<Node>(0);
+ getChildsByName(pageContext, sourceNode, childName, footerNodes);
+ return footerNodes.toArray(new Node[0]);
+ }
+
+ public static String getStyleAttr(Node sourceFontNode) {
+ if (sourceFontNode == null
+ || !sourceFontNode.getNodeName().endsWith("font")) { //$NON-NLS-1$
+ return null;
+ }
+ String styleAttrValue = getFontFamily(sourceFontNode)
+ + getSize(sourceFontNode) + parseFontStyleValue(sourceFontNode);
+ return styleAttrValue;
+ }
+
+ private static String parseFontStyleValue(Node sourceFontNode) {
+ StringBuilder styleAttrValue = new StringBuilder(); //$NON-NLS-1$
+ Element sourceFontElement = (Element) sourceFontNode;
+ if (sourceFontElement.hasAttribute(HTML.ATTR_STYLE)) {
+ String stringValueToParse = sourceFontElement.getAttribute(HTML.ATTR_STYLE);
+ int boldPos = stringValueToParse.indexOf("bold"); //$NON-NLS-1$
+ if (boldPos != -1) {
+ styleAttrValue.append(" font-weight : bold;"); //$NON-NLS-1$
+ }
+ int italicPos = stringValueToParse.indexOf("italic"); //$NON-NLS-1$
+ if (italicPos != -1) {
+ styleAttrValue.append(" font-style : italic;"); //$NON-NLS-1$
+ }
+ int underLinePos = stringValueToParse.indexOf("underline"); //$NON-NLS-1$
+ if (underLinePos != -1) {
+ styleAttrValue.append(" text-decoration : underline;"); //$NON-NLS-1$
+ }
+ int lineThroughPos = stringValueToParse.indexOf("line-through");
//$NON-NLS-1$
+ if (lineThroughPos != -1) {
+ styleAttrValue.append(" text-decoration : line-through;"); //$NON-NLS-1$
+ }
+ }
+ return styleAttrValue.toString();
+ }
+
+ private static String getFontFamily(Node sourceFontNode) {
+ String fontFamily = "unknown"; //$NON-NLS-1$
+ Element sourceFontElement = (Element) sourceFontNode;
+ if (sourceFontElement.hasAttribute(HTML.ATTR_NAME)) {
+ String stringName = sourceFontElement.getAttribute(HTML.ATTR_NAME);
+ fontFamily = stringName;
+ }
+ return " font-family : " + fontFamily + ";"; //$NON-NLS-1$
//$NON-NLS-2$
+ }
+
+ private static String getSize(Node sourceFontNode) {
+ Element sourceFontElement = (Element) sourceFontNode;
+ if (sourceFontElement.hasAttribute(HTML.ATTR_SIZE)) {
+ try {
+ String stringSizeAttr = sourceFontElement.getAttribute(HTML.ATTR_SIZE);
+ int intSize = Integer.parseInt(stringSizeAttr);
+ if (intSize < 0) {
+ return ""; //$NON-NLS-1$
+ }
+ return " font-size : " + stringSizeAttr + "pt;"; //$NON-NLS-1$
//$NON-NLS-2$
+ } catch (NumberFormatException e) {
+ return ""; //$NON-NLS-1$
+ }
+ } else {
+ return ""; //$NON-NLS-1$
+ }
+ }
+
+ public static String getAbsoluteResourcePath(String resourcePathInPlugin) {
+ String pluginPath = SeamTemplatesActivator.getPluginResourcePath();
+ IPath pluginFile = new Path(pluginPath);
+ File file = pluginFile.append(resourcePathInPlugin).toFile();
+ if (file.exists()) {
+ return file.getAbsolutePath();
+ } else {
+ throw new IllegalArgumentException("Can't get path for " //$NON-NLS-1$
+ + resourcePathInPlugin);
+ }
+ }
+
+ public static void setImg(nsIDOMElement img, String fileImageName) {
+ img.setAttribute(HTML.ATTR_SRC, "file://" //$NON-NLS-1$
+ + getAbsoluteResourcePath(fileImageName).replace('\\', '/'));
+ }
+
+}
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/OpenOnJsf20Test_JBIDE5382.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/OpenOnJsf20Test_JBIDE5382.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/OpenOnJsf20Test_JBIDE5382.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -12,7 +12,7 @@
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.PlatformUI;
-import org.jboss.tools.jsf.vpe.jsf.template.util.JSF;
+import org.jboss.tools.jsf.vpe.jsf.template.JSF;
import org.jboss.tools.jsf.vpe.jsf.test.JsfAllTests;
import org.jboss.tools.jst.jsp.util.NodesManagingUtil;
import org.jboss.tools.vpe.base.test.OpenOnUtil;
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/TestFViewLocaleAttribute_JBIDE5218.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/TestFViewLocaleAttribute_JBIDE5218.java 2012-01-17
19:07:46 UTC (rev 37909)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/TestFViewLocaleAttribute_JBIDE5218.java 2012-01-17
19:14:35 UTC (rev 37910)
@@ -25,7 +25,7 @@
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.part.FileEditorInput;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
-import org.jboss.tools.jsf.vpe.jsf.template.util.ComponentUtil;
+import org.jboss.tools.jsf.vpe.jsf.template.ComponentUtil;
import org.jboss.tools.jsf.vpe.jsf.test.JsfAllTests;
import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
import org.jboss.tools.test.util.JobUtils;