JBoss Tools SVN: r37913 - in trunk/requirements: jbossesb-4.10 and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2012-01-17 14:44:59 -0500 (Tue, 17 Jan 2012)
New Revision: 37913
Added:
trunk/requirements/jbossesb-4.10/
trunk/requirements/jbossesb-4.10/build.properties
Log:
https://issues.jboss.org/browse/JBIDE-10257 Add new set of requirements for usage in SWT Bot tests
jbossesb 4.10 added
Added: trunk/requirements/jbossesb-4.10/build.properties
===================================================================
--- trunk/requirements/jbossesb-4.10/build.properties (rev 0)
+++ trunk/requirements/jbossesb-4.10/build.properties 2012-01-17 19:44:59 UTC (rev 37913)
@@ -0,0 +1,7 @@
+jbossesb.build.uri=http://download.jboss.org/jbossesb/4.10/binary/
+build.uri=${jbossesb.build.uri}
+build.archive.root=jbossesb-4.10
+build.archive=${build.archive.root}.zip
+md5=da0d98bc0713229b7f8ba7ab5951072c
+
+
Property changes on: trunk/requirements/jbossesb-4.10/build.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
12 years, 12 months
JBoss Tools SVN: r37912 - trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/naturesCheckKBTest/.settings.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2012-01-17 14:19:33 -0500 (Tue, 17 Jan 2012)
New Revision: 37912
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/naturesCheckKBTest/.settings/
Log:
added ignored resources
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/naturesCheckKBTest/.settings
___________________________________________________________________
Added: svn:ignore
+ org.eclipse.wst.jsdt.ui.superType.container
org.eclipse.wst.jsdt.ui.superType.name
.jsdtscope
12 years, 12 months
JBoss Tools SVN: r37910 - in trunk/jsf: plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets and 13 other directories.
by jbosstools-commits@lists.jboss.org
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;
12 years, 12 months
JBoss Tools SVN: r37909 - in trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/HiperlinksTestProject: WebContent and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2012-01-17 14:07:46 -0500 (Tue, 17 Jan 2012)
New Revision: 37909
Added:
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/HiperlinksTestProject/JavaSource/org/jboss/tools/test/TestConverter.java
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/HiperlinksTestProject/WebContent/converterHiperlinkTest.jsp
Log:
missing resources added to test project for jsf.text.ext.test
Added: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/HiperlinksTestProject/JavaSource/org/jboss/tools/test/TestConverter.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/HiperlinksTestProject/JavaSource/org/jboss/tools/test/TestConverter.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/HiperlinksTestProject/JavaSource/org/jboss/tools/test/TestConverter.java 2012-01-17 19:07:46 UTC (rev 37909)
@@ -0,0 +1,23 @@
+package org.jboss.tools.test;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+
+public class TestConverter implements Converter {
+
+ public TestConverter() {
+ // TODO Auto-generated constructor stub
+ }
+
+ public Object getAsObject(FacesContext arg0, UIComponent arg1, String arg2) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getAsString(FacesContext arg0, UIComponent arg1, Object arg2) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/HiperlinksTestProject/JavaSource/org/jboss/tools/test/TestConverter.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/HiperlinksTestProject/WebContent/converterHiperlinkTest.jsp
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/HiperlinksTestProject/WebContent/converterHiperlinkTest.jsp (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/HiperlinksTestProject/WebContent/converterHiperlinkTest.jsp 2012-01-17 19:07:46 UTC (rev 37909)
@@ -0,0 +1,12 @@
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+
+<html>
+ <body>
+ <f:view>
+ <h:form>
+ <f:converter converterId="testConverter" />
+ </h:form>
+ </f:view>
+ </body>
+</html>
\ No newline at end of file
12 years, 12 months
JBoss Tools SVN: r37908 - trunk/as/plugins/org.jboss.ide.eclipse.as.management.core.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-01-17 13:55:50 -0500 (Tue, 17 Jan 2012)
New Revision: 37908
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.management.core/
Log:
adding bin to svnignore
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.management.core
___________________________________________________________________
Modified: svn:ignore
- target
+ target
bin
12 years, 12 months
JBoss Tools SVN: r37907 - in trunk/as: plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-01-17 13:49:00 -0500 (Tue, 17 Jan 2012)
New Revision: 37907
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/.settings/.api_filters
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerWorkingCopyPropertyCommand.java
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/server/ServerSecureStorageTest.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerUtil.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerPasswordSection.java
trunk/as/tests/org.jboss.ide.eclipse.as.test/META-INF/MANIFEST.MF
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/ASTestSuite.java
Log:
https://issues.jboss.org/browse/JBIDE-10490 - secure passwords for app servers (NOT openshift)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF 2012-01-17 18:25:01 UTC (rev 37906)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF 2012-01-17 18:49:00 UTC (rev 37907)
@@ -24,7 +24,8 @@
org.eclipse.core.commands;bundle-version="3.6.0",
org.eclipse.pde.core;bundle-version="3.7.0",
org.eclipse.jst.j2ee.web;bundle-version="1.1.500",
- org.jboss.ide.eclipse.as.management.core
+ org.jboss.ide.eclipse.as.management.core,
+ org.eclipse.equinox.security;bundle-version="1.1.1"
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.ide.eclipse.as.core,
org.jboss.ide.eclipse.as.core.extensions.descriptors,
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java 2012-01-17 18:25:01 UTC (rev 37906)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java 2012-01-17 18:49:00 UTC (rev 37907)
@@ -28,14 +28,20 @@
import static org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants.WEB_PORT_DETECT;
import static org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants.WEB_PORT_DETECT_XPATH;
+import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
import java.net.URL;
+import java.net.URLEncoder;
import java.util.Date;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
+import org.eclipse.equinox.security.storage.EncodingUtils;
+import org.eclipse.equinox.security.storage.ISecurePreferences;
+import org.eclipse.equinox.security.storage.SecurePreferencesFactory;
+import org.eclipse.equinox.security.storage.StorageException;
import org.eclipse.jst.server.core.IWebModule;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IServer;
@@ -47,7 +53,6 @@
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader;
-import org.jboss.ide.eclipse.as.core.util.ExpressionResolverUtil;
import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
import org.jboss.ide.eclipse.as.core.util.RuntimeUtils;
import org.jboss.ide.eclipse.as.core.util.ServerUtil;
@@ -67,7 +72,6 @@
setAttribute("auto-publish-time", 1); //$NON-NLS-1$
setAttribute("id", getAttribute("id", (String)"") + new Date().getTime()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
setUsername("admin"); //$NON-NLS-1$
- setPassword("admin"); //$NON-NLS-1$
boolean defaultServerDeployment = isAS50() || isEAP(getServer());
setDeployLocationType(defaultServerDeployment ? IDeployableServer.DEPLOY_SERVER : IDeployableServer.DEPLOY_METADATA);
}
@@ -248,12 +252,16 @@
}
public String getPassword() {
- return getAttribute(SERVER_PASSWORD, ""); //$NON-NLS-1$
+ String s = ServerUtil.getFromSecureStorage(getServer(), SERVER_PASSWORD);
+ if( s == null )
+ return getAttribute(SERVER_PASSWORD, "admin"); //$NON-NLS-1$
+ return s;
}
public void setPassword(String pass) {
- setAttribute(SERVER_PASSWORD, pass);
+ ServerUtil.storeInSecureStorage(getServer(), SERVER_PASSWORD, pass);
}
+
public boolean hasJMXProvider() {
DeployableServerBehavior beh = (DeployableServerBehavior)getServer().loadAdapter(
DeployableServerBehavior.class, new NullProgressMonitor());
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerUtil.java 2012-01-17 18:25:01 UTC (rev 37906)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerUtil.java 2012-01-17 18:49:00 UTC (rev 37907)
@@ -11,6 +11,11 @@
package org.jboss.ide.eclipse.as.core.util;
import java.io.File;
+import java.io.IOError;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URL;
+import java.net.URLEncoder;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
@@ -18,6 +23,10 @@
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
+import org.eclipse.equinox.security.storage.EncodingUtils;
+import org.eclipse.equinox.security.storage.ISecurePreferences;
+import org.eclipse.equinox.security.storage.SecurePreferencesFactory;
+import org.eclipse.equinox.security.storage.StorageException;
import org.eclipse.osgi.util.NLS;
import org.eclipse.wst.server.core.IRuntime;
import org.eclipse.wst.server.core.IServer;
@@ -167,4 +176,53 @@
return new Path(checkedGetServerHome(jbs));
}
+
+ private static final String SECURE = "secure"; //$NON-NLS-1$
+ /**
+ * @since 2.3
+ */
+ public static String getFromSecureStorage(IServer server, String key) {
+ try {
+ ISecurePreferences node = getNode(server);
+ String val = node.get(key, null);
+ if (val == null) {
+ return null;
+ }
+ return new String(EncodingUtils.decodeBase64(val));
+ } catch(IOException e) {
+ return null;
+ } catch (StorageException e) {
+ return null;
+ }
+ }
+
+ /**
+ * @since 2.3
+ */
+ public static void storeInSecureStorage(IServer server, String key, String val ) {
+ try {
+ ISecurePreferences node = getNode(server);
+ if( val == null )
+ node.put(key, val, true);
+ else
+ node.put(key, EncodingUtils.encodeBase64(val.getBytes()), true /* encrypt */);
+ } catch (StorageException e) {
+ } catch (UnsupportedEncodingException e) {
+ }
+ }
+
+ private static ISecurePreferences getNode(IServer server) throws UnsupportedEncodingException {
+ try {
+ IPath p = JBossServerCorePlugin.getServerStateLocation(server).append(SECURE);
+ if( !p.toFile().exists())
+ p.toFile().mkdirs();
+
+ URL url = p.toFile().toURI().toURL();
+ ISecurePreferences root = SecurePreferencesFactory.open(url, null);
+ return root;
+ } catch(IOException ioe ) {
+ return null;
+ }
+ }
+
}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/.settings/.api_filters
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/.settings/.api_filters (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/.settings/.api_filters 2012-01-17 18:49:00 UTC (rev 37907)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<component id="org.jboss.ide.eclipse.as.ui" version="2">
+ <resource path="jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerPasswordSection.java" type="org.jboss.ide.eclipse.as.ui.editor.ServerPasswordSection">
+ <filter id="338886760">
+ <message_arguments>
+ <message_argument value="org.jboss.ide.eclipse.as.ui.editor.ServerPasswordSection.SetVarCommand"/>
+ <message_argument value="org.jboss.ide.eclipse.as.ui_2.3.0"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerPasswordSection.java" type="org.jboss.ide.eclipse.as.ui.editor.ServerPasswordSection$SetPassCommand">
+ <filter id="338849923">
+ <message_arguments>
+ <message_argument value="org.jboss.ide.eclipse.as.ui.editor.ServerPasswordSection.SetPassCommand"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerPasswordSection.java" type="org.jboss.ide.eclipse.as.ui.editor.ServerPasswordSection$SetUserCommand">
+ <filter id="338849923">
+ <message_arguments>
+ <message_argument value="org.jboss.ide.eclipse.as.ui.editor.ServerPasswordSection.SetUserCommand"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerPasswordSection.java" type="org.jboss.ide.eclipse.as.ui.editor.ServerPasswordSection$SetVarCommand">
+ <filter comment="Visibility error" id="337686583">
+ <message_arguments>
+ <message_argument value="org.jboss.ide.eclipse.as.ui.editor.ServerPasswordSection.SetVarCommand"/>
+ </message_arguments>
+ </filter>
+ </resource>
+</component>
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerPasswordSection.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerPasswordSection.java 2012-01-17 18:25:01 UTC (rev 37906)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerPasswordSection.java 2012-01-17 18:49:00 UTC (rev 37907)
@@ -21,6 +21,7 @@
*/
package org.jboss.ide.eclipse.as.ui.editor;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.layout.GridData;
@@ -52,6 +53,9 @@
private ModifyListener nameModifyListener, passModifyListener;
private Text nameText, passText;
private ServerAttributeHelper helper;
+
+ private String passwordString;
+
public void init(IEditorSite site, IEditorInput input) {
super.init(site, input);
helper = new ServerAttributeHelper(server.getOriginal(), server);
@@ -80,6 +84,7 @@
Label password = toolkit.createLabel(composite, Messages.swf_Password);
password.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
passText = toolkit.createText(composite, p);
+ passwordString = p;
d = new GridData(); d.grabExcessHorizontalSpace = true; d.widthHint = 100;
nameText.setLayoutData(d);
@@ -105,47 +110,37 @@
}
- public class SetUserCommand extends SetVarCommand {
+ public class SetUserCommand extends ServerWorkingCopyPropertyCommand {
public SetUserCommand(IServerWorkingCopy server) {
super(server, Messages.EditorChangeUsernameCommandName, nameText, nameText.getText(),
IJBossToolingConstants.SERVER_USERNAME, nameModifyListener);
}
}
- public class SetPassCommand extends SetVarCommand {
+ public class SetPassCommand extends ServerWorkingCopyPropertyCommand {
public SetPassCommand(IServerWorkingCopy server) {
super(server, Messages.EditorChangePasswordCommandName, passText, passText.getText(),
IJBossToolingConstants.SERVER_PASSWORD, passModifyListener);
}
- }
-
- public class SetVarCommand extends ServerCommand {
- private String oldVal;
- private String newVal;
- private String key;
- private Text text;
- private ModifyListener listener;
- public SetVarCommand(IServerWorkingCopy wc, String name,
- Text text, String newVal, String attributeKey,
- ModifyListener listener) {
- super(wc, name);
- this.text = text;
- this.key = attributeKey;
- this.newVal = newVal;
- this.listener = listener;
- this.oldVal = helper.getAttribute(attributeKey, ""); //$NON-NLS-1$
- }
-
public void execute() {
- helper.setAttribute(key, newVal);
+ passwordString = newVal;
}
public void undo() {
+ passwordString = oldVal;
text.removeModifyListener(listener);
- helper.setAttribute(key, oldVal);
text.setText(oldVal);
text.addModifyListener(listener);
}
}
+
+ /**
+ * Allow a section an opportunity to respond to a doSave request on the editor.
+ * @param monitor the progress monitor for the save operation.
+ */
+ public void doSave(IProgressMonitor monitor) {
+ monitor.worked(100);
+ }
+
}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerWorkingCopyPropertyCommand.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerWorkingCopyPropertyCommand.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerWorkingCopyPropertyCommand.java 2012-01-17 18:49:00 UTC (rev 37907)
@@ -0,0 +1,43 @@
+package org.jboss.ide.eclipse.as.ui.editor;
+
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+import org.eclipse.wst.server.ui.internal.command.ServerCommand;
+/**
+ * @since 2.3
+ */
+public class ServerWorkingCopyPropertyCommand extends ServerCommand {
+ protected String oldVal;
+ protected String newVal;
+ protected String key;
+ protected Text text;
+ protected ModifyListener listener;
+ protected IServerWorkingCopy wc;
+
+ public ServerWorkingCopyPropertyCommand(IServerWorkingCopy wc, String commandName,
+ Text text, String newVal, String attributeKey,
+ ModifyListener listener) {
+ super(wc, commandName);
+ this.wc = wc;
+ this.text = text;
+ this.key = attributeKey;
+ this.newVal = newVal;
+ this.listener = listener;
+ this.oldVal = wc.getAttribute(attributeKey, ""); //$NON-NLS-1$
+ }
+
+ public void execute() {
+ wc.setAttribute(key, newVal);
+ }
+
+ public void undo() {
+ if( listener != null )
+ text.removeModifyListener(listener);
+ wc.setAttribute(key, oldVal);
+ if( text != null && !text.isDisposed())
+ text.setText(oldVal);
+ if( listener != null )
+ text.addModifyListener(listener);
+ }
+}
\ No newline at end of file
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/META-INF/MANIFEST.MF 2012-01-17 18:25:01 UTC (rev 37906)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/META-INF/MANIFEST.MF 2012-01-17 18:49:00 UTC (rev 37907)
@@ -42,7 +42,8 @@
org.jboss.ide.eclipse.as.wtp.ui,
org.eclipse.jst.jsf.core,
org.eclipse.jpt.jpa.core,
- org.jboss.ide.eclipse.as.management.core;bundle-version="1.0.0"
+ org.jboss.ide.eclipse.as.management.core;bundle-version="1.0.0",
+ org.eclipse.equinox.security;bundle-version="1.1.1"
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/ASTestSuite.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/ASTestSuite.java 2012-01-17 18:25:01 UTC (rev 37906)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/ASTestSuite.java 2012-01-17 18:49:00 UTC (rev 37907)
@@ -42,6 +42,7 @@
import org.jboss.ide.eclipse.as.test.publishing.v2.SingleFileDeploymentTester;
import org.jboss.ide.eclipse.as.test.server.JBossServerAPITest;
import org.jboss.ide.eclipse.as.test.server.ServerBeanLoaderTest;
+import org.jboss.ide.eclipse.as.test.server.ServerSecureStorageTest;
import org.jboss.ide.eclipse.as.test.util.ArgsUtilTest;
import org.jboss.ide.eclipse.as.test.util.ExpressionResolverUtilTest;
@@ -53,6 +54,7 @@
suite.addTestSuite(ExpressionResolverUtilTest.class);
suite.addTestSuite(PreReqTest.class);
suite.addTestSuite(ServerBeanLoaderTest.class);
+ suite.addTestSuite(ServerSecureStorageTest.class);
suite.addTestSuite(RuntimeServerModelTest.class);
suite.addTestSuite(JEEClasspathContainerTest.class);
suite.addTestSuite(ProjectRuntimeTest.class);
Added: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/server/ServerSecureStorageTest.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/server/ServerSecureStorageTest.java (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/server/ServerSecureStorageTest.java 2012-01-17 18:49:00 UTC (rev 37907)
@@ -0,0 +1,82 @@
+package org.jboss.ide.eclipse.as.test.server;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+import org.eclipse.wst.server.core.ServerCore;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
+import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
+import org.jboss.ide.eclipse.as.core.util.ServerConverter;
+import org.jboss.ide.eclipse.as.core.util.ServerUtil;
+import org.jboss.ide.eclipse.as.test.util.ServerRuntimeUtils;
+import org.jboss.ide.eclipse.as.test.util.wtp.ProjectUtility;
+
+public class ServerSecureStorageTest extends TestCase {
+ public void tearDown() {
+ try {
+ ProjectUtility.deleteAllProjects();
+ ServerRuntimeUtils.deleteAllServers();
+ ServerRuntimeUtils.deleteAllRuntimes();
+ } catch(Exception e) {
+ }
+ }
+
+ public void testServerSecureStorage() throws CoreException {
+ IServer server = ServerRuntimeUtils.create60Server();
+ String val = ServerUtil.getFromSecureStorage(server, "TEST");
+ assertNull(val);
+ ServerUtil.storeInSecureStorage(server, "TEST", "VAL");
+ val = ServerUtil.getFromSecureStorage(server, "TEST");
+ assertEquals(val, "VAL");
+ }
+
+ public void testUserPass() throws CoreException {
+ IServer server = ServerRuntimeUtils.create60Server();
+ JBossServer jbs = ServerConverter.getJBossServer(server);
+ assertEquals(jbs.getUsername(), "admin");
+ assertEquals(jbs.getPassword(), "admin");
+
+ IServerWorkingCopy wc = server.createWorkingCopy();
+ wc.setAttribute(IJBossToolingConstants.SERVER_USERNAME, "newUser");
+ wc.setAttribute(IJBossToolingConstants.SERVER_PASSWORD, "newPass");
+ server = wc.save(false, null);
+
+ assertEquals(jbs.getUsername(), "newUser");
+ assertEquals(jbs.getPassword(), "newPass");
+
+ try {
+ jbs = ServerConverter.getJBossServer(server);
+ jbs.setUsername("failUser");
+ fail();
+ } catch( NullPointerException npe ) {
+ // expected... cannot set attributes when there is no working copy!
+ }
+
+ IServer server2 = ServerCore.findServer(server.getId());
+ jbs = ServerConverter.getJBossServer(server2);
+ assertEquals(jbs.getUsername(), "newUser");
+ assertEquals(jbs.getPassword(), "newPass");
+
+ // Note, the jbs is NOT from this new working copy
+ try {
+ wc = server2.createWorkingCopy();
+ jbs.setUsername("successUser");
+ fail();
+ } catch(NullPointerException npe ) {
+ // expected. The jbs must be created after the working copy
+ }
+
+ // Note, jbs must be made out of wc
+ wc = server2.createWorkingCopy();
+ jbs = ServerConverter.getJBossServer(wc);
+ jbs.setUsername("successUser");
+ jbs.setPassword("successPass");
+ server = wc.save(false, null);
+
+ jbs = ServerConverter.getJBossServer(server);
+ assertEquals(jbs.getUsername(), "successUser");
+ assertEquals(jbs.getPassword(), "successPass");
+ }
+}
12 years, 12 months
JBoss Tools SVN: r37906 - in trunk/openshift/plugins: org.jboss.tools.openshift.egit.ui/META-INF and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-01-17 13:25:01 -0500 (Tue, 17 Jan 2012)
New Revision: 37906
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/META-INF/MANIFEST.MF
trunk/openshift/plugins/org.jboss.tools.openshift.egit.ui/META-INF/MANIFEST.MF
trunk/openshift/plugins/org.jboss.tools.openshift.egit.ui/src/org/jboss/tools/openshift/egit/ui/util/EGitUIUtils.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/SelectExistingProjectDialog.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/AbstractImportApplicationOperation.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ConfigureGitSharedProject.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ConfigureUnsharedProject.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ImportNewProject.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ImportProjectWizard.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ImportProjectWizardModel.java
Log:
[JBIDE-10479] implemented basic import strategy to enable OpenShift on git shared projects in your workspace
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/META-INF/MANIFEST.MF 2012-01-17 18:19:23 UTC (rev 37905)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/META-INF/MANIFEST.MF 2012-01-17 18:25:01 UTC (rev 37906)
@@ -7,8 +7,8 @@
Require-Bundle: org.jboss.ide.eclipse.as.core;bundle-version="2.3.0",
org.eclipse.jgit;bundle-version="[1.0.0,2.1.0)",
org.eclipse.egit;bundle-version="[1.0.0,2.0.0)",
+ com.jcraft.jsch;bundle-version="0.1.44",
org.eclipse.egit.core;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.egit.ui;bundle-version="[1.0.0,2.0.0)",
org.eclipse.team.core;bundle-version="[3.6.0,4.0.0)",
org.eclipse.wst.server.core;bundle-version="[1.1.302,2.0.0)",
org.eclipse.core.resources;bundle-version="[3.7.100,4.0.0)",
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.egit.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.egit.ui/META-INF/MANIFEST.MF 2012-01-17 18:19:23 UTC (rev 37905)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.egit.ui/META-INF/MANIFEST.MF 2012-01-17 18:25:01 UTC (rev 37906)
@@ -4,15 +4,16 @@
Bundle-SymbolicName: org.jboss.tools.openshift.egit.ui;singleton:=true
Bundle-Version: 2.3.0.qualifier
Bundle-Activator: org.jboss.tools.openshift.egit.ui.EGitUIActivator
-Require-Bundle: org.eclipse.egit.core;bundle-version="[1.0.0,2.0.0)",
+Require-Bundle: org.jboss.tools.openshift.egit.core;bundle-version="[2.3.0,3.0.0)",
+ org.eclipse.egit.core;bundle-version="[1.0.0,2.0.0)",
org.eclipse.egit.ui;bundle-version="[1.0.0,2.0.0)",
org.eclipse.jgit;bundle-version="[1.0.0,2.0.0)",
+ com.jcraft.jsch;bundle-version="[0.1.44,1.0.0)",
org.eclipse.ui;bundle-version="[3.7.0,4.0.0)",
org.eclipse.core.runtime,
org.eclipse.core.expressions;bundle-version="[3.4.300,4.0.0)",
org.eclipse.core.resources;bundle-version="[3.7.100,4.0.0)",
- org.eclipse.ui.ide;bundle-version="[3.7.0,4.0.0)",
- org.jboss.tools.openshift.egit.core;bundle-version="0.0.1"
+ org.eclipse.ui.ide;bundle-version="[3.7.0,4.0.0)"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: JBoss by Red Hat
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.egit.ui/src/org/jboss/tools/openshift/egit/ui/util/EGitUIUtils.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.egit.ui/src/org/jboss/tools/openshift/egit/ui/util/EGitUIUtils.java 2012-01-17 18:19:23 UTC (rev 37905)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.egit.ui/src/org/jboss/tools/openshift/egit/ui/util/EGitUIUtils.java 2012-01-17 18:25:01 UTC (rev 37906)
@@ -10,13 +10,56 @@
******************************************************************************/
package org.jboss.tools.openshift.egit.ui.util;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egit.core.RepositoryUtil;
+import org.eclipse.egit.core.op.CloneOperation.PostCloneTask;
import org.eclipse.egit.ui.Activator;
import org.eclipse.egit.ui.UIPreferences;
+import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.transport.JschConfigSessionFactory;
+/**
+ * @author Andre Dietisheim
+ */
public class EGitUIUtils {
+ /**
+ * A post clone task that will add the new repo (that was created when
+ * cloning) to the EGit repositories view.
+ */
+ public static final PostCloneTask ADD_TO_REPOVIEW_TASK = new PostCloneTask() {
+
+ @Override
+ public void execute(Repository repository, IProgressMonitor monitor) throws CoreException {
+ RepositoryUtil repositoryUtil = Activator.getDefault().getRepositoryUtil();
+ repositoryUtil.addConfiguredRepository(repository.getDirectory());
+ }
+ };
+
public static String getEGitDefaultRepositoryPath() {
return Activator.getDefault().getPreferenceStore().getString(UIPreferences.DEFAULT_REPO_DIR);
}
+ /**
+ * The EGit UI plugin initializes the ssh factory to present the user a
+ * passphrase prompt if the ssh key was not read yet. If this initialization
+ * is not executed, the ssh connection to the git repo would just fail with
+ * an authentication error. We therefore have to make sure that the EGit UI
+ * plugin is started and initializes the JSchConfigSessionFactory.
+ * <p>
+ * EGit initializes the SshSessionFactory with the EclipseSshSessionFactory.
+ * The EclipseSshSessionFactory overrides JschConfigSessionFactory#configure
+ * to present a UserInfoPrompter if the key passphrase was not entered
+ * before.
+ *
+ * @see Activator#start(org.osgi.framework.BundleContext)
+ * @see Activator#setupSSH
+ * @see JschConfigSessionFactory#configure
+ * @see EclipseSshSessionFactory#configure
+ */
+ public static void ensureEgitUIIsStarted() {
+ Activator.getDefault();
+ }
+
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/SelectExistingProjectDialog.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/SelectExistingProjectDialog.java 2012-01-17 18:19:23 UTC (rev 37905)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/SelectExistingProjectDialog.java 2012-01-17 18:25:01 UTC (rev 37906)
@@ -54,13 +54,11 @@
private boolean isValid(IProject project) {
if (EGitUtils.isShared(project)) {
- return false;
+ if (!EGitUtils.isSharedWithGit(project)) {
+ return false;
+ }
}
- if (EGitUtils.hasDotGitFolder(project)) {
- return false;
- }
-
if (!hasModuleNature(project)) {
return false;
}
@@ -71,7 +69,7 @@
private boolean hasModuleNature(IProject project) {
try {
return project.hasNature(IModuleConstants.MODULE_NATURE_ID);
- } catch(CoreException e) {
+ } catch (CoreException e) {
return false;
}
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/AbstractImportApplicationOperation.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/AbstractImportApplicationOperation.java 2012-01-17 18:19:23 UTC (rev 37905)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/AbstractImportApplicationOperation.java 2012-01-17 18:25:01 UTC (rev 37906)
@@ -18,13 +18,9 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.egit.core.RepositoryUtil;
-import org.eclipse.egit.core.op.CloneOperation;
-import org.eclipse.egit.ui.Activator;
-import org.eclipse.jgit.lib.Constants;
-import org.eclipse.jgit.transport.JschConfigSessionFactory;
-import org.eclipse.jgit.transport.URIish;
import org.eclipse.osgi.util.NLS;
+import org.jboss.tools.openshift.egit.core.EGitUtils;
+import org.jboss.tools.openshift.egit.ui.util.EGitUIUtils;
import com.openshift.express.client.IApplication;
import com.openshift.express.client.OpenShiftException;
@@ -34,8 +30,6 @@
*/
abstract class AbstractImportApplicationOperation implements IImportApplicationStrategy {
- private static final int CLONE_TIMEOUT = 10 * 1024;
-
private String projectName;
private IApplication application;
private String remoteName;
@@ -48,58 +42,44 @@
/**
* Clones the repository of the selected OpenShift application to the user
- * provided path
+ * provided path.
*
+ * @param application
+ * the application to clone
+ * @param remoteName
+ * the name of the remote repo to clone
+ * @param destination
+ * the destination to clone to
+ * @param addToRepoView
+ * if true, the clone repo will get added to the (egit)
+ * repositories view
* @param monitor
* the monitor to report progress to
- * @return
- * @throws URISyntaxException
+ *
+ * @return the location of the cloned repository
* @throws OpenShiftException
* @throws InvocationTargetException
* @throws InterruptedException
+ * @throws URISyntaxException
*
* @see AbstractImportApplicationOperation#getApplication()
* @see #getRepositoryPath()
*/
- protected File cloneRepository(IApplication application, String remoteName, File destination, IProgressMonitor monitor)
+ protected File cloneRepository(IApplication application, String remoteName, File destination,
+ boolean addToRepoView, IProgressMonitor monitor)
throws OpenShiftException, InvocationTargetException, InterruptedException, URISyntaxException {
monitor.subTask(NLS.bind("Cloning repository for application {0}...", application.getName()));
- cloneRepository(application.getGitUri(), remoteName, destination, monitor);
+ EGitUIUtils.ensureEgitUIIsStarted();
+ if (addToRepoView) {
+ EGitUtils.cloneRepository(
+ application.getGitUri(), remoteName, destination, EGitUIUtils.ADD_TO_REPOVIEW_TASK, monitor);
+ } else {
+ EGitUtils.cloneRepository(
+ application.getGitUri(), remoteName, destination, monitor);
+ }
return destination;
}
- private void cloneRepository(String uri, String remoteName, File destination, IProgressMonitor monitor)
- throws OpenShiftException, URISyntaxException, InvocationTargetException, InterruptedException {
- ensureEgitUIIsStarted();
- URIish gitUri = new URIish(uri);
- CloneOperation cloneOperation =
- new CloneOperation(gitUri, true, null, destination, Constants.HEAD, remoteName, CLONE_TIMEOUT);
- cloneOperation.run(monitor);
- RepositoryUtil repositoryUtil = Activator.getDefault().getRepositoryUtil();
- repositoryUtil.addConfiguredRepository(new File(destination, Constants.DOT_GIT));
- }
-
- /**
- * The EGit UI plugin initializes the ssh factory to present the user a
- * passphrase prompt if the ssh key was not read yet. If this initialization
- * is not executed, the ssh connection to the git repo would just fail with
- * an authentication error. We therefore have to make sure that the EGit UI
- * plugin is started and initializes the JSchConfigSessionFactory.
- * <p>
- * EGit initializes the SshSessionFactory with the EclipseSshSessionFactory.
- * The EclipseSshSessionFactory overrides JschConfigSessionFactory#configure
- * to present a UserInfoPrompter if the key passphrase was not entered
- * before.
- *
- * @see Activator#start(org.osgi.framework.BundleContext)
- * @see Activator#setupSSH
- * @see JschConfigSessionFactory#configure
- * @see EclipseSshSessionFactory#configure
- */
- private void ensureEgitUIIsStarted() {
- Activator.getDefault();
- }
-
protected String getProjectName() {
return projectName;
}
@@ -112,13 +92,17 @@
* the project name
* @return the project with the given name
*/
- protected IProject getProject(String name) {
+ private IProject getProject(String name) {
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
Assert.isTrue(project != null && project.exists(),
NLS.bind("Could not find project {0} in your workspace.", name));
return project;
}
+ protected IProject getProject() {
+ return getProject(getProjectName());
+ }
+
protected IApplication getApplication() {
return application;
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ConfigureGitSharedProject.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ConfigureGitSharedProject.java 2012-01-17 18:19:23 UTC (rev 37905)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ConfigureGitSharedProject.java 2012-01-17 18:25:01 UTC (rev 37906)
@@ -25,6 +25,7 @@
import org.jboss.ide.eclipse.as.core.util.FileUtil;
import org.jboss.tools.openshift.egit.core.EGitUtils;
import org.jboss.tools.openshift.egit.core.GitIgnore;
+import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.utils.FileUtils;
import com.openshift.express.client.IApplication;
@@ -32,6 +33,9 @@
import com.openshift.express.client.OpenShiftException;
/**
+ * Strategy that enables the given git shared project to be used on the chosen
+ * OpenShift application.
+ *
* @author André Dietisheim <adietish(a)redhat.com>
*/
public class ConfigureGitSharedProject extends AbstractImportApplicationOperation {
@@ -43,9 +47,12 @@
/**
* Enables the user chosen project to be used on the chosen OpenShift
- * application. Clones the application git repository, copies the
- * configuration files to the user project (in the workspace), shares the
- * user project with git and creates the server adapter.
+ * application.
+ * <ul>
+ * <li>clones the application git repository</li>
+ * <li>copies the configuration files to the user project (in the workspace)</li>
+ * <li>adds the appication git repo as remote</li>
+ * </ul>
*
* @param monitor
* the monitor to report progress to
@@ -76,17 +83,38 @@
public List<IProject> execute(IProgressMonitor monitor)
throws OpenShiftException, InvocationTargetException, InterruptedException, IOException, CoreException,
URISyntaxException {
- IProject project = getProject(getProjectName());
+ IProject project = getProject();
Assert.isTrue(EGitUtils.isSharedWithGit(project));
File tmpFolder = FileUtils.getRandomTmpFolder();
- File repositoryFile = cloneRepository(getApplication(), getRemoteName(), tmpFolder, monitor);
+ File repositoryFile = cloneRepository(getApplication(), getRemoteName(), tmpFolder, false, monitor);
+
copyOpenshiftConfigurations(repositoryFile, project, monitor);
FileUtil.safeDelete(tmpFolder);
+ setupGitIgnore(project);
+
+ EGitUtils.addRemoteTo(
+ getRemoteName(),
+ getApplication().getGitUri(),
+ EGitUtils.getRepository(project));
+
+ setupOpenShiftMavenProfile(project);
+
return Collections.singletonList(project);
}
+ private void setupOpenShiftMavenProfile(IProject project) throws CoreException {
+ Assert.isLegal(OpenShiftMavenProfile.isMavenProject(project));
+
+ OpenShiftMavenProfile profile = new OpenShiftMavenProfile(project, OpenShiftUIActivator.PLUGIN_ID);
+ if (profile.existsInPom()) {
+ return;
+ }
+ profile.addToPom(project.getName());
+ profile.savePom();
+ }
+
/**
* Copies the openshift configuration from the given source folder to the
* given project. Copies
@@ -110,27 +138,21 @@
Assert.isLegal(project != null);
File projectFolder = project.getLocation().toFile();
monitor.subTask(NLS.bind("Copying openshift configuration to project {0}...", project.getName()));
-
+
FileUtils.copy(new File(sourceFolder, ".openshift"), projectFolder, false);
FileUtils.copy(new File(sourceFolder, "deployments"), projectFolder, false);
-
- createGitIgnore(project);
}
/**
- * Creates the git ignore file with a predefined set of entries. An existing
- * .gitignore file is not overwritten, we then just dont do anything.
+ * Adds a predefined set of entries to the gitignore file in (root of) the
+ * given project. If no .gitignore exists yet, a fresh one is created.
*
- * @param projectFolder
+ * @param project
+ * the project to which the .gitignore shall be configured
* @throws IOException
*/
- private void createGitIgnore(IProject project) throws IOException {
+ private void setupGitIgnore(IProject project) throws IOException {
GitIgnore gitIgnore = new GitIgnore(project);
- // TODO: merge existing .gitignore
- // (https://issues.jboss.org/browse/JBIDE-10391)
- if (gitIgnore.exists()) {
- return;
- }
gitIgnore.add("target")
.add(".settings")
.add(".project")
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ConfigureUnsharedProject.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ConfigureUnsharedProject.java 2012-01-17 18:19:23 UTC (rev 37905)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ConfigureUnsharedProject.java 2012-01-17 18:25:01 UTC (rev 37906)
@@ -32,6 +32,9 @@
import com.openshift.express.client.OpenShiftException;
/**
+ * Strategy that enables the given git shared project to be used on the chosen
+ * OpenShift application.
+ *
* @author André Dietisheim <adietish(a)redhat.com>
*/
public class ConfigureUnsharedProject extends AbstractImportApplicationOperation {
@@ -43,9 +46,12 @@
/**
* Enables the user chosen project to be used on the chosen OpenShift
- * application. Clones the application git repository, copies the
- * configuration files to the user project (in the workspace), shares the
- * user project with git and creates the server adapter.
+ * application. *
+ * <ul>
+ * <li>clones the application git repository</li>
+ * <li>copies the configuration files to the user project (in the workspace)</li>
+ * <li>shares the given project with git</li>
+ * </ul>
*
* @param monitor
* the monitor to report progress to
@@ -84,11 +90,15 @@
// model.mergeWithApplicationRepository(repository,
// monitor);
File tmpFolder = FileUtils.getRandomTmpFolder();
- File repositoryFile = cloneRepository(getApplication(), getRemoteName(), tmpFolder, monitor);
- IProject project = getProject(getProjectName());
+ IProject project = getProject();
+
+ File repositoryFile = cloneRepository(getApplication(), getRemoteName(), tmpFolder, false, monitor);
+
copyOpenshiftConfigurations(repositoryFile, project, monitor);
FileUtil.safeDelete(tmpFolder);
+ createGitIgnore(project);
+
shareProject(project, monitor);
return Collections.singletonList(project);
}
@@ -126,23 +136,18 @@
FileUtils.copy(new File(sourceFolder, ".openshift"), projectFolder, false);
FileUtils.copy(new File(sourceFolder, "deployments"), projectFolder, false);
FileUtils.copy(new File(sourceFolder, "pom.xml"), projectFolder, false);
- createGitIgnore(projectFolder);
}
/**
- * Creates the git ignore file with a predefined set of entries. An existing
- * .gitignore file is not overwritten, we then just dont do anything.
+ * Adds a predefined set of entries to the gitignore file in (root of) the
+ * given project. If no .gitignore exists yet, a fresh one is created.
*
- * @param projectFolder
+ * @param project
+ * the project to which the .gitignore shall be configured
* @throws IOException
*/
- private void createGitIgnore(File projectFolder) throws IOException {
- GitIgnore gitIgnore = new GitIgnore(projectFolder);
- // TODO: merge existing .gitignore
- // (https://issues.jboss.org/browse/JBIDE-10391)
- if (gitIgnore.exists()) {
- return;
- }
+ private void createGitIgnore(IProject project) throws IOException {
+ GitIgnore gitIgnore = new GitIgnore(project);
gitIgnore.add("target")
.add(".settings")
.add(".project")
@@ -151,12 +156,15 @@
gitIgnore.write(false);
}
-// private void mergeWithApplicationRepository(Repository repository, IApplication application,
-// IProgressMonitor monitor)
-// throws MalformedURLException, URISyntaxException, IOException, OpenShiftException, CoreException,
-// InvocationTargetException {
-// URIish uri = new URIish(application.getGitUri());
-// EGitUtils.addRemoteTo("openshift", uri, repository);
-// EGitUtils.mergeWithRemote(uri, "refs/remotes/openshift/HEAD", repository, monitor);
-// }
+ // private void mergeWithApplicationRepository(Repository repository,
+ // IApplication application,
+ // IProgressMonitor monitor)
+ // throws MalformedURLException, URISyntaxException, IOException,
+ // OpenShiftException, CoreException,
+ // InvocationTargetException {
+ // URIish uri = new URIish(application.getGitUri());
+ // EGitUtils.addRemoteTo("openshift", uri, repository);
+ // EGitUtils.mergeWithRemote(uri, "refs/remotes/openshift/HEAD", repository,
+ // monitor);
+ // }
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ImportNewProject.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ImportNewProject.java 2012-01-17 18:19:23 UTC (rev 37905)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ImportNewProject.java 2012-01-17 18:25:01 UTC (rev 37906)
@@ -68,7 +68,7 @@
}
File repositoryFolder =
- cloneRepository(getApplication(), getRemoteName(), cloneDestination, monitor);
+ cloneRepository(getApplication(), getRemoteName(), cloneDestination, true, monitor);
List<IProject> importedProjects = importProjectsFrom(repositoryFolder, monitor);
if (importedProjects.size() == 0) {
throw new ImportFailedException(
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ImportProjectWizard.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ImportProjectWizard.java 2012-01-17 18:19:23 UTC (rev 37905)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ImportProjectWizard.java 2012-01-17 18:25:01 UTC (rev 37906)
@@ -75,19 +75,16 @@
}
}
- private boolean askForConfirmation(final String applicationName, final String projectName) {
+ private boolean askForConfirmation(final String message, final String applicationName) {
final boolean[] confirmed = new boolean[1];
getShell().getDisplay().syncExec(new Runnable() {
@Override
public void run() {
- confirmed[0] = MessageDialog.openConfirm(getShell(),
+ confirmed[0] = MessageDialog.openConfirm(
+ getShell(),
NLS.bind("Import OpenShift Application ", applicationName),
- NLS.bind(
- "OpenShift application {0} will be enabled on project {1} by copying OpenShift " +
- "configuration and enable Git for the project.\n " +
- "This cannot be undone. Do you wish to continue ?", applicationName,
- projectName));
+ message);
}
});
return confirmed[0];
@@ -133,11 +130,26 @@
if (model.isNewProject()) {
model.importProject(delegatingMonitor);
+ } else if (!model.isGitSharedProject()) {
+ if (!askForConfirmation(
+ NLS.bind("OpenShift application {0} will be enabled on project {1} by " +
+ "copying OpenShift configuration and enabling Git for the project.\n " +
+ "This cannot be undone. Do you wish to continue ?",
+ model.getApplicationName(), model.getProjectName()),
+ model.getApplicationName())) {
+ return Status.CANCEL_STATUS;
+ }
+ model.configureUnsharedProject(delegatingMonitor);
} else {
- if (!askForConfirmation(model.getApplicationName(), model.getProjectName())) {
+ if (!askForConfirmation(
+ NLS.bind("OpenShift application {0} will be enabled on project {1} by copying OpenShift " +
+ "configuration and adding the OpenShift git repo as remote.\n " +
+ "This cannot be undone. Do you wish to continue ?",
+ model.getApplicationName(), model.getProjectName()),
+ model.getApplicationName())) {
return Status.CANCEL_STATUS;
}
- model.addToExistingProject(delegatingMonitor);
+ model.configureGitSharedProject(delegatingMonitor);
}
return Status.OK_STATUS;
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ImportProjectWizardModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ImportProjectWizardModel.java 2012-01-17 18:19:23 UTC (rev 37905)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ImportProjectWizardModel.java 2012-01-17 18:25:01 UTC (rev 37906)
@@ -18,12 +18,14 @@
import java.util.List;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.wst.server.core.IRuntime;
import org.eclipse.wst.server.core.IServerType;
import org.jboss.tools.common.ui.databinding.ObservableUIPojo;
+import org.jboss.tools.openshift.egit.core.EGitUtils;
import org.jboss.tools.openshift.express.internal.ui.wizard.AdapterWizardPageModel;
import com.openshift.express.client.IApplication;
@@ -74,8 +76,8 @@
}
/**
- * Enables the user chosen project to be used on the chosen OpenShift
- * application. Clones the application git repository, copies the
+ * Enables the user chosen, unshared project to be used on the chosen
+ * OpenShift application. Clones the application git repository, copies the
* configuration files to the user project (in the workspace), shares the
* user project with git and creates the server adapter.
*
@@ -98,7 +100,7 @@
* @throws CoreException
* The user project could not be shared with the git
*/
- public void addToExistingProject(IProgressMonitor monitor)
+ public void configureUnsharedProject(IProgressMonitor monitor)
throws OpenShiftException, InvocationTargetException, InterruptedException, IOException, CoreException,
URISyntaxException {
List<IProject> importedProjects = new ConfigureUnsharedProject(
@@ -110,6 +112,43 @@
createServerAdapter(monitor, importedProjects);
}
+ /**
+ * Enables the user chosen, unshared project to be used on the chosen
+ * OpenShift application. Clones the application git repository, copies the
+ * configuration files to the user project (in the workspace), adds the
+ * appication git repo as remote and creates the server adapter.
+ *
+ * @param monitor
+ * the monitor to report progress to
+ * @throws URISyntaxException
+ * The OpenShift application repository could not be cloned,
+ * because the uri it is located at is not a valid git uri
+ * @throws OpenShiftException
+ *
+ * @throws InvocationTargetException
+ * The OpenShift application repository could not be cloned, the
+ * clone operation failed.
+ * @throws InterruptedException
+ * The OpenShift application repository could not be cloned, the
+ * clone operation was interrupted.
+ * @throws IOException
+ * The configuration files could not be copied from the git
+ * clone to the user project
+ * @throws CoreException
+ * The user project could not be shared with the git
+ */
+ public void configureGitSharedProject(IProgressMonitor monitor)
+ throws OpenShiftException, InvocationTargetException, InterruptedException, IOException, CoreException,
+ URISyntaxException {
+ List<IProject> importedProjects = new ConfigureGitSharedProject(
+ getProjectName()
+ , getApplication()
+ , getRemoteName()
+ , getUser())
+ .execute(monitor);
+ createServerAdapter(monitor, importedProjects);
+ }
+
private void createServerAdapter(IProgressMonitor monitor, List<IProject> importedProjects)
throws OpenShiftException {
Assert.isTrue(importedProjects.size() > 0);
@@ -201,6 +240,14 @@
return (Boolean) getProperty(NEW_PROJECT);
}
+ public boolean isGitSharedProject() {
+ return EGitUtils.isSharedWithGit(getProject());
+ }
+
+ private IProject getProject() {
+ return ResourcesPlugin.getWorkspace().getRoot().getProject(getProjectName());
+ }
+
public Boolean setNewProject(boolean newProject) {
return (Boolean) setProperty(NEW_PROJECT, newProject);
}
12 years, 12 months
JBoss Tools SVN: r37905 - trunk/central/plugins/org.jboss.tools.central/icons.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-01-17 13:19:23 -0500 (Tue, 17 Jan 2012)
New Revision: 37905
Added:
trunk/central/plugins/org.jboss.tools.central/icons/new-gdt-project.png
Log:
JBIDE-10627 Add new GDT project icon
Added: trunk/central/plugins/org.jboss.tools.central/icons/new-gdt-project.png
===================================================================
(Binary files differ)
Property changes on: trunk/central/plugins/org.jboss.tools.central/icons/new-gdt-project.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
12 years, 12 months
JBoss Tools SVN: r37904 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-01-17 13:11:41 -0500 (Tue, 17 Jan 2012)
New Revision: 37904
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/OpenShiftMavenProfile.java
Log:
[JBIDE-10479] corrected writing to the pom (using IFile#setContent now)
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/OpenShiftMavenProfile.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/OpenShiftMavenProfile.java 2012-01-17 17:59:17 UTC (rev 37903)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/OpenShiftMavenProfile.java 2012-01-17 18:11:41 UTC (rev 37904)
@@ -11,11 +11,8 @@
package org.jboss.tools.openshift.express.internal.ui.wizard.appimport;
import java.io.ByteArrayInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.io.UnsupportedEncodingException;
+import java.io.StringWriter;
import java.io.Writer;
import java.text.MessageFormat;
@@ -23,7 +20,6 @@
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Result;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;
@@ -34,6 +30,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
@@ -278,17 +275,13 @@
public void savePom() throws CoreException {
Writer writer = null;
try {
- writer = new OutputStreamWriter(new FileOutputStream(pomFile.getLocation().toString()), "UTF-8");
- Result out = new StreamResult(writer);
- createTransformer().transform(new DOMSource(getDocument()), out);
+ writer = new StringWriter();
+ createTransformer().transform(new DOMSource(getDocument()), new StreamResult(writer));
+ pomFile.setContents(new ByteArrayInputStream(writer.toString().getBytes()), IResource.FORCE, null);
} catch (TransformerConfigurationException e) {
throw new CoreException(createStatus(e));
- } catch (UnsupportedEncodingException e) {
- throw new CoreException(createStatus(e));
} catch (TransformerException e) {
throw new CoreException(createStatus(e));
- } catch (FileNotFoundException e) {
- throw new CoreException(createStatus(e));
} finally {
safeClose(writer);
}
12 years, 12 months