Author: estherbin
Date: 2008-07-10 11:23:09 -0400 (Thu, 10 Jul 2008)
New Revision: 9117
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/ELReferenceList.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/ElVariablesComposite.java
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/resources/help/keys-vpe.properties
trunk/vpe/plugins/org.jboss.tools.vpe/resources/meta/vpe.meta
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/ResourceReferencesTableProvider.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/VpeResourcesDialogView.java
Log:
Add table (part of
http://jira.jboss.com/jira/browse/JBIDE-2010) issue.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/resources/help/keys-vpe.properties
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/resources/help/keys-vpe.properties 2008-07-10
14:35:59 UTC (rev 9116)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/resources/help/keys-vpe.properties 2008-07-10
15:23:09 UTC (rev 9117)
@@ -9,6 +9,10 @@
VPETLDReference.location=URI
VPETLDReferenceExt.location=URI
+VPEElReference.location=El
+VPEElReferenceExt.location=El
+
+
VpeResourcesDialog.WindowTitle=References to Resources
VpeResourcesDialog.Title=Page Design Options
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/resources/meta/vpe.meta
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/resources/meta/vpe.meta 2008-07-10 14:35:59 UTC
(rev 9116)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/resources/meta/vpe.meta 2008-07-10 15:23:09 UTC
(rev 9117)
@@ -106,6 +106,119 @@
</XActionItem>
<XDependencies/>
</XModelEntity>
+
+ <!-- Added by estherbin //JBIDE-2010 -->
+ <XModelEntity ImplementingClass="%Regular%"
name="VPEElReference">
+
+ <XChildrenEntities/>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="action.empty" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute name="location" xmlname="location">
+ <Constraint loader="ListString"/>
+ <Editor name="List"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="border=true"
+ default="Folder: Any Page at the Same Folder" name="scope"
xmlname="scope">
+ <Constraint loader="ListString">
+ <value name="Page: Only This Page"/>
+ <value name="Folder: Any Page at the Same Folder"/>
+ <value name="Project: Any Page at the Same Project"/>
+ </Constraint>
+ <Editor name="RadioArray"/>
+ </XModelAttribute>
+ <XModelAttribute name="prefix">
+ <Constraint/>
+ <Editor/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem kind="list" name="CreateActions">
+ <XActionItem HandlerClassName="%SpecialWizard%"
ICON="action.empty"
+
PROPERTIES="support=org.jboss.tools.vpe.editor.css.VpeAddReferenceSupport"
+ displayName="Add El Reference..." kind="action"
name="AddItem">
+ <EntityData EntityName="VPETLDReference">
+ <AttributeData AttributeName="location"/>
+ <AttributeData AttributeName="scope" Mandatory="no"/>
+ <AttributeData AttributeName="prefix" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ <XActionItem kind="list" name="EditActions">
+ <XActionItem HandlerClassName="%SpecialWizard%"
ICON="action.empty"
+
PROPERTIES="support=org.jboss.tools.vpe.editor.css.VpeAddReferenceSupport"
+ displayName="Edit El Reference..." kind="action"
name="EditItem">
+ <EntityData EntityName="VPEElReference">
+ <AttributeData AttributeName="location"/>
+ <AttributeData AttributeName="scope" Mandatory="no"/>
+ <AttributeData AttributeName="prefix" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+
+ <XModelEntity ImplementingClass="%Regular%"
name="VPEElReferenceExt">
+
+
+ <XChildrenEntities/>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="action.empty" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute name="location" xmlname="location">
+ <Constraint loader="ListString"/>
+ <Editor name="List"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="border=true"
+ default="Folder: Any Page at the Same Folder" name="scope"
xmlname="scope">
+ <Constraint loader="ListString">
+ <value name="Page: Only This Page"/>
+ <value name="Folder: Any Page at the Same Folder"/>
+ </Constraint>
+ <Editor name="RadioArray"/>
+ </XModelAttribute>
+ <XModelAttribute name="prefix">
+ <Constraint/>
+ <Editor/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem kind="list" name="CreateActions">
+ <XActionItem HandlerClassName="%SpecialWizard%"
ICON="action.empty"
+
PROPERTIES="support=org.jboss.tools.vpe.editor.css.VpeAddReferenceSupport"
+ displayName="Add El Reference..." kind="action"
name="AddItem">
+ <EntityData EntityName="VPEELReferenceExt">
+ <AttributeData AttributeName="location"/>
+ <AttributeData AttributeName="scope" Mandatory="no"/>
+ <AttributeData AttributeName="prefix" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ <XActionItem kind="list" name="EditActions">
+ <XActionItem HandlerClassName="%SpecialWizard%"
ICON="action.empty"
+
PROPERTIES="support=org.jboss.tools.vpe.editor.css.VpeAddReferenceSupport"
+ displayName="Edit El Reference..." kind="action"
name="EditItem">
+ <EntityData EntityName="VPEElReference">
+ <AttributeData AttributeName="location"/>
+ <AttributeData AttributeName="scope" Mandatory="no"/>
+ <AttributeData AttributeName="prefix" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <!-- -->
+
+
+
<XModelEntity ImplementingClass="%Regular%"
name="VPEFolderReference">
<XChildrenEntities/>
<XEntityRenderer>
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/ELReferenceList.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/ELReferenceList.java
(rev 0)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/ELReferenceList.java 2008-07-10
15:23:09 UTC (rev 9117)
@@ -0,0 +1,37 @@
+
+
+package org.jboss.tools.vpe.editor.css;
+
+
+import org.eclipse.core.runtime.QualifiedName;
+
+
+/**
+ * The Class ELReferenceList.
+ */
+public class ELReferenceList extends ResourceReferenceList {
+
+ /** The PROPERT y_ NAME. */
+ private static QualifiedName PROPERTY_NAME = new QualifiedName("",
"org.jboss.tools.vpe.editor.css.ELReference");
+
+ /** The instance. */
+ static ELReferenceList instance = new ELReferenceList();
+
+ /**
+ * Gets the instance.
+ *
+ * @return the instance
+ */
+ public static ELReferenceList getInstance() {
+ return instance;
+ }
+
+ /**
+ * Gets the property name.
+ *
+ * @return the property name
+ */
+ protected QualifiedName getPropertyName() {
+ return PROPERTY_NAME;
+ }
+}
Property changes on:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/ELReferenceList.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/ElVariablesComposite.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/ElVariablesComposite.java
(rev 0)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/ElVariablesComposite.java 2008-07-10
15:23:09 UTC (rev 9117)
@@ -0,0 +1,43 @@
+package org.jboss.tools.vpe.editor.css;
+
+import java.util.List;
+
+/**
+ * The Class ElVariablesComposite.
+ */
+public class ElVariablesComposite extends ResourceReferencesComposite {
+
+ /**
+ * Creates the table provider.
+ *
+ * @param dataList the data list
+ *
+ * @return the resource references table provider
+ */
+ @Override
+ protected ResourceReferencesTableProvider createTableProvider(List dataList) {
+ return ResourceReferencesTableProvider.getELTableProvider(dataList);
+ };
+
+
+ /**
+ * Gets the entity.
+ *
+ * @return the entity
+ */
+ @Override
+ protected String getEntity() {
+ return (file != null) ? "VPEElReference" :
"VPEElReferenceExt";
+ }
+
+ /**
+ * Gets the reference list.
+ *
+ * @return the reference list
+ */
+ @Override
+ protected ResourceReferenceList getReferenceList() {
+ return ELReferenceList.getInstance();
+ }
+
+}
Property changes on:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/ElVariablesComposite.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/ResourceReferencesTableProvider.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/ResourceReferencesTableProvider.java 2008-07-10
14:35:59 UTC (rev 9116)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/ResourceReferencesTableProvider.java 2008-07-10
15:23:09 UTC (rev 9117)
@@ -18,6 +18,7 @@
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"};
int[] widths = new int[]{50, 200};
List dataList;
@@ -41,6 +42,16 @@
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;
+ }
+
+
+
private ResourceReferencesTableProvider(List dataList) {
this.dataList = dataList;
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/VpeResourcesDialogView.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/VpeResourcesDialogView.java 2008-07-10
14:35:59 UTC (rev 9116)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/VpeResourcesDialogView.java 2008-07-10
15:23:09 UTC (rev 9117)
@@ -25,6 +25,9 @@
IFile file;
IPath path;
CssReferencesComposite css = new CssReferencesComposite();
+ //changed by estherbin
+ //http://jira.jboss.com/jira/browse/JBIDE-2010
+ ElVariablesComposite el = new ElVariablesComposite();
TaglibReferencesComposite tld = new TaglibReferencesComposite();
AbsoluteFolderReferenceComposite absFolder = new AbsoluteFolderReferenceComposite();
RelativeFolderReferenceComposite relFolder = new RelativeFolderReferenceComposite();
@@ -36,6 +39,9 @@
path = (IPath)p.get("path");
css.setObject(object);
+ //changed by estherbin
+ //http://jira.jboss.com/jira/browse/JBIDE-2010
+ el.setObject(object);
tld.setObject(object);
absFolder.setObject(p);
relFolder.setObject(p);
@@ -63,6 +69,12 @@
Control tldControl = tld.createControl(c);
data = new GridData(GridData.FILL_BOTH);
tldControl.setLayoutData(data);
+
+ //changed by estherbin
+ //http://jira.jboss.com/jira/browse/JBIDE-2010
+ Control elControl = el.createControl(c);
+ data = new GridData(GridData.FILL_BOTH);
+ elControl.setLayoutData(data);
return c;
}
@@ -78,12 +90,16 @@
public Point getPreferredSize() {
try {
+ //changed by estherbin
+ //http://jira.jboss.com/jira/browse/JBIDE-2010
String os_name = System.getProperty("os.name");
- if(os_name != null && os_name.indexOf("Windows") >= 0) return new
Point(600, 400);
+ if(os_name != null && os_name.indexOf("Windows") >= 0) return new
Point(800, 600);
} catch (Exception e) {
//ignore
}
- return new Point(600, 500);
+ //changed by estherbin
+ //http://jira.jboss.com/jira/browse/JBIDE-2010
+ return new Point(700, 600);
}
}