JBoss Tools SVN: r10032 - trunk/ws/docs/reference/en/images.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2008-09-02 10:35:53 -0400 (Tue, 02 Sep 2008)
New Revision: 10032
Modified:
trunk/ws/docs/reference/en/images/jbossws_bottomup_5.png
trunk/ws/docs/reference/en/images/jbossws_bottomup_6.png
Log:
resized
Modified: trunk/ws/docs/reference/en/images/jbossws_bottomup_5.png
===================================================================
(Binary files differ)
Modified: trunk/ws/docs/reference/en/images/jbossws_bottomup_6.png
===================================================================
(Binary files differ)
16 years, 6 months
JBoss Tools SVN: r10031 - trunk/common/plugins.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-09-02 09:58:57 -0400 (Tue, 02 Sep 2008)
New Revision: 10031
Added:
trunk/common/plugins/org.jboss.tools.common.resref/
Removed:
trunk/common/plugins/org.jboss.tools.common.rreferences/
Log:
Renamed remotely
Copied: trunk/common/plugins/org.jboss.tools.common.resref (from rev 10030, trunk/common/plugins/org.jboss.tools.common.rreferences)
16 years, 6 months
JBoss Tools SVN: r10030 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.myfaces/src/org/jboss/tools/jsf/vpe/myfaces/template.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-09-02 09:56:31 -0400 (Tue, 02 Sep 2008)
New Revision: 10030
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.myfaces/src/org/jboss/tools/jsf/vpe/myfaces/template/VpeMyFacesDataScrollerTemplate.java
Log:
code adjustment
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.myfaces/src/org/jboss/tools/jsf/vpe/myfaces/template/VpeMyFacesDataScrollerTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.myfaces/src/org/jboss/tools/jsf/vpe/myfaces/template/VpeMyFacesDataScrollerTemplate.java 2008-09-02 12:29:11 UTC (rev 10029)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.myfaces/src/org/jboss/tools/jsf/vpe/myfaces/template/VpeMyFacesDataScrollerTemplate.java 2008-09-02 13:56:31 UTC (rev 10030)
@@ -157,16 +157,6 @@
return null;
}
- /* (non-Javadoc)
- * @see org.jboss.tools.vpe.editor.template.VpeTemplate#getTagDescription(org.jboss.tools.vpe.editor.context.VpePageContext, org.w3c.dom.Element, org.mozilla.interfaces.nsIDOMDocument, org.mozilla.interfaces.nsIDOMElement, java.lang.Object)
- */
- @Override
- public VpeTagDescription getTagDescription(VpePageContext pageContext,
- Element sourceElement, nsIDOMDocument visualDocument,
- nsIDOMElement visualElement, Object data) {
- // TODO Auto-generated method stub
- return null;
- }
/* (non-Javadoc)
* @see org.jboss.tools.vpe.editor.template.VpeTemplate#isRecreateAtAttrChange(org.jboss.tools.vpe.editor.context.VpePageContext, org.w3c.dom.Element, org.mozilla.interfaces.nsIDOMDocument, org.mozilla.interfaces.nsIDOMElement, java.lang.Object, java.lang.String, java.lang.String)
@@ -190,17 +180,6 @@
}
- /* (non-Javadoc)
- * @see org.jboss.tools.vpe.editor.template.VpeTemplate#resize(org.jboss.tools.vpe.editor.context.VpePageContext, org.w3c.dom.Element, org.mozilla.interfaces.nsIDOMDocument, org.mozilla.interfaces.nsIDOMElement, java.lang.Object, int, int, int, int, int)
- */
- @Override
- public void resize(VpePageContext pageContext, Element sourceElement,
- nsIDOMDocument visualDocument, nsIDOMElement visualElement,
- Object data, int resizerConstrains, int top, int left, int width,
- int height) {
- // TODO Auto-generated method stub
-
- }
/* (non-Javadoc)
* @see org.jboss.tools.vpe.editor.template.VpeTemplate#setAttribute(org.jboss.tools.vpe.editor.context.VpePageContext, org.w3c.dom.Element, org.mozilla.interfaces.nsIDOMDocument, org.mozilla.interfaces.nsIDOMNode, java.lang.Object, java.lang.String, java.lang.String)
16 years, 6 months
JBoss Tools SVN: r10029 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-09-02 08:29:11 -0400 (Tue, 02 Sep 2008)
New Revision: 10029
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfRadioSelectItemTemplate.java
Log:
Fix bug jbide-2536
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfRadioSelectItemTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfRadioSelectItemTemplate.java 2008-09-02 12:29:07 UTC (rev 10028)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfRadioSelectItemTemplate.java 2008-09-02 12:29:11 UTC (rev 10029)
@@ -13,6 +13,7 @@
import org.eclipse.wst.xml.core.internal.document.ElementImpl;
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.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
@@ -142,9 +143,13 @@
// get parent element
Node parent = sourceNode.getParentNode();
+
+ if ((parent == null) && (sourceNode instanceof Element)
+ && (((Element) sourceNode).getAttribute(VpeVisualDomBuilder.PARENT) != null)) {
+ parent = (Node) ((Element) sourceNode).getAttributeNode(VpeVisualDomBuilder.PARENT).getUserData(VpeVisualDomBuilder.PARENT);
+ }
+ if ((parent != null) && (parent.getNodeType() == Node.ELEMENT_NODE)) {
- if (parent.getNodeType() == Node.ELEMENT_NODE) {
-
ElementImpl element = (ElementImpl) parent;
// get start position of parent
16 years, 6 months
JBoss Tools SVN: r10028 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-09-02 08:29:07 -0400 (Tue, 02 Sep 2008)
New Revision: 10028
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
Log:
Fix bug jbide-2536
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2008-09-02 12:21:12 UTC (rev 10027)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2008-09-02 12:29:07 UTC (rev 10028)
@@ -97,7 +97,11 @@
public class VpeVisualDomBuilder extends VpeDomBuilder {
- public static final String VPE_USER_TOGGLE_ID = "vpe-user-toggle-id"; //$NON-NLS-1$
+ /**
+ *
+ */
+ public static final String PARENT = "PARENT"; //$NON-NLS-1$
+ public static final String VPE_USER_TOGGLE_ID = "vpe-user-toggle-id"; //$NON-NLS-1$
public static final String VPE_USER_TOGGLE_LOOKUP_PARENT = "vpe-user-toggle-lookup-parent"; //$NON-NLS-1$
/** REGEX_EL */
@@ -440,7 +444,12 @@
if (ElService.getInstance().isCloneableNode(getPageContext(),
sourceNode)) {
sourceNodeClone = (sourceNode).cloneNode(true);
-
+ if(sourceNodeClone instanceof Element){
+ ((Element)sourceNodeClone).setAttribute(PARENT,"");
+ Attr a = ((Element)sourceNodeClone).getAttributeNode(PARENT);
+ a.setUserData(PARENT, sourceNode.getParentNode(),null);
+
+ }
template.beforeTemplateCreated(getPageContext(),
sourceNodeClone, getVisualDocument());
creationData = template.create(getPageContext(),
16 years, 6 months
JBoss Tools SVN: r10027 - trunk/ws/docs/reference/en/images.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2008-09-02 08:21:12 -0400 (Tue, 02 Sep 2008)
New Revision: 10027
Modified:
trunk/ws/docs/reference/en/images/jbossws_bottomup.png
Log:
resized
Modified: trunk/ws/docs/reference/en/images/jbossws_bottomup.png
===================================================================
(Binary files differ)
16 years, 6 months
JBoss Tools SVN: r10026 - trunk/vpe/plugins/org.jboss.tools.vpe/resources/meta.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-09-02 07:42:53 -0400 (Tue, 02 Sep 2008)
New Revision: 10026
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/resources/meta/vpe.meta
Log:
Moved resources reference functionality to the separate bundle.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/resources/meta/vpe.meta
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/resources/meta/vpe.meta 2008-09-02 11:30:00 UTC (rev 10025)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/resources/meta/vpe.meta 2008-09-02 11:42:53 UTC (rev 10026)
@@ -35,7 +35,7 @@
<XActionItem kind="list">
<XActionItem kind="list" name="CreateActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.rreferences.core.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.common.resref.core.VpeAddReferenceSupport"
displayName="Add CSS Reference..." kind="action" name="AddItem">
<EntityData EntityName="VPECSSReference">
<AttributeData AttributeName="location"/>
@@ -45,7 +45,7 @@
</XActionItem>
<XActionItem kind="list" name="EditActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.rreferences.core.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.common.resref.core.VpeAddReferenceSupport"
displayName="Edit CSS Reference..." kind="action" name="EditItem">
<EntityData EntityName="VPECSSReference">
<AttributeData AttributeName="location"/>
@@ -85,7 +85,7 @@
<XActionItem kind="list">
<XActionItem kind="list" name="CreateActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.rreferences.core.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.common.resref.core.VpeAddReferenceSupport"
displayName="Add CSS Reference..." kind="action" name="AddItem">
<EntityData EntityName="VPECSSReferenceExt">
<AttributeData AttributeName="location"/>
@@ -95,7 +95,7 @@
</XActionItem>
<XActionItem kind="list" name="EditActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.rreferences.core.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.common.resref.core.VpeAddReferenceSupport"
displayName="Edit CSS Reference..." kind="action" name="EditItem">
<EntityData EntityName="VPECSSReferenceExt">
<AttributeData AttributeName="location"/>
@@ -138,7 +138,7 @@
<XActionItem kind="list">
<XActionItem kind="list" name="CreateActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.rreferences.core.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.common.resref.core.VpeAddReferenceSupport"
displayName="Add El Reference..." kind="action" name="AddItem">
<EntityData EntityName="VPEElReference">
<AttributeData AttributeName="location" Mandatory="no"/>
@@ -149,7 +149,7 @@
</XActionItem>
<XActionItem kind="list" name="EditActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.rreferences.core.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.common.resref.core.VpeAddReferenceSupport"
displayName="Edit El Reference..." kind="action" name="EditItem">
<EntityData EntityName="VPEElReference">
<AttributeData AttributeName="location"/>
@@ -192,7 +192,7 @@
<XActionItem kind="list">
<XActionItem kind="list" name="CreateActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.rreferences.core.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.common.resref.core.VpeAddReferenceSupport"
displayName="Add El Reference..." kind="action" name="AddItem">
<EntityData EntityName="VPEELReferenceExt">
<AttributeData AttributeName="location"/>
@@ -203,7 +203,7 @@
</XActionItem>
<XActionItem kind="list" name="EditActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.rreferences.core.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.common.resref.core.VpeAddReferenceSupport"
displayName="Edit El Reference..." kind="action" name="EditItem">
<EntityData EntityName="VPEElReference">
<AttributeData AttributeName="location"/>
@@ -244,7 +244,7 @@
<XActionItem kind="list">
<XActionItem kind="list" name="CreateActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.rreferences.core.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.common.resref.core.VpeAddReferenceSupport"
displayName="Add El Reference..." kind="action" name="AddItem">
<EntityData EntityName="VPEGlobalElReference">
<AttributeData AttributeName="location" Mandatory="no"/>
@@ -255,7 +255,7 @@
</XActionItem>
<XActionItem kind="list" name="EditActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.rreferences.core.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.common.resref.core.VpeAddReferenceSupport"
displayName="Edit El Reference..." kind="action" name="EditItem">
<EntityData EntityName="VPEGlobalElReference">
<AttributeData AttributeName="location"/>
@@ -297,7 +297,7 @@
<XActionItem kind="list">
<XActionItem kind="list" name="CreateActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.rreferences.core.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.common.resref.core.VpeAddReferenceSupport"
displayName="Add El Reference..." kind="action" name="AddItem">
<EntityData EntityName="VPEGlobalElReferenceExt">
<AttributeData AttributeName="location"/>
@@ -308,7 +308,7 @@
</XActionItem>
<XActionItem kind="list" name="EditActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.rreferences.core.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.common.resref.core.VpeAddReferenceSupport"
displayName="Edit El Reference..." kind="action" name="EditItem">
<EntityData EntityName="VPEGlobalElReferenceExt">
<AttributeData AttributeName="location"/>
@@ -411,7 +411,7 @@
<XActionItem kind="list">
<XActionItem kind="list" name="CreateActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.rreferences.core.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.common.resref.core.VpeAddReferenceSupport"
displayName="Add CSS Reference..." kind="action" name="AddItem">
<EntityData EntityName="VPEImageReference">
<AttributeData AttributeName="location"/>
@@ -421,7 +421,7 @@
</XActionItem>
<XActionItem kind="list" name="EditActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.rreferences.core.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.common.resref.core.VpeAddReferenceSupport"
displayName="Edit CSS Reference..." kind="action" name="EditItem">
<EntityData EntityName="VPEImageReference">
<AttributeData AttributeName="location"/>
@@ -460,7 +460,7 @@
<XActionItem kind="list">
<XActionItem kind="list" name="CreateActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.rreferences.core.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.common.resref.core.VpeAddReferenceSupport"
displayName="Add CSS Reference..." kind="action" name="AddItem">
<EntityData EntityName="VPEImageReferenceExt">
<AttributeData AttributeName="location"/>
@@ -470,7 +470,7 @@
</XActionItem>
<XActionItem kind="list" name="EditActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.rreferences.core.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.common.resref.core.VpeAddReferenceSupport"
displayName="Edit CSS Reference..." kind="action" name="EditItem">
<EntityData EntityName="VPEImageReferenceExt">
<AttributeData AttributeName="location"/>
@@ -510,7 +510,7 @@
<XActionItem kind="list">
<XActionItem kind="list" name="CreateActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.rreferences.core.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.common.resref.core.VpeAddReferenceSupport"
displayName="Add Taglib Reference..." kind="action" name="AddItem">
<EntityData EntityName="VPETLDReference">
<AttributeData AttributeName="location"/>
@@ -521,7 +521,7 @@
</XActionItem>
<XActionItem kind="list" name="EditActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.rreferences.core.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.common.resref.core.VpeAddReferenceSupport"
displayName="Edit Taglib Reference..." kind="action" name="EditItem">
<EntityData EntityName="VPETLDReference">
<AttributeData AttributeName="location"/>
@@ -561,7 +561,7 @@
<XActionItem kind="list">
<XActionItem kind="list" name="CreateActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.rreferences.core.VpeAddReferenceSupport"
+ PROPERTIES="support=org.jboss.tools.common.resref.core.VpeAddReferenceSupport"
displayName="Add TLD Reference..." kind="action" name="AddItem">
<EntityData EntityName="VPETLDReferenceExt">
<AttributeData AttributeName="location"/>
@@ -572,7 +572,7 @@
</XActionItem>
<XActionItem kind="list" name="EditActions">
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
- PROPERTIES="support=org.jboss.tools.rreferences.core.VpeAddReferencceSupport"
+ PROPERTIES="support=org.jboss.tools.common.resref.core.VpeAddReferencceSupport"
displayName="Edit TLD Reference..." kind="action" name="EditItem">
<EntityData EntityName="VPETLDReferenceExt">
<AttributeData AttributeName="location"/>
16 years, 6 months
JBoss Tools SVN: r10025 - in trunk/vpe/plugins/org.jboss.tools.vpe: META-INF and 8 other directories.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-09-02 07:30:00 -0400 (Tue, 02 Sep 2008)
New Revision: 10025
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/resref/
Removed:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/el/
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/rreferences/
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF
trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/context/VpePageContext.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/ELVariablesPreferencePage.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionSrc.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/resref/VpeResourcesDialog.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/resref/VpeResourcesDialogView.java
Log:
Moved resources reference functionality to the separate bundle.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF 2008-09-02 11:27:06 UTC (rev 10024)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF 2008-09-02 11:30:00 UTC (rev 10025)
@@ -37,7 +37,7 @@
org.jboss.tools.vpe.el,
org.jboss.tools.vpe.el.messages,
org.jboss.tools.vpe.messages,
- org.jboss.tools.vpe.rreferences,
+ org.jboss.tools.vpe.resref,
org.jboss.tools.vpe.selbar
Require-Bundle: org.jboss.tools.common.model.ui,
org.eclipse.jface.text,
@@ -73,7 +73,7 @@
org.mozilla.xpcom,
org.eclipse.draw2d,
org.jboss.tools.jst.web,
- org.jboss.tools.common.rreferences,
+ org.jboss.tools.common.resref,
org.jboss.tools.common.el
Bundle-Version: 2.1.0
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml 2008-09-02 11:27:06 UTC (rev 10024)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml 2008-09-02 11:30:00 UTC (rev 10025)
@@ -28,8 +28,8 @@
/>
</extension>
<extension point="org.jboss.tools.common.model.classes">
- <xclass id="org.jboss.tools.common.rreferences.core.VpeAddReferenceSupport"
- class="org.jboss.tools.common.rreferences.core.VpeAddReferenceSupport"/>
+ <xclass id="org.jboss.tools.common.resref.core.VpeAddReferenceSupport"
+ class="org.jboss.tools.common.resref.core.VpeAddReferenceSupport"/>
</extension>
<extension point="org.eclipse.ui.preferencePages">
<page category="org.jboss.tools.common.xstudio.editors" class="org.jboss.tools.vpe.editor.preferences.VpeEditorPreferencesPage" id="org.jboss.tools.vpe.editor" name="Visual Page Editor"></page>
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2008-09-02 11:27:06 UTC (rev 10024)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2008-09-02 11:30:00 UTC (rev 10025)
@@ -107,11 +107,11 @@
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.common.model.util.ModelFeatureFactory;
import org.jboss.tools.common.model.util.XModelTreeListenerSWTSync;
-import org.jboss.tools.common.rreferences.core.AbsoluteFolderReferenceList;
-import org.jboss.tools.common.rreferences.core.CSSReferenceList;
-import org.jboss.tools.common.rreferences.core.RelativeFolderReferenceList;
-import org.jboss.tools.common.rreferences.core.ResourceReferenceListListener;
-import org.jboss.tools.common.rreferences.core.TaglibReferenceList;
+import org.jboss.tools.common.resref.core.AbsoluteFolderReferenceList;
+import org.jboss.tools.common.resref.core.CSSReferenceList;
+import org.jboss.tools.common.resref.core.RelativeFolderReferenceList;
+import org.jboss.tools.common.resref.core.ResourceReferenceListListener;
+import org.jboss.tools.common.resref.core.TaglibReferenceList;
import org.jboss.tools.jst.jsp.editor.IJSPTextEditor;
import org.jboss.tools.jst.jsp.editor.IVisualController;
import org.jboss.tools.jst.jsp.preferences.VpePreference;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2008-09-02 11:27:06 UTC (rev 10024)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2008-09-02 11:30:00 UTC (rev 10025)
@@ -43,8 +43,8 @@
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.project.IModelNature;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
-import org.jboss.tools.common.rreferences.core.CSSReferenceList;
-import org.jboss.tools.common.rreferences.core.ResourceReference;
+import org.jboss.tools.common.resref.core.CSSReferenceList;
+import org.jboss.tools.common.resref.core.ResourceReference;
import org.jboss.tools.jst.jsp.preferences.VpePreference;
import org.jboss.tools.jst.web.model.helpers.WebAppHelper;
import org.jboss.tools.vpe.VpeDebug;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/context/VpePageContext.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/context/VpePageContext.java 2008-09-02 11:27:06 UTC (rev 10024)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/context/VpePageContext.java 2008-09-02 11:30:00 UTC (rev 10025)
@@ -29,11 +29,11 @@
import org.jboss.tools.common.kb.KbConnectorType;
import org.jboss.tools.common.kb.KbException;
import org.jboss.tools.common.kb.wtp.WtpKbConnector;
-import org.jboss.tools.common.rreferences.core.AbsoluteFolderReferenceList;
-import org.jboss.tools.common.rreferences.core.CSSReferenceList;
-import org.jboss.tools.common.rreferences.core.RelativeFolderReferenceList;
-import org.jboss.tools.common.rreferences.core.ResourceReference;
-import org.jboss.tools.common.rreferences.core.TaglibReferenceList;
+import org.jboss.tools.common.resref.core.AbsoluteFolderReferenceList;
+import org.jboss.tools.common.resref.core.CSSReferenceList;
+import org.jboss.tools.common.resref.core.RelativeFolderReferenceList;
+import org.jboss.tools.common.resref.core.ResourceReference;
+import org.jboss.tools.common.resref.core.TaglibReferenceList;
import org.jboss.tools.jst.jsp.editor.IVisualContext;
import org.jboss.tools.jst.jsp.preferences.VpePreference;
import org.jboss.tools.jst.web.tld.TaglibData;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2008-09-02 11:27:06 UTC (rev 10024)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2008-09-02 11:30:00 UTC (rev 10025)
@@ -58,7 +58,7 @@
import org.jboss.tools.vpe.editor.util.DocTypeUtil;
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.messages.VpeUIMessages;
-import org.jboss.tools.vpe.rreferences.VpeResourcesDialog;
+import org.jboss.tools.vpe.resref.VpeResourcesDialog;
import org.jboss.tools.vpe.xulrunner.XPCOM;
import org.jboss.tools.vpe.xulrunner.XulRunnerException;
import org.jboss.tools.vpe.xulrunner.editor.XulRunnerEditor;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/ELVariablesPreferencePage.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/ELVariablesPreferencePage.java 2008-09-02 11:27:06 UTC (rev 10024)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/ELVariablesPreferencePage.java 2008-09-02 11:30:00 UTC (rev 10025)
@@ -24,8 +24,8 @@
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.jboss.tools.common.el.global.GlobalElVariablesComposite;
import org.jboss.tools.common.model.options.PreferenceModelUtilities;
-import org.jboss.tools.common.rreferences.core.ResourceReference;
-import org.jboss.tools.vpe.rreferences.VpeResourcesDialog;
+import org.jboss.tools.common.resref.core.ResourceReference;
+import org.jboss.tools.vpe.resref.VpeResourcesDialog;
/**
* Page for the El preferences.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionSrc.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionSrc.java 2008-09-02 11:27:06 UTC (rev 10024)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionSrc.java 2008-09-02 11:30:00 UTC (rev 10025)
@@ -30,7 +30,7 @@
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.common.rreferences.core.ResourceReference;
+import org.jboss.tools.common.resref.core.ResourceReference;
import org.jboss.tools.jst.web.project.WebProject;
import org.jboss.tools.jst.web.tld.IFilePathEncoder;
import org.jboss.tools.vpe.VpePlugin;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java 2008-09-02 11:27:06 UTC (rev 10024)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java 2008-09-02 11:30:00 UTC (rev 10025)
@@ -18,7 +18,7 @@
import org.eclipse.core.runtime.Platform;
import org.jboss.tools.common.el.global.GlobalELReferenceList;
import org.jboss.tools.common.el.vpe.ELReferenceList;
-import org.jboss.tools.common.rreferences.core.ResourceReference;
+import org.jboss.tools.common.resref.core.ResourceReference;
import org.jboss.tools.vpe.editor.bundle.BundleMap;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.w3c.dom.Attr;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java 2008-09-02 11:27:06 UTC (rev 10024)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java 2008-09-02 11:30:00 UTC (rev 10025)
@@ -33,9 +33,9 @@
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.project.IModelNature;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
-import org.jboss.tools.common.rreferences.core.AbsoluteFolderReferenceList;
-import org.jboss.tools.common.rreferences.core.RelativeFolderReferenceList;
-import org.jboss.tools.common.rreferences.core.ResourceReference;
+import org.jboss.tools.common.resref.core.AbsoluteFolderReferenceList;
+import org.jboss.tools.common.resref.core.RelativeFolderReferenceList;
+import org.jboss.tools.common.resref.core.ResourceReference;
import org.jboss.tools.vpe.VpePlugin;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2008-09-02 11:27:06 UTC (rev 10024)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2008-09-02 11:30:00 UTC (rev 10025)
@@ -25,7 +25,7 @@
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.common.rreferences.core.ResourceReference;
+import org.jboss.tools.common.resref.core.ResourceReference;
import org.jboss.tools.jst.web.project.WebProject;
import org.jboss.tools.vpe.VpePlugin;
import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
Copied: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/resref (from rev 10019, trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/rreferences)
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/resref/VpeResourcesDialog.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/rreferences/VpeResourcesDialog.java 2008-09-02 07:18:00 UTC (rev 10019)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/resref/VpeResourcesDialog.java 2008-09-02 11:30:00 UTC (rev 10025)
@@ -8,7 +8,7 @@
* Contributors:
* Exadel, Inc. and Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.vpe.rreferences;
+package org.jboss.tools.vpe.resref;
import java.util.Properties;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/resref/VpeResourcesDialogView.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/rreferences/VpeResourcesDialogView.java 2008-09-02 07:18:00 UTC (rev 10019)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/resref/VpeResourcesDialogView.java 2008-09-02 11:30:00 UTC (rev 10025)
@@ -8,7 +8,7 @@
* Contributors:
* Exadel, Inc. and Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.vpe.rreferences;
+package org.jboss.tools.vpe.resref;
import java.util.Properties;
@@ -22,10 +22,10 @@
import org.eclipse.swt.widgets.Control;
import org.jboss.tools.common.el.vpe.ElVariablesComposite;
import org.jboss.tools.common.model.ui.wizards.query.AbstractQueryWizardView;
-import org.jboss.tools.common.rreferences.core.AbsoluteFolderReferenceComposite;
-import org.jboss.tools.common.rreferences.core.CssReferencesComposite;
-import org.jboss.tools.common.rreferences.core.RelativeFolderReferenceComposite;
-import org.jboss.tools.common.rreferences.core.TaglibReferencesComposite;
+import org.jboss.tools.common.resref.core.AbsoluteFolderReferenceComposite;
+import org.jboss.tools.common.resref.core.CssReferencesComposite;
+import org.jboss.tools.common.resref.core.RelativeFolderReferenceComposite;
+import org.jboss.tools.common.resref.core.TaglibReferencesComposite;
public class VpeResourcesDialogView extends AbstractQueryWizardView {
IFile file;
16 years, 6 months
JBoss Tools SVN: r10024 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test: src/org/jboss/tools/jsf/vpe/jsf/test and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-09-02 07:27:06 -0400 (Tue, 02 Sep 2008)
New Revision: 10024
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/CommonJBIDE2010Test.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2594Test.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2624.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE924Test.java
Log:
Moved resources reference functionality to the separate bundle.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/META-INF/MANIFEST.MF 2008-09-02 11:24:40 UTC (rev 10023)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/META-INF/MANIFEST.MF 2008-09-02 11:27:06 UTC (rev 10024)
@@ -21,8 +21,7 @@
org.jboss.tools.jsf.vpe.jsf,
org.jboss.tools.jst.web,
org.jboss.tools.common.el,
- org.jboss.tools.common.rreferences
-
+ org.jboss.tools.common.resref
Bundle-ClassPath: jsf-test.jar
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/CommonJBIDE2010Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/CommonJBIDE2010Test.java 2008-09-02 11:24:40 UTC (rev 10023)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/CommonJBIDE2010Test.java 2008-09-02 11:27:06 UTC (rev 10024)
@@ -18,7 +18,7 @@
import org.eclipse.core.resources.IFile;
import org.jboss.tools.common.el.vpe.ELReferenceList;
-import org.jboss.tools.common.rreferences.core.ResourceReference;
+import org.jboss.tools.common.resref.core.ResourceReference;
import org.jboss.tools.vpe.ui.test.TestUtil;
import org.jboss.tools.vpe.ui.test.VpeTest;
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2594Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2594Test.java 2008-09-02 11:24:40 UTC (rev 10023)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2594Test.java 2008-09-02 11:27:06 UTC (rev 10024)
@@ -19,7 +19,7 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Platform;
import org.jboss.tools.common.el.global.GlobalELReferenceList;
-import org.jboss.tools.common.rreferences.core.ResourceReference;
+import org.jboss.tools.common.resref.core.ResourceReference;
import org.jboss.tools.jsf.vpe.jsf.test.CommonJBIDE2010Test;
import org.jboss.tools.vpe.editor.util.ElService;
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2624.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2624.java 2008-09-02 11:24:40 UTC (rev 10023)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2624.java 2008-09-02 11:27:06 UTC (rev 10024)
@@ -21,8 +21,8 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.part.FileEditorInput;
-import org.jboss.tools.common.rreferences.core.RelativeFolderReferenceList;
-import org.jboss.tools.common.rreferences.core.ResourceReference;
+import org.jboss.tools.common.resref.core.RelativeFolderReferenceList;
+import org.jboss.tools.common.resref.core.ResourceReference;
import org.jboss.tools.jsf.vpe.jsf.test.JsfAllTests;
import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
import org.jboss.tools.vpe.editor.VpeController;
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE924Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE924Test.java 2008-09-02 11:24:40 UTC (rev 10023)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE924Test.java 2008-09-02 11:27:06 UTC (rev 10024)
@@ -16,8 +16,8 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.part.FileEditorInput;
-import org.jboss.tools.common.rreferences.core.AbsoluteFolderReferenceList;
-import org.jboss.tools.common.rreferences.core.ResourceReference;
+import org.jboss.tools.common.resref.core.AbsoluteFolderReferenceList;
+import org.jboss.tools.common.resref.core.ResourceReference;
import org.jboss.tools.jsf.vpe.jsf.test.JsfAllTests;
import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
import org.jboss.tools.vpe.editor.VpeController;
16 years, 6 months
JBoss Tools SVN: r10023 - in trunk/common/plugins/org.jboss.tools.common.rreferences: META-INF and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-09-02 07:24:40 -0400 (Tue, 02 Sep 2008)
New Revision: 10023
Added:
trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/
trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/Activator.java
trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/
trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/AbsoluteFolderReferenceComposite.java
trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/AbsoluteFolderReferenceList.java
trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/CSSReferenceList.java
trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/CssReferencesComposite.java
trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/FolderReferenceComposite.java
trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/GlobalResourceReference.java
trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/RelativeFolderReferenceComposite.java
trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/RelativeFolderReferenceList.java
trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/ResourceReference.java
trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/ResourceReferenceList.java
trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/ResourceReferenceListListener.java
trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/ResourceReferencesComposite.java
trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/ResourceReferencesDialogView.java
trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/ResourceReferencesTableProvider.java
trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/TaglibReferenceList.java
trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/TaglibReferencesComposite.java
trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/VpeAddReferenceSupport.java
trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/VpeCssReferencesDialog.java
trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/messages/
trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/messages/Messages.java
trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/messages/messages.properties
Removed:
trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/rreferences/
Modified:
trunk/common/plugins/org.jboss.tools.common.rreferences/.project
trunk/common/plugins/org.jboss.tools.common.rreferences/META-INF/MANIFEST.MF
Log:
Modified: trunk/common/plugins/org.jboss.tools.common.rreferences/.project
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.rreferences/.project 2008-09-02 11:22:12 UTC (rev 10022)
+++ trunk/common/plugins/org.jboss.tools.common.rreferences/.project 2008-09-02 11:24:40 UTC (rev 10023)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.jboss.tools.common.rreferences</name>
+ <name>org.jboss.tools.common.resref</name>
<comment></comment>
<projects>
</projects>
Modified: trunk/common/plugins/org.jboss.tools.common.rreferences/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.rreferences/META-INF/MANIFEST.MF 2008-09-02 11:22:12 UTC (rev 10022)
+++ trunk/common/plugins/org.jboss.tools.common.rreferences/META-INF/MANIFEST.MF 2008-09-02 11:24:40 UTC (rev 10023)
@@ -2,17 +2,17 @@
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-Name: Resources to references Plug-in
-Bundle-SymbolicName: org.jboss.tools.common.rreferences;singleton:=true
+Bundle-SymbolicName: org.jboss.tools.common.resref;singleton:=true
Bundle-Version: 2.0.0
Bundle-ManifestVersion: 2
-Bundle-Activator: org.jboss.tools.common.rreferences.Activator
+Bundle-Activator: org.jboss.tools.common.resref.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.jboss.tools.common.model.ui,
org.eclipse.core.resources,
org.jboss.tools.jst.web
Eclipse-LazyStart: true
-Provide-Package: org.jboss.tools.common.rreferences,
- org.jboss.tools.common.rreferences.core,
- org.jboss.tools.common.rreferences.messages
+Export-Package: org.jboss.tools.common.resref,
+ org.jboss.tools.common.resref.core,
+ org.jboss.tools.common.resref.messages
Copied: trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/Activator.java (from rev 9992, trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/rreferences/Activator.java)
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/Activator.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/Activator.java 2008-09-02 11:24:40 UTC (rev 10023)
@@ -0,0 +1,50 @@
+package org.jboss.tools.common.resref;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.common.resref";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
Copied: trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/AbsoluteFolderReferenceComposite.java (from rev 9993, trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/rreferences/core/AbsoluteFolderReferenceComposite.java)
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/AbsoluteFolderReferenceComposite.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/AbsoluteFolderReferenceComposite.java 2008-09-02 11:24:40 UTC (rev 10023)
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.common.resref.core;
+
+import org.jboss.tools.common.resref.messages.Messages;
+
+public class AbsoluteFolderReferenceComposite extends FolderReferenceComposite {
+
+ protected ResourceReferenceList getReferenceList() {
+ return AbsoluteFolderReferenceList.getInstance();
+ }
+
+ protected String getTitle() {
+ return Messages.ACTUAL_RUN_TIME_ABSOLUTE_FOLDER;
+ }
+
+}
Copied: trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/AbsoluteFolderReferenceList.java (from rev 9993, trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/rreferences/core/AbsoluteFolderReferenceList.java)
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/AbsoluteFolderReferenceList.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/AbsoluteFolderReferenceList.java 2008-09-02 11:24:40 UTC (rev 10023)
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.common.resref.core;
+
+import org.eclipse.core.runtime.QualifiedName;
+
+public class AbsoluteFolderReferenceList extends ResourceReferenceList {
+ private static QualifiedName PROPERTY_NAME = new QualifiedName("", "org.jboss.tools.vpe.editor.css.AbsoluteFolder");
+ static AbsoluteFolderReferenceList instance = new AbsoluteFolderReferenceList();
+
+ public static AbsoluteFolderReferenceList getInstance() {
+ return instance;
+ }
+
+ protected QualifiedName getPropertyName() {
+ return PROPERTY_NAME;
+ }
+}
Copied: trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/CSSReferenceList.java (from rev 9993, trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/rreferences/core/CSSReferenceList.java)
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/CSSReferenceList.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/CSSReferenceList.java 2008-09-02 11:24:40 UTC (rev 10023)
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.common.resref.core;
+
+import org.eclipse.core.runtime.QualifiedName;
+
+public class CSSReferenceList extends ResourceReferenceList {
+ private static QualifiedName PROPERTY_NAME = new QualifiedName("", "org.jboss.tools.vpe.editor.css.CSSList");
+ static CSSReferenceList instance = new CSSReferenceList();
+
+ public static CSSReferenceList getInstance() {
+ return instance;
+ }
+
+ protected QualifiedName getPropertyName() {
+ return PROPERTY_NAME;
+ }
+
+}
Copied: trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/CssReferencesComposite.java (from rev 9993, trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/rreferences/core/CssReferencesComposite.java)
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/CssReferencesComposite.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/CssReferencesComposite.java 2008-09-02 11:24:40 UTC (rev 10023)
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.common.resref.core;
+
+import java.util.List;
+
+import org.jboss.tools.common.resref.messages.Messages;
+
+public class CssReferencesComposite extends ResourceReferencesComposite {
+
+ protected String getEntity() {
+ return (file != null) ? "VPECSSReference" : "VPECSSReferenceExt";
+ }
+
+ protected ResourceReferencesTableProvider createTableProvider(List dataList) {
+ return ResourceReferencesTableProvider.getCSSTableProvider(dataList);
+ }
+
+ protected ResourceReferenceList getReferenceList() {
+ return CSSReferenceList.getInstance();
+ }
+
+
+ /**
+ * @see ResourceReferencesComposite#createGroupLabel()
+ */
+ @Override
+ protected String createGroupLabel() {
+ return Messages.INCLUDED_CSS_FILES;
+ }
+
+
+}
Copied: trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/FolderReferenceComposite.java (from rev 9993, trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/rreferences/core/FolderReferenceComposite.java)
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/FolderReferenceComposite.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/FolderReferenceComposite.java 2008-09-02 11:24:40 UTC (rev 10023)
@@ -0,0 +1,124 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.common.resref.core;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
+import org.jboss.tools.common.meta.action.XEntityData;
+import org.jboss.tools.common.meta.action.impl.XEntityDataImpl;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.options.PreferenceModelUtilities;
+import org.jboss.tools.common.model.ui.attribute.XAttributeSupport;
+import org.jboss.tools.common.model.ui.attribute.editor.DirectoryFieldEditorEx;
+
+public abstract class FolderReferenceComposite {
+ XAttributeSupport support = new XAttributeSupport();
+ XModelObject object;
+ IFile file;
+ IPath path;
+ ResourceReference[] rs;
+ ResourceReference current;
+ XEntityData data;
+
+ public FolderReferenceComposite() {
+ object = PreferenceModelUtilities.getPreferenceModel().createModelObject(getEntity(), new Properties());
+ }
+
+ public void setObject(Properties p) {
+ file = (IFile)p.get("file");
+ path = (IPath)p.get("path");
+ rs = (file != null) ? getReferenceList().getAllResources(file) :
+ (path != null) ? getReferenceList().getAllResources(path)
+ : new ResourceReference[0];
+ if(rs.length == 0) {
+ rs = new ResourceReference[1];
+ rs[0] = new ResourceReference("", ResourceReference.FILE_SCOPE);
+ }
+ current = rs[0];
+ object.setAttributeValue("location", current.getLocation());
+ object.setAttributeValue("scope", current.getScopeName());
+
+ data = XEntityDataImpl.create(new String[][]{
+ {getEntity(), "yes"},
+ {"location", "no"},
+ {"scope", "no"}
+ });
+
+ data.getAttributeData()[0].setValue(current.getLocation());
+ data.getAttributeData()[1].setValue(current.getScopeName());
+
+ support.init(object, data);
+// support.addPropertyChangeListener(new PropertyChangeListener() {
+// public void propertyChange(PropertyChangeEvent evt) {
+// }
+// });
+ }
+
+ protected String getEntity() {
+ return (file != null) ? "VPEFolderReference" : "VPEFolderReferenceExt";
+ }
+
+ protected abstract ResourceReferenceList getReferenceList();
+ protected abstract String getTitle();
+
+ public Control createControl(Composite parent) {
+ Group g = new Group(parent, SWT.SHADOW_ETCHED_IN);
+ GridLayout layout = new GridLayout(1, false);
+ g.setLayout(layout);
+ g.setText(getTitle());
+ Control c = support.createControl(g);
+ if(file != null) {
+ DirectoryFieldEditorEx f = (DirectoryFieldEditorEx)support.getFieldEditorByName("location");
+ f.setLastPath(file.getProject().getLocation().toString());
+ }
+ GridData data = new GridData(GridData.FILL_BOTH);
+ c.setLayoutData(data);
+ return g;
+ }
+
+ public void commit() {
+ support.store();
+ current.setLocation(data.getAttributeData()[0].getValue());
+ current.setScope(getNewScope());
+ List l = new ArrayList();
+ for (int i = rs.length - 2; i >= 0; i--) {
+ if(rs[i].getLocation().equals(current.getLocation())) continue;
+ if(rs[i].getScope() == current.getScope()) continue;
+ l.add(rs[i]);
+ }
+ l.add(current);
+ rs = (ResourceReference[])l.toArray(new ResourceReference[0]);
+ if(file != null) {
+ getReferenceList().setAllResources(file, rs);
+ } else {
+ getReferenceList().setAllResources(path, rs);
+ }
+ }
+
+ int getNewScope() {
+ String s = data.getAttributeData()[1].getValue();
+ for (int i = 0; i < ResourceReference.SCOPE_NAMES.length; i++) {
+ if(ResourceReference.SCOPE_NAMES[i].equals(s)) return i;
+ }
+ return ResourceReference.FILE_SCOPE;
+ }
+
+}
Copied: trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/GlobalResourceReference.java (from rev 9993, trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/rreferences/core/GlobalResourceReference.java)
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/GlobalResourceReference.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/GlobalResourceReference.java 2008-09-02 11:24:40 UTC (rev 10023)
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * 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.common.resref.core;
+
+
+/**
+ * Global resource reference
+ * @author Evgenij Stherbin
+ *
+ */
+public class GlobalResourceReference extends ResourceReference {
+
+ /**
+ * @param location
+ * @param scope
+ */
+ public GlobalResourceReference(String location, int scope) {
+ super(location, scope);
+ }
+
+}
Copied: trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/RelativeFolderReferenceComposite.java (from rev 9993, trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/rreferences/core/RelativeFolderReferenceComposite.java)
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/RelativeFolderReferenceComposite.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/RelativeFolderReferenceComposite.java 2008-09-02 11:24:40 UTC (rev 10023)
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.common.resref.core;
+
+
+public class RelativeFolderReferenceComposite extends FolderReferenceComposite {
+
+ protected ResourceReferenceList getReferenceList() {
+ return RelativeFolderReferenceList.getInstance();
+ }
+
+ protected String getTitle() {
+ return "Actual Run-Time Relative Folder";
+ }
+
+}
Copied: trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/RelativeFolderReferenceList.java (from rev 9993, trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/rreferences/core/RelativeFolderReferenceList.java)
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/RelativeFolderReferenceList.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/RelativeFolderReferenceList.java 2008-09-02 11:24:40 UTC (rev 10023)
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.common.resref.core;
+
+import org.eclipse.core.runtime.QualifiedName;
+
+public class RelativeFolderReferenceList extends ResourceReferenceList {
+ private static QualifiedName PROPERTY_NAME = new QualifiedName("", "org.jboss.tools.vpe.editor.css.RelativeFolder");
+ static RelativeFolderReferenceList instance = new RelativeFolderReferenceList();
+
+ public static RelativeFolderReferenceList getInstance() {
+ return instance;
+ }
+
+ protected QualifiedName getPropertyName() {
+ return PROPERTY_NAME;
+ }
+
+}
Copied: trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/ResourceReference.java (from rev 9993, trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/rreferences/core/ResourceReference.java)
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/ResourceReference.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/ResourceReference.java 2008-09-02 11:24:40 UTC (rev 10023)
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.common.resref.core;
+
+public class ResourceReference {
+ public final static int FILE_SCOPE = 0;
+ public final static int FOLDER_SCOPE = 1;
+ public final static int PROJECT_SCOPE = 2;
+ public final static int GLOBAL_SCOPE = 3;
+
+ public final static String[] SCOPE_NAMES = new String[]{"Page", "Folder", "Project","Global"};
+
+ protected String location;
+ protected int scope;
+ protected int depth = 0;
+ protected String properties = "";
+
+ protected boolean isGlobal = false;
+
+ public boolean isGlobal() {
+ return isGlobal;
+ }
+
+ public void setGlobal(boolean isGlobal) {
+ this.isGlobal = isGlobal;
+ }
+
+ public ResourceReference(String location, int scope) {
+ this.location = location;
+ this.scope = scope;
+ int q = location.indexOf('%');
+ if(q >= 0) {
+ properties = location.substring(q + 1);
+ this.location = location.substring(0, q);
+ }
+ }
+
+ public String getLocation() {
+ return location;
+ }
+
+ public int getScope() {
+ return scope;
+ }
+
+ public void setLocation(String location) {
+ this.location = location;
+ }
+
+ public void setProperties(String properties) {
+ this.properties = properties;
+ }
+
+ public String getProperties() {
+ return properties;
+ }
+
+ public void setScope(int scope) {
+ this.scope = scope;
+ }
+
+ public String getScopeName() {
+ return SCOPE_NAMES[scope];
+ }
+
+ public void setDepth(int depth) {
+ this.depth = depth;
+ }
+
+ public int getDepth() {
+ return depth;
+ }
+
+ public String getLocationAndProperties() {
+ String v = location;
+ if(properties.length() > 0) {
+ v += "%" + properties;
+ }
+ return v;
+ }
+
+
+// public static ResourceReference createResourceReference(String location, int scope) {
+// ResourceReference rst = null;
+//
+// switch (scope) {
+// case FILE_SCOPE:
+// case FOLDER_SCOPE:
+// case PROJECT_SCOPE:
+// rst = new ResourceReference(location, scope);
+// break;
+// case GLOBAL_SCOPE:
+// rst = new GlobalResourceReference(location, scope);
+// break;
+// default:
+// throw new IllegalArgumentException("Illegal scope=" + scope);
+// }
+// return rst;
+// }
+
+}
Copied: trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/ResourceReferenceList.java (from rev 9993, trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/rreferences/core/ResourceReferenceList.java)
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/ResourceReferenceList.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/ResourceReferenceList.java 2008-09-02 11:24:40 UTC (rev 10023)
@@ -0,0 +1,274 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.common.resref.core;
+
+import java.io.File;
+import java.util.*;
+import org.eclipse.core.resources.*;
+import org.eclipse.core.runtime.*;
+import org.jboss.tools.common.model.plugin.ModelPlugin;
+import org.jboss.tools.common.model.util.XModelObjectUtil;
+
+public abstract class ResourceReferenceList {
+ ResourceReferenceListListener[] listeners = new ResourceReferenceListListener[0];
+
+ protected abstract QualifiedName getPropertyName();
+
+ public void addChangeListener(ResourceReferenceListListener listener) {
+ int i = getListenerIndex(listener);
+ if(i >= 0) return;
+ ResourceReferenceListListener[] ls = new ResourceReferenceListListener[listeners.length + 1];
+ System.arraycopy(listeners, 0, ls, 0, listeners.length);
+ ls[listeners.length] = listener;
+ listeners = ls;
+ }
+
+ public void removeChangeListener(ResourceReferenceListListener listener) {
+ int i = getListenerIndex(listener);
+ if(i < 0) return;
+ ResourceReferenceListListener[] ls = new ResourceReferenceListListener[listeners.length - 1];
+ if(i > 0) System.arraycopy(listeners, 0, ls, 0, i);
+ if(i < ls.length) System.arraycopy(listeners, i + 1, ls, i, ls.length - i);
+ listeners = ls;
+ }
+
+ private int getListenerIndex(ResourceReferenceListListener listener) {
+ for (int i = 0; i < listeners.length; i++) {
+ if(listeners[i] == listener) return i;
+ }
+ return -1;
+ }
+
+ public ResourceReference[] getAllResources(IFile file) {
+ Set locations = new HashSet();
+ List css = new ArrayList();
+ if(file.getProject() != null) {
+ String[] dcss = getDeclaredResources(file.getProject());
+ for (int i = 0; i < dcss.length; i++) {
+ ResourceReference ref = new ResourceReference(dcss[i], ResourceReference.PROJECT_SCOPE);
+ locations.add(dcss[i]);
+ css.add(ref);
+ }
+ }
+ IResource parent = file.getParent();
+ int depth = 0;
+ while(parent instanceof IFolder) {
+ String[] dcss = getDeclaredResources(parent);
+ for (int i = 0; i < dcss.length; i++) {
+ if(locations.contains(dcss[i])) continue;
+ ResourceReference ref = new ResourceReference(dcss[i], ResourceReference.FOLDER_SCOPE);
+ ref.setDepth(depth);
+ locations.add(dcss[i]);
+ css.add(ref);
+ }
+ parent = parent.getParent();
+ depth++;
+ }
+ String[] dcss = getDeclaredResources(file);
+ for (int i = 0; i < dcss.length; i++) {
+ if(locations.contains(dcss[i])) continue;
+ ResourceReference ref = new ResourceReference(dcss[i], ResourceReference.FILE_SCOPE);
+ locations.add(dcss[i]);
+ css.add(ref);
+ }
+ return (ResourceReference[])css.toArray(new ResourceReference[0]);
+ }
+
+ private String[] getDeclaredResources(IResource resource) {
+ String s = null;
+ try {
+ s = resource.getPersistentProperty(getPropertyName());
+ } catch (CoreException e) {
+ //ignore
+ }
+ if(s == null || s.length() == 0) return new String[0];
+ return XModelObjectUtil.asStringArray(s);
+ }
+
+ public void setAllResources(IFile file, ResourceReference[] entries) {
+ IResource changed = null;
+ boolean b = setDeclaredResources(file, entries, ResourceReference.FILE_SCOPE, 0);
+ if(b) changed = file;
+ IResource parent = file.getParent();
+ int depth = 0;
+ while(parent instanceof IFolder) {
+ b = setDeclaredResources(parent, entries, ResourceReference.FOLDER_SCOPE, depth);
+ if(b) changed = parent;
+ parent = parent.getParent();
+ depth++;
+ }
+ if(file.getProject() != null) {
+ int scope = ResourceReference.PROJECT_SCOPE;
+ if(file.getParent() == file.getProject()) scope = 10;
+ b = setDeclaredResources(file.getProject(), entries, scope, 0);
+ if(b) changed = file.getProject();
+ }
+ if(changed != null) fire(changed.getFullPath());
+ }
+
+ private boolean setDeclaredResources(IResource resource, ResourceReference[] entries, int scope, int depth) {
+ try {
+ String oldValue = resource.getPersistentProperty(getPropertyName());
+ if(oldValue == null) oldValue = "";
+ String newValue = encodeDeclaredResources(entries, scope, depth);
+ if(oldValue.equals(newValue)) return false;
+ resource.setPersistentProperty(getPropertyName(), newValue);
+ } catch (CoreException e) {
+ return false;
+ }
+ return true;
+ }
+
+ private String encodeDeclaredResources(ResourceReference[] entries, int scope, int depth) {
+ StringBuffer sb = new StringBuffer();
+ for (int i = 0; i < entries.length; i++) {
+ int s = entries[i].getScope();
+ if(scope < 10 && s != scope) continue;
+ if(scope == 10 && s == ResourceReference.FILE_SCOPE) continue;
+ if(scope == ResourceReference.FOLDER_SCOPE && entries[i].getDepth() != depth) continue;
+ if(sb.length() > 0) sb.append(";");
+ sb.append(entries[i].getLocationAndProperties());
+ }
+ return sb.toString();
+ }
+
+ void fire(IPath path) {
+ ResourceReferenceListListener[] ls = listeners;
+ for (int i = 0; i < ls.length; i++) {
+ IPath listenedPath = ls[i].getPath();
+ if(listenedPath != null && path.isPrefixOf(listenedPath)) {
+ ls[i].changed(this);
+ }
+ }
+ }
+
+ /*
+ * Handle opened external files
+ */
+ TreeMap allExternalResources = null;
+
+ private TreeMap getAllExternalResources() {
+ if(allExternalResources == null) {
+ allExternalResources = new TreeMap();
+ String s = null;
+ try {
+ s = ModelPlugin.getWorkspace().getRoot().getPersistentProperty(getPropertyName());
+ if(s != null) parseExternalResources(s);
+ } catch (CoreException e) {
+ //ignore
+ }
+ }
+ return allExternalResources;
+ }
+ private void parseExternalResources(String s) {
+ StringTokenizer st = new StringTokenizer(s, "#");
+ while(st.hasMoreTokens()) {
+ String t = st.nextToken();
+ int e = t.indexOf('=');
+ String path = t.substring(0, e);
+ String list = t.substring(e + 1);
+ if(new File(path).exists()) allExternalResources.put(path, list);
+ }
+ }
+
+ private void setAllExternalResources() {
+ StringBuffer sb = new StringBuffer();
+ Iterator it = allExternalResources.keySet().iterator();
+ while(it.hasNext()) {
+ String path = it.next().toString();
+ String list = (String)allExternalResources.get(path);
+ if(path != null && list != null && new File(path).exists()) {
+ if(sb.length() > 0) sb.append('#');
+ sb.append(path).append('=').append(list);
+ }
+ }
+ try {
+ ModelPlugin.getWorkspace().getRoot().setPersistentProperty(getPropertyName(), sb.toString());
+ } catch (CoreException e) {
+ //ignore
+ }
+ }
+
+ public ResourceReference[] getAllResources(IPath path) {
+ Set locations = new HashSet();
+ List css = new ArrayList();
+ IPath parent = path.removeLastSegments(1);
+ int depth = 0;
+ boolean isGlobal = path.equals(Platform.getLocation());
+ int setScope = isGlobal ? ResourceReference.GLOBAL_SCOPE : ResourceReference.FILE_SCOPE;
+ while(parent != null && parent.segmentCount() > 1) {
+ String[] dcss = getDeclaredResources(path);
+ for (int i = 0; i < dcss.length; i++) {
+ if(locations.contains(dcss[i])) continue;
+ ResourceReference ref = new ResourceReference(dcss[i],isGlobal ? ResourceReference.GLOBAL_SCOPE : ResourceReference.FOLDER_SCOPE);
+ if(isGlobal){
+ ref.setGlobal(true);
+ }
+ ref.setDepth(depth);
+ locations.add(dcss[i]);
+ css.add(ref);
+ }
+ parent = parent.removeLastSegments(1);
+ depth++;
+ }
+ String[] dcss = getDeclaredResources(path);
+ for (int i = 0; i < dcss.length; i++) {
+ if(locations.contains(dcss[i])) continue;
+ ResourceReference ref = new ResourceReference(dcss[i], setScope);
+ if(setScope == ResourceReference.GLOBAL_SCOPE){
+ ref.setGlobal(true);
+ }
+ locations.add(dcss[i]);
+ css.add(ref);
+ }
+ return (ResourceReference[])css.toArray(new ResourceReference[0]);
+ }
+
+ private String[] getDeclaredResources(IPath path) {
+ String s = (String)getAllExternalResources().get(path.toString());
+ return (s == null || s.length() == 0) ? new String[0] : XModelObjectUtil.asStringArray(s);
+ }
+
+ public void setAllResources(IPath path, ResourceReference[] entries) {
+ IPath changed = null;
+ boolean b = false;
+ int checkScope = path.equals(Platform.getLocation()) ? ResourceReference.GLOBAL_SCOPE : ResourceReference.FILE_SCOPE;
+
+ b = setDeclaredResources(path, entries, checkScope, 0);
+ if(b) changed = path;
+ IPath parent = path.removeLastSegments(1);
+ int depth = 0;
+ while(parent != null && parent.segmentCount() > 1) {
+ b = setDeclaredResources(parent, entries, ResourceReference.FOLDER_SCOPE, depth);
+ if(b) changed = parent;
+ parent = parent.removeLastSegments(1);
+ depth++;
+ }
+ if(changed != null) {
+ setAllExternalResources();
+ fire(changed);
+ }
+ }
+
+ private boolean setDeclaredResources(IPath path, ResourceReference[] entries, int scope, int depth) {
+ String oldValue = (String)getAllExternalResources().get(path.toString());
+ if(oldValue == null) oldValue = "";
+ String newValue = encodeDeclaredResources(entries, scope, depth);
+ if(oldValue.equals(newValue)) return false;
+ if(newValue == null || newValue.length() == 0) {
+ getAllExternalResources().remove(path.toString());
+ } else {
+ getAllExternalResources().put(path.toString(), newValue);
+ }
+ return true;
+ }
+
+}
Copied: trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/ResourceReferenceListListener.java (from rev 9993, trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/rreferences/core/ResourceReferenceListListener.java)
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/ResourceReferenceListListener.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/ResourceReferenceListListener.java 2008-09-02 11:24:40 UTC (rev 10023)
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.common.resref.core;
+
+import org.eclipse.core.runtime.IPath;
+
+public interface ResourceReferenceListListener {
+ public IPath getPath();
+ public void changed(Object source);
+
+}
Copied: trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/ResourceReferencesComposite.java (from rev 9993, trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/rreferences/core/ResourceReferencesComposite.java)
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/ResourceReferencesComposite.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/ResourceReferencesComposite.java 2008-09-02 11:24:40 UTC (rev 10023)
@@ -0,0 +1,210 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.common.resref.core;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
+import org.jboss.tools.common.meta.XAttribute;
+import org.jboss.tools.common.meta.XModelEntity;
+import org.jboss.tools.common.meta.constraint.impl.XAttributeConstraintFileFilter;
+import org.jboss.tools.common.meta.impl.XModelMetaDataImpl;
+import org.jboss.tools.common.model.ui.action.CommandBar;
+import org.jboss.tools.common.model.ui.action.CommandBarListener;
+import org.jboss.tools.common.model.ui.objecteditor.XTable;
+
+public abstract class ResourceReferencesComposite {
+ protected static String ADD = "Add";
+ protected static String EDIT = "Edit";
+ protected static String REMOVE = "Remove";
+ protected XTable table = new XTable();
+ protected CommandBar bar = new CommandBar();
+ protected ResourceReferencesTableProvider tableProvider;// = new TemplatesTableProvider();
+ protected IFile file;
+ protected IPath path;
+ protected List dataList = new ArrayList();
+
+ public ResourceReferencesComposite() {
+ init();
+ }
+
+ private void init() {
+ tableProvider = createTableProvider(dataList);
+ bar.getLayout().buttonWidth = 80;
+ bar.getLayout().direction = SWT.VERTICAL;
+ bar.setCommands(new String[]{ADD, EDIT, REMOVE});
+ bar.addCommandBarListener(new BarListener());
+ table.setTableProvider(tableProvider);
+ }
+
+ protected abstract ResourceReferencesTableProvider createTableProvider(List dataList);
+ protected abstract ResourceReferenceList getReferenceList();
+
+ /**
+ * Returned the label that will display in group.
+ *
+ * @return label displayed in group
+ * @see #createControl(Composite)
+ */
+ protected abstract String createGroupLabel();
+
+
+ public void setObject(Object object) {
+ Properties p = (Properties)object;
+ file = (IFile)p.get("file");
+ path = (IPath)p.get("path");
+ ResourceReference[] rs = (file != null) ? getReferenceList().getAllResources(file) :
+ (path != null) ? getReferenceList().getAllResources(path)
+ : new ResourceReference[0];
+ for (int i = 0; i < rs.length; i++) dataList.add(rs[i]);
+ }
+
+ public Control createControl(Composite parent) {
+ Composite c1 = new Composite(parent, SWT.NONE);
+
+ c1.setLayoutData(new GridData(GridData.FILL_BOTH));
+ c1.setLayout(new GridLayout(2,false));
+
+ final Group group = new Group(c1,SWT.NONE);
+
+ group.setText(createGroupLabel());
+ group.setLayoutData(new GridData(GridData.FILL_BOTH));
+ GridLayout g = new GridLayout(2, false);
+ group.setLayout(g);
+
+
+ Control slc = table.createControl(group);
+ slc.setLayoutData(new GridData(GridData.FILL_BOTH));
+ Control bc = bar.createControl(group);
+
+
+ GridData gd = new GridData(GridData.FILL_VERTICAL);
+ bc.setLayoutData(gd);
+ table.getTable().addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ updateBars();
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {
+ widgetSelected(e);
+ }
+ });
+ update();
+ return c1;
+ }
+
+ ResourceReference[] getReferenceArray() {
+ return (ResourceReference[])dataList.toArray(new ResourceReference[0]);
+ }
+
+ /**
+ * Clear all entries from table.
+ */
+ public void clearAll(){
+ if(this.dataList!=null){
+ this.dataList.clear();
+ }
+ }
+
+ public void commit() {
+ if(file != null) {
+ getReferenceList().setAllResources(file, getReferenceArray());
+ } else {
+ getReferenceList().setAllResources(path, getReferenceArray());
+ }
+ }
+ class BarListener implements CommandBarListener {
+ public void action(String command) {
+ int index = table.getSelectionIndex();
+ if(ADD.equals(command)) {
+ add(index);
+ } else if(EDIT.equals(command)) {
+ edit(index);
+ } else if(REMOVE.equals(command)) {
+ remove(index);
+ }
+ update();
+ }
+ }
+
+ protected void add(int index) {
+ ResourceReference css = getDefaultResourceReference();
+
+ initFilterInFileChooser();
+ boolean ok = VpeAddReferenceSupport.add(file, css, getReferenceArray(), getEntity());
+ if(!ok) return;
+ dataList.add(css);
+ update();
+ table.setSelection(dataList.size() - 1);
+ }
+
+ /**
+ * @return
+ */
+ protected ResourceReference getDefaultResourceReference() {
+ return new ResourceReference("", ResourceReference.FOLDER_SCOPE);
+ }
+
+ protected void edit(int index) {
+ if(index < 0) return;
+ ResourceReference css = getReferenceArray()[index];
+ initFilterInFileChooser();
+ boolean ok = VpeAddReferenceSupport.edit(file, css, getReferenceArray(), getEntity());
+ if(!ok) return;
+ update();
+ }
+
+ protected abstract String getEntity();
+
+ void remove(int index) {
+ if(index >= 0) dataList.remove(index);
+ }
+
+ public void update() {
+ if(table != null) table.update();
+ updateBars();
+ }
+
+ void updateBars() {
+ bar.setEnabled(EDIT, canModify());
+ bar.setEnabled(REMOVE, canModify());
+ }
+
+ private boolean canModify() {
+ return table.getSelectionIndex() >= 0;
+ }
+
+ private void initFilterInFileChooser() {
+ String entityName = getEntity();
+ XModelEntity entity = XModelMetaDataImpl.getInstance().getEntity(entityName);
+ if(entity != null && file != null && file.getProject() != null) {
+ XAttribute[] as = entity.getAttributes();
+ for (int i = 0; i < as.length; i++) {
+ if(as[i].getConstraint() instanceof XAttributeConstraintFileFilter) {
+ XAttributeConstraintFileFilter f = (XAttributeConstraintFileFilter)as[i].getConstraint();
+ f.getProperties().setProperty("filterFolder", file.getProject().getLocation().toFile().getAbsolutePath());
+ }
+ }
+ }
+ }
+
+
+}
Copied: trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/ResourceReferencesDialogView.java (from rev 9993, trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/rreferences/core/ResourceReferencesDialogView.java)
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/ResourceReferencesDialogView.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/ResourceReferencesDialogView.java 2008-09-02 11:24:40 UTC (rev 10023)
@@ -0,0 +1,159 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.common.resref.core;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.jboss.tools.common.model.ui.action.CommandBar;
+import org.jboss.tools.common.model.ui.action.CommandBarListener;
+import org.jboss.tools.common.model.ui.objecteditor.XTable;
+import org.jboss.tools.common.model.ui.wizards.query.AbstractQueryWizardView;
+
+public abstract class ResourceReferencesDialogView extends AbstractQueryWizardView {
+ static String ADD = "Add";
+ static String EDIT = "Edit";
+ static String REMOVE = "Remove";
+ protected XTable table = new XTable();
+ protected CommandBar bar = new CommandBar();
+ protected ResourceReferencesTableProvider tableProvider;// = new TemplatesTableProvider();
+ IFile file;
+ IPath path;
+ protected List dataList = new ArrayList();
+
+ public ResourceReferencesDialogView() {
+ init();
+ }
+
+ private void init() {
+// changed = false;
+ tableProvider = createTableProvider(dataList);
+///ResourceReferencesTableProvider.getCSSTableProvider(dataList);
+ bar.getLayout().buttonWidth = 80;
+ bar.getLayout().direction = SWT.VERTICAL;
+ bar.setCommands(new String[]{ADD, EDIT, REMOVE});
+ bar.addCommandBarListener(new BarListener());
+ table.setTableProvider(tableProvider);
+ }
+
+ protected abstract ResourceReferencesTableProvider createTableProvider(List dataList);
+ protected abstract ResourceReferenceList getReferenceList();
+
+ public void setObject(Object object) {
+ super.setObject(object);
+ Properties p = findProperties(object);
+ file = (IFile)p.get("file");
+ path = (IPath)p.get("path");
+ ResourceReference[] rs = (file != null) ? getReferenceList().getAllResources(file) :
+ (path != null) ? getReferenceList().getAllResources(path)
+ : new ResourceReference[0];
+ for (int i = 0; i < rs.length; i++) dataList.add(rs[i]);
+ }
+
+ public Control createControl(Composite parent) {
+ Composite c = new Composite(parent, SWT.NONE);
+ c.setLayoutData(new GridData(GridData.FILL_BOTH));
+ GridLayout g = new GridLayout(2, false);
+ c.setLayout(g);
+ Control slc = table.createControl(c);
+ slc.setLayoutData(new GridData(GridData.FILL_BOTH));
+ Control bc = bar.createControl(c);
+ GridData gd = new GridData(GridData.FILL_VERTICAL);
+ bc.setLayoutData(gd);
+ table.getTable().addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ updateBars();
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {
+ widgetSelected(e);
+ }
+ });
+ update();
+ return c;
+ }
+
+ ResourceReference[] getReferenceArray() {
+ return (ResourceReference[])dataList.toArray(new ResourceReference[0]);
+ }
+
+ public void action(String command) {
+ stopEditing();
+ if(OK.equalsIgnoreCase(command)) {
+ if(file != null) {
+ getReferenceList().setAllResources(file, getReferenceArray());
+ } else {
+ getReferenceList().setAllResources(path, getReferenceArray());
+ }
+ }
+ super.action(command);
+ }
+ class BarListener implements CommandBarListener {
+ public void action(String command) {
+ int index = table.getSelectionIndex();
+ if(ADD.equals(command)) {
+ add(index);
+ } else if(EDIT.equals(command)) {
+ edit(index);
+ } else if(REMOVE.equals(command)) {
+ remove(index);
+ }
+ update();
+ }
+ }
+
+ protected void add(int index) {
+ ResourceReference css = new ResourceReference("", ResourceReference.FOLDER_SCOPE);
+ boolean ok = VpeAddReferenceSupport.add(file, css, getReferenceArray(), getEntity());
+ if(!ok) return;
+ dataList.add(css);
+ update();
+ table.setSelection(dataList.size() - 1);
+ }
+
+ protected void edit(int index) {
+ if(index < 0) return;
+ ResourceReference css = getReferenceArray()[index];
+ boolean ok = VpeAddReferenceSupport.edit(file, css, getReferenceArray(), getEntity());
+ if(!ok) return;
+ update();
+ }
+
+ protected abstract String getEntity();
+
+ void remove(int index) {
+ if(index >= 0) dataList.remove(index);
+ }
+
+ public void update() {
+ if(table != null) table.update();
+ updateBars();
+ }
+
+ void updateBars() {
+ bar.setEnabled(EDIT, canModify());
+ bar.setEnabled(REMOVE, canModify());
+ }
+
+ private boolean canModify() {
+ return table.getSelectionIndex() >= 0;
+ }
+
+}
Copied: trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/ResourceReferencesTableProvider.java (from rev 9993, trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/rreferences/core/ResourceReferencesTableProvider.java)
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/ResourceReferencesTableProvider.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/ResourceReferencesTableProvider.java 2008-09-02 11:24:40 UTC (rev 10023)
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.common.resref.core;
+
+import java.util.List;
+
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Image;
+import org.jboss.tools.common.model.ui.objecteditor.XTableImageProvider;
+import org.jboss.tools.common.model.ui.objecteditor.XTableProvider;
+
+public class ResourceReferencesTableProvider implements XTableProvider, XTableImageProvider {
+ static String[] CSS_COLUMNS = new String[]{"Scope", "CSS File Path"};
+ static String[] IMG_COLUMNS = new String[]{"Scope", "Image Folder Path"};
+ static String[] TLD_COLUMNS = new String[]{"Scope", "URI", "Prefix"};
+ static String[] EL_COLUMNS = new String[]{"Scope", "El Expression", "Value"};
+ private final static String[] GLOBAL_EL_COLUMNS = new String[]{"Scope","El Expression", "Value"};
+
+ int[] widths = new int[]{50, 200};
+ List dataList;
+ String[] columns;
+
+ public static ResourceReferencesTableProvider getCSSTableProvider(List dataList) {
+ ResourceReferencesTableProvider p = new ResourceReferencesTableProvider(dataList);
+ p.columns = CSS_COLUMNS;
+ return p;
+ }
+
+ public static ResourceReferencesTableProvider getImageTableProvider(List dataList) {
+ ResourceReferencesTableProvider p = new ResourceReferencesTableProvider(dataList);
+ p.columns = IMG_COLUMNS;
+ return p;
+ }
+
+ public static ResourceReferencesTableProvider getTLDTableProvider(List dataList) {
+ ResourceReferencesTableProvider p = new ResourceReferencesTableProvider(dataList);
+ p.columns = TLD_COLUMNS;
+ p.widths = new int[]{50, 150, 50};
+ return p;
+ }
+
+ public static ResourceReferencesTableProvider getELTableProvider(List dataList) {
+ ResourceReferencesTableProvider p = new ResourceReferencesTableProvider(dataList);
+ p.columns = EL_COLUMNS;
+ p.widths = new int[]{50, 150, 50};
+ return p;
+ }
+
+
+ public static ResourceReferencesTableProvider getGlobalELTableProvider(final List dataList) {
+ ResourceReferencesTableProvider p = new ResourceReferencesTableProvider(dataList);
+
+ p.columns = GLOBAL_EL_COLUMNS;
+ p.widths = new int[]{50,150, 50};
+ return p;
+ }
+
+
+
+
+ private ResourceReferencesTableProvider(List dataList) {
+ this.dataList = dataList;
+ }
+
+ public int getColumnCount() {
+ return columns.length;
+ }
+
+ public int getRowCount() {
+ if(dataList == null) return 0;
+ return dataList.size();
+ }
+
+ public String getColumnName(int c) {
+ return columns[c];
+ }
+
+ public String getValueAt(int r, int c) {
+ ResourceReference css = (ResourceReference)dataList.get(r);
+ return (c == 0) ? css.getScopeName() : (c == 2) ? css.getProperties() : css.getLocation();
+ }
+
+ public Object getDataAt(int r) {
+ return null;
+ }
+
+ public Color getColor(int r) {
+ return null;
+ }
+
+ public int getWidthHint(int c) {
+ return widths[c];
+ }
+
+ public void dispose() {
+ }
+
+ public Image getImage(int r) {
+ return null;
+ }
+
+}
Copied: trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/TaglibReferenceList.java (from rev 9993, trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/rreferences/core/TaglibReferenceList.java)
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/TaglibReferenceList.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/TaglibReferenceList.java 2008-09-02 11:24:40 UTC (rev 10023)
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.common.resref.core;
+
+import org.eclipse.core.runtime.QualifiedName;
+
+public class TaglibReferenceList extends ResourceReferenceList {
+ private static QualifiedName PROPERTY_NAME = new QualifiedName("", "org.jboss.tools.vpe.editor.css.TLDList");
+ static TaglibReferenceList instance = new TaglibReferenceList();
+
+ public static TaglibReferenceList getInstance() {
+ return instance;
+ }
+
+ protected QualifiedName getPropertyName() {
+ return PROPERTY_NAME;
+ }
+
+}
Copied: trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/TaglibReferencesComposite.java (from rev 9993, trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/rreferences/core/TaglibReferencesComposite.java)
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/TaglibReferencesComposite.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/TaglibReferencesComposite.java 2008-09-02 11:24:40 UTC (rev 10023)
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.common.resref.core;
+
+import java.util.List;
+
+import org.jboss.tools.common.resref.messages.Messages;
+
+/**
+ *
+ * @author Eugene Stherbin
+ *
+ */
+public class TaglibReferencesComposite extends ResourceReferencesComposite {
+
+ protected String getEntity() {
+ return (file != null) ? "VPETLDReference" : "VPETLDReferenceExt"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ protected ResourceReferencesTableProvider createTableProvider(List dataList) {
+ return ResourceReferencesTableProvider.getTLDTableProvider(dataList);
+ }
+
+ protected ResourceReferenceList getReferenceList() {
+ return TaglibReferenceList.getInstance();
+ }
+
+ /**
+ * @see ResourceReferencesComposite#createGroupLabel()
+ */
+ @Override
+ protected String createGroupLabel() {
+ return Messages.INCLUDED_TAG_LIBS;
+ }
+
+
+
+}
Copied: trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/VpeAddReferenceSupport.java (from rev 9993, trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/rreferences/core/VpeAddReferenceSupport.java)
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/VpeAddReferenceSupport.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/VpeAddReferenceSupport.java 2008-09-02 11:24:40 UTC (rev 10023)
@@ -0,0 +1,148 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.common.resref.core;
+
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.eclipse.core.resources.IFile;
+import org.jboss.tools.common.meta.action.XActionInvoker;
+import org.jboss.tools.common.meta.action.impl.SpecialWizardSupport;
+import org.jboss.tools.common.meta.constraint.XAttributeConstraintL;
+import org.jboss.tools.common.model.XModel;
+import org.jboss.tools.common.model.XModelException;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.options.PreferenceModelUtilities;
+import org.jboss.tools.common.model.project.IModelNature;
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.jst.web.project.WebProject;
+import org.jboss.tools.jst.web.tld.TaglibMapping;
+
+public class VpeAddReferenceSupport extends SpecialWizardSupport {
+
+ public static boolean add(IFile file, ResourceReference css, ResourceReference[] list, String entity) {
+ return run(file, css, list, "CreateActions.AddItem", entity); //$NON-NLS-1$
+ }
+
+ public static boolean edit(IFile file, ResourceReference css, ResourceReference[] list, String entity) {
+ return run(file, css, list, "EditActions.EditItem", entity); //$NON-NLS-1$
+ }
+
+ private static boolean run(IFile file, ResourceReference css, ResourceReference[] list, String action, String entity) {
+ XModel model = PreferenceModelUtilities.getPreferenceModel();
+ XModelObject object = model.createModelObject(entity, null);
+ object.setAttributeValue("location", css.getLocation()); //$NON-NLS-1$
+ if(object.getAttributeValue("prefix") != null) { //$NON-NLS-1$
+ object.setAttributeValue("prefix", css.getProperties()); //$NON-NLS-1$
+ }
+ Properties p = new Properties();
+ p.put("scope",Integer.valueOf(css.getScope())); //$NON-NLS-1$
+ p.put("list", list); //$NON-NLS-1$
+ if(file != null) p.put("file", file); //$NON-NLS-1$
+ XActionInvoker.invoke(action, object, p);
+ boolean ok = "true".equals(p.getProperty("okPressed")); //$NON-NLS-1$ //$NON-NLS-2$
+ if(ok) {
+ css.setLocation(object.getAttributeValue("location")); //$NON-NLS-1$
+ Integer scope = (Integer)p.get("scope"); //$NON-NLS-1$
+
+ css.setScope(scope.intValue());
+ if(css.isGlobal()){
+ css.setScope(ResourceReference.GLOBAL_SCOPE);
+ }
+ String properties = object.getAttributeValue("prefix"); //$NON-NLS-1$
+ if(properties != null) css.setProperties(properties);
+ }
+ return ok;
+ }
+
+ IFile file = null;
+ String initialLocation;
+ String initialPrefix;
+ ResourceReference[] list;
+ String[] scopeNames;
+
+ protected void reset() {
+ initialLocation = getTarget().getAttributeValue("location"); //$NON-NLS-1$
+ setAttributeValue(0, "location", initialLocation); //$NON-NLS-1$
+ initialPrefix = getTarget().getAttributeValue("prefix"); //$NON-NLS-1$
+ if(initialPrefix != null) {
+ setAttributeValue(0, "prefix", initialPrefix); //$NON-NLS-1$
+ }
+ final XAttributeConstraintL scopeAttribute = ((XAttributeConstraintL) getTarget().getModelEntity().getAttribute("scope") //$NON-NLS-1$
+ .getConstraint());
+ if (scopeAttribute != null) {
+ scopeNames = scopeAttribute.getValues();
+ }
+ int scopeIndex = ((Integer)getProperties().get("scope")).intValue(); //$NON-NLS-1$
+
+ if(scopeIndex == 1 && scopeNames.length == 1){
+ scopeIndex = 0;
+ }else if(scopeIndex > scopeNames.length){
+ scopeIndex = scopeNames.length -1;
+ }
+ String scope = scopeNames[scopeIndex];
+ setAttributeValue(0, "scope", scope); //$NON-NLS-1$
+ list = (ResourceReference[])getProperties().get("list"); //$NON-NLS-1$
+ file = (IFile)getProperties().get("file"); //$NON-NLS-1$
+ setURIList();
+ }
+
+ void setURIList() {
+ if(file == null) return;
+ if(getEntityData()[0].getModelEntity().getName().startsWith("VPETLD")) { //$NON-NLS-1$
+ Set set = new TreeSet();
+ IModelNature n = EclipseResourceUtil.getModelNature(file.getProject());
+ if(n == null) return;
+ XModel model = n.getModel();
+ TaglibMapping taglibs = WebProject.getInstance(model).getTaglibMapping();
+ Map map = taglibs.getTaglibObjects();
+ Iterator it = map.keySet().iterator();
+ while(it.hasNext()) {
+ String s = it.next().toString();
+ set.add(taglibs.resolveURI(s));
+ }
+ String[] uris = (String[])set.toArray(new String[0]);
+ setValueList(0, "location", uris); //$NON-NLS-1$
+ }
+ }
+
+ public void action(String name) throws XModelException {
+ if(OK.equals(name) || FINISH.equals(name)) {
+ execute();
+ setFinished(true);
+ getProperties().setProperty("okPressed", "true"); //$NON-NLS-1$ //$NON-NLS-2$
+ } else if(CANCEL.equals(name)) {
+ setFinished(true);
+ }
+ }
+
+ protected void execute() throws XModelException {
+ Properties p0 = extractStepData(0);
+ getTarget().setAttributeValue("location", p0.getProperty("location")); //$NON-NLS-1$ //$NON-NLS-2$
+ if(p0.containsKey("prefix")) { //$NON-NLS-1$
+ getTarget().setAttributeValue("prefix", p0.getProperty("prefix")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ int scope = getSelectedScope(p0);
+ getProperties().put("scope", Integer.valueOf(scope)); //$NON-NLS-1$
+ }
+
+ int getSelectedScope(Properties p0) {
+ String scopeName = p0.getProperty("scope"); //$NON-NLS-1$
+ for (int i = 0; i < scopeNames.length; i++) {
+ if(scopeNames[i].equals(scopeName)) return i;
+ }
+ return 0;
+ }
+
+}
Copied: trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/VpeCssReferencesDialog.java (from rev 9993, trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/rreferences/core/VpeCssReferencesDialog.java)
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/VpeCssReferencesDialog.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/core/VpeCssReferencesDialog.java 2008-09-02 11:24:40 UTC (rev 10023)
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.common.resref.core;
+
+import java.util.List;
+import java.util.Properties;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IPath;
+import org.jboss.tools.common.model.options.PreferenceModelUtilities;
+import org.jboss.tools.common.model.ui.wizards.query.AbstractQueryWizard;
+
+public class VpeCssReferencesDialog extends AbstractQueryWizard {
+
+ public static boolean run(IFile file) {
+ VpeCssReferencesDialog dialog = new VpeCssReferencesDialog();
+ Properties p = new Properties();
+ p.setProperty("help", "VpeCssReferencesDialog");
+ p.put("file", file);
+ p.put("model", PreferenceModelUtilities.getPreferenceModel());
+ dialog.setObject(p);
+ int code = dialog.execute();
+ return code == 0;
+ }
+
+ public static boolean run(IPath path) {
+ VpeCssReferencesDialog dialog = new VpeCssReferencesDialog();
+ Properties p = new Properties();
+ p.setProperty("help", "VpeCssReferencesDialog");
+ p.put("path", path);
+ p.put("model", PreferenceModelUtilities.getPreferenceModel());
+ dialog.setObject(p);
+ int code = dialog.execute();
+ return code == 0;
+ }
+
+ public VpeCssReferencesDialog() {
+ setView(new VpeCssReferencesDialogView());
+ }
+
+}
+
+class VpeCssReferencesDialogView extends ResourceReferencesDialogView {
+
+ public VpeCssReferencesDialogView() {}
+
+ protected String getEntity() {
+ return (file != null) ? "VPECSSReference" : "VPECSSReferenceExt";
+ }
+
+ protected ResourceReferencesTableProvider createTableProvider(List dataList) {
+ return ResourceReferencesTableProvider.getCSSTableProvider(dataList);
+ }
+
+ protected ResourceReferenceList getReferenceList() {
+ return CSSReferenceList.getInstance();
+ }
+
+}
Copied: trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/messages/Messages.java (from rev 9994, trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/rreferences/messages/Messages.java)
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/messages/Messages.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/messages/Messages.java 2008-09-02 11:24:40 UTC (rev 10023)
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * 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.common.resref.messages;
+
+import java.util.ResourceBundle;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * The Class Messages.
+ *
+ * @author Eugene Stherbin
+ */
+public final class Messages {
+
+ /** The Constant BUNDLE_NAME. */
+ private static final String BUNDLE_NAME = "org.jboss.tools.common.rreferences.messages.messages";//$NON-NLS-1$
+
+ /** The f resource bundle. */
+ private static ResourceBundle fResourceBundle;
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ /**
+ * The Constructor.
+ */
+ private Messages(){}
+
+
+ public static String INCLUDED_CSS_FILES;
+ public static String INCLUDED_TAG_LIBS;
+ public static String SUBSTITUTED_EL_EXPRESSIONS;
+ public static String ACTUAL_RUN_TIME_ABSOLUTE_FOLDER;
+}
Copied: trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/messages/messages.properties (from rev 9994, trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/rreferences/messages/messages.properties)
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/messages/messages.properties (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.rreferences/src/org/jboss/tools/common/resref/messages/messages.properties 2008-09-02 11:24:40 UTC (rev 10023)
@@ -0,0 +1,4 @@
+INCLUDED_CSS_FILES=Included css files
+INCLUDED_TAG_LIBS=Included tag libs
+SUBSTITUTED_EL_EXPRESSIONS=Substituted El expressions
+ACTUAL_RUN_TIME_ABSOLUTE_FOLDER=Actual Run-Time Absolute Folder
\ No newline at end of file
16 years, 6 months