CVS: Tapestry/contrib/src/net/sf/tapestry/contrib/inspector ShowSpecification.jwc,1.1.2.1,1.1.2.2 ShowSpecification.java,1.1.2.1,1.1.2.2 Inspector.library,1.1.2.2,1.1.2.3 ShowSpecification.html,1.1.2.1,1.1.2.2 ShowEngine.java,1.1.2.1,1.1.2.2 ShowProperties.java,1.1.2.2,1.1.2.3
Howard Lewis Ship <[email protected]>
| Newsgroups | gmane.comp.java.tapestry.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/tapestry/Tapestry/contrib/src/net/sf/tapestry/contrib/inspector
In directory sc8-pr-cvs1:/tmp/cvs-serv8770/contrib/src/net/sf/tapestry/contrib/inspector
Modified Files:
Tag: hship-2-3
ShowSpecification.jwc ShowSpecification.java Inspector.library
ShowSpecification.html ShowEngine.java ShowProperties.java
Log Message:
Get the Inspector largely working again.
Index: ShowSpecification.jwc
===================================================================
RCS file: /cvsroot/tapestry/Tapestry/contrib/src/net/sf/tapestry/contrib/inspector/Attic/ShowSpecification.jwc,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** ShowSpecification.jwc 30 Nov 2002 03:31:37 -0000 1.1.2.1
--- ShowSpecification.jwc 31 Dec 2002 12:20:37 -0000 1.1.2.2
***************
*** 18,50 ****
<bean name="componentClass" class="&EvenOdd;"/>
<bean name="beanClass" class="&EvenOdd;"/>
!
! <component id="insertSpecificationPath" type="Insert">
! <binding name="value" expression="inspectedSpecification.specificationResourcePath"/>
! </component>
!
! <component id="showComponentDescription" type="ShowDescription">
! <binding name="description" expression="inspectedSpecification.description"/>
! </component>
!
! <component id="insertJavaClass" type="Insert">
! <binding name="value" expression="inspectedSpecification.componentClassName"/>
! </component>
!
! <component id="ifNotPage" type="Conditional">
! <binding name="condition" expression="! inspectedSpecification.pageSpecification"/>
! </component>
!
! <component id="insertAllowInformal" type="Insert">
! <binding name="value" expression="inspectedSpecification.allowInformalParameters"/>
! </component>
!
! <component id="insertAllowBody" type="Insert">
! <binding name="value" expression="inspectedSpecification.allowBody"/>
! </component>
!
! <component id="ifFormalParameters" type="Conditional">
! <binding name="condition" expression="formalParameterNames"/>
! </component>
!
<component id="e_formal" type="Foreach">
<binding name="source" expression="formalParameterNames"/>
--- 18,22 ----
<bean name="componentClass" class="&EvenOdd;"/>
<bean name="beanClass" class="&EvenOdd;"/>
!
<component id="e_formal" type="Foreach">
<binding name="source" expression="formalParameterNames"/>
***************
*** 53,80 ****
<binding name="class" expression="beans.formalClass.next"/>
</component>
!
! <component id="insertFormalName" type="Insert">
! <binding name="value" expression="parameterName"/>
! </component>
!
! <component id="showParameterDescription" type="ShowDescription">
! <binding name="description" expression="parameterSpecification.description"/>
! </component>
!
! <component id="insertFormalRequired" type="Insert">
! <binding name="value" expression="parameterSpecification.required"/>
! </component>
!
! <component id="insertFormalType" type="Insert">
! <binding name="value" expression="parameterSpecification.type"/>
! </component>
!
! <component id="insertFormalBinding" type="Insert">
! <binding name="value" expression="binding"/>
! </component>
!
! <component id="ifInformalParameters" type="Conditional">
! <binding name="condition" expression="informalParameterNames"/>
! </component>
<component id="e_informal" type="Foreach">
--- 25,29 ----
<binding name="class" expression="beans.formalClass.next"/>
</component>
!
<component id="e_informal" type="Foreach">
***************
*** 85,96 ****
</component>
- <component id="insertInformalName" type="Insert">
- <binding name="value" expression="parameterName"/>
- </component>
-
- <component id="insertInformalBinding" type="Insert">
- <binding name="value" expression="binding"/>
- </component>
-
<component id="ifAssets" type="Conditional">
<binding name="condition" expression="assetNames"/>
--- 34,37 ----
***************
*** 104,119 ****
</component>
- <component id="insertAssetName" type="Insert">
- <binding name="value" expression="assetName"/>
- </component>
-
- <component id="insertAssetValue" type="Insert">
- <binding name="value" expression="asset"/>
- </component>
-
- <component id="ifComponents" type="Conditional">
- <binding name="condition" expression="sortedComponents"/>
- </component>
-
<component id="e_components" type="Foreach">
<binding name="source" expression="sortedComponents"/>
--- 45,48 ----
***************
*** 128,143 ****
</component>
- <component id="insertComponentId" type="Insert">
- <binding name="value" expression="component.id"/>
- </component>
-
<component id="insertComponentType" type="Insert">
<binding name="value" expression="componentType"/>
</component>
- <component id="ifProperties" type="Conditional">
- <binding name="condition" expression="sortedPropertyNames"/>
- </component>
-
<component id="e_property" type="Foreach">
<binding name="source" expression="sortedPropertyNames"/>
--- 57,64 ----
***************
*** 146,162 ****
<binding name="class" expression="beans.propertyClass.next"/>
</component>
!
! <component id="insertPropertyName" type="Insert">
! <binding name="value" expression="propertyName"/>
! </component>
!
! <component id="insertPropertyValue" type="Insert">
! <binding name="value" expression="propertyValue"/>
! </component>
!
! <component id="ifBeans" type="Conditional">
! <binding name="condition" expression="beanNames"/>
! </component>
!
<component id="e_bean" type="Foreach">
<binding name="source" expression="beanNames"/>
--- 67,71 ----
<binding name="class" expression="beans.propertyClass.next"/>
</component>
!
<component id="e_bean" type="Foreach">
<binding name="source" expression="beanNames"/>
***************
*** 164,179 ****
<static-binding name="element">tr</static-binding>
<binding name="class" expression="beans.beanClass.next"/>
- </component>
-
- <component id="insertBeanName" type="Insert">
- <binding name="value" expression="beanName"/>
- </component>
-
- <component id="insertBeanClass" type="Insert">
- <binding name="value" expression="beanSpecification.className"/>
- </component>
-
- <component id="insertBeanLifecycle" type="Insert">
- <binding name="value" expression="beanSpecification.lifecycle.name"/>
</component>
--- 73,76 ----
Index: ShowSpecification.java
===================================================================
RCS file: /cvsroot/tapestry/Tapestry/contrib/src/net/sf/tapestry/contrib/inspector/Attic/ShowSpecification.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** ShowSpecification.java 30 Nov 2002 03:31:37 -0000 1.1.2.1
--- ShowSpecification.java 31 Dec 2002 12:20:37 -0000 1.1.2.2
***************
*** 69,83 ****
/**
- * Registers this component as a {@link PageRenderListener}.
- *
- * @since 1.0.5
- **/
-
- protected void finishLoad()
- {
- getPage().addPageRenderListener(this);
- }
-
- /**
* Clears all cached information about the component and such after
* each render (including the rewind phase render used to process
--- 69,72 ----
***************
*** 114,120 ****
public void pageBeginRender(PageEvent event)
{
! Inspector inspector;
!
! inspector = (Inspector) getPage();
_inspectedComponent = inspector.getInspectedComponent();
--- 103,107 ----
public void pageBeginRender(PageEvent event)
{
! Inspector inspector = (Inspector) getPage();
_inspectedComponent = inspector.getInspectedComponent();
***************
*** 139,151 ****
public List getFormalParameterNames()
{
! if (_formalParameterNames != null)
! return _formalParameterNames;
!
! Collection names = _inspectedSpecification.getParameterNames();
! if (names != null && names.size() > 0)
! {
! _formalParameterNames = new ArrayList(names);
! Collections.sort(_formalParameterNames);
! }
return _formalParameterNames;
--- 126,131 ----
public List getFormalParameterNames()
{
! if (_formalParameterNames == null)
! _formalParameterNames = sort(_inspectedSpecification.getParameterNames());
return _formalParameterNames;
***************
*** 245,255 ****
public List getAssetNames()
{
! if (_assetNames != null)
! return _assetNames;
!
! Map assets = _inspectedComponent.getAssets();
!
! _assetNames = new ArrayList(assets.keySet());
! Collections.sort(_assetNames);
return _assetNames;
--- 225,230 ----
public List getAssetNames()
{
! if (_assetNames == null)
! _assetNames = sort(_inspectedComponent.getAssets().keySet());
return _assetNames;
***************
*** 294,308 ****
public String getComponentType()
{
! String id;
! ComponentSpecification containerSpecification;
! IComponent container;
! ContainedComponent contained;
! container = _component.getContainer();
! containerSpecification = container.getSpecification();
! id = _component.getId();
! contained = containerSpecification.getComponent(id);
return contained.getType();
--- 269,284 ----
public String getComponentType()
{
! IComponent container = _component.getContainer();
! ComponentSpecification containerSpecification = container.getSpecification();
! String id = _component.getId();
! ContainedComponent contained = containerSpecification.getComponent(id);
! // Temporary: An implicit component will not be in the containing
! // component's specification as a ContainedComponent.
!
! if (contained == null)
! return null;
return contained.getType();
***************
*** 318,330 ****
public List getSortedPropertyNames()
{
! if (_sortedPropertyNames != null)
! return _sortedPropertyNames;
!
! Collection names = _inspectedSpecification.getPropertyNames();
! if (names != null && names.size() > 0)
! {
! _sortedPropertyNames = new ArrayList(names);
! Collections.sort(_sortedPropertyNames);
! }
return _sortedPropertyNames;
--- 294,299 ----
public List getSortedPropertyNames()
{
! if (_sortedPropertyNames == null)
! _sortedPropertyNames = sort(_inspectedSpecification.getPropertyNames());
return _sortedPropertyNames;
***************
*** 348,361 ****
public List getBeanNames()
{
! if (_beanNames != null)
! return _beanNames;
!
! Collection names = _inspectedSpecification.getBeanNames();
!
! if (names != null && names.size() > 0)
! {
! _beanNames = new ArrayList(names);
! Collections.sort(_beanNames);
! }
return _beanNames;
--- 317,322 ----
public List getBeanNames()
{
! if (_beanNames == null)
! _beanNames = sort(_inspectedSpecification.getBeanNames());
return _beanNames;
***************
*** 376,379 ****
--- 337,352 ----
{
return _beanSpecification;
+ }
+
+ private List sort(Collection c)
+ {
+ if (c == null || c.size() == 0)
+ return null;
+
+ List result = new ArrayList(c);
+
+ Collections.sort(result);
+
+ return result;
}
}
Index: Inspector.library
===================================================================
RCS file: /cvsroot/tapestry/Tapestry/contrib/src/net/sf/tapestry/contrib/inspector/Attic/Inspector.library,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -d -r1.1.2.2 -r1.1.2.3
*** Inspector.library 8 Dec 2002 15:04:48 -0000 1.1.2.2
--- Inspector.library 31 Dec 2002 12:20:37 -0000 1.1.2.3
***************
*** 5,18 ****
"http://tapestry.sf.net/dtd/Tapestry_1_3.dtd">
! <library-specification>
!
! <component-alias type="Selector" specification-path="Selector.jwc"/>
! <component-alias type="ViewTabs" specification-path="ViewTabs.jwc"/>
! <component-alias type="ShowSpecification" specification-path="ShowSpecification.jwc"/>
! <component-alias type="ShowTemplate" specification-path="ShowTemplate.jwc"/>
! <component-alias type="ShowProperties" specification-path="ShowProperties.jwc"/>
! <component-alias type="ShowEngine" specification-path="ShowEngine.jwc"/>
! <component-alias type="ShowLogging" specification-path="ShowLogging.jwc"/>
! <component-alias type="ShowDescription" specification-path="ShowDescription.jwc"/>
!
! </library-specification>
\ No newline at end of file
--- 5,7 ----
"http://tapestry.sf.net/dtd/Tapestry_1_3.dtd">
! <library-specification/>
\ No newline at end of file
Index: ShowSpecification.html
===================================================================
RCS file: /cvsroot/tapestry/Tapestry/contrib/src/net/sf/tapestry/contrib/inspector/Attic/ShowSpecification.html,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** ShowSpecification.html 30 Nov 2002 03:31:37 -0000 1.1.2.1
--- ShowSpecification.html 31 Dec 2002 12:20:37 -0000 1.1.2.2
***************
*** 7,13 ****
<table class="inspector-data" width="100%">
<tr class="even">
! <th>Specification Resource Path</th>
! <td><span jwcid="insertSpecificationPath"/>
! <span jwcid="showComponentDescription"/>
</td>
</tr>
--- 7,13 ----
<table class="inspector-data" width="100%">
<tr class="even">
! <th>Specification Resource Location</th>
! <td><span jwcid="@Insert" value="[[ inspectedSpecification.specificationLocation ]]"/>
! <span jwcid="@ShowDescription" description="[[ inspectedSpecification.description ]]"/>
</td>
</tr>
***************
*** 15,31 ****
<tr class="odd">
<th>Java class</th>
! <td><span jwcid="insertJavaClass"/></td>
</tr>
! <span jwcid="ifNotPage">
<tr class="even">
<th>Allow informal parameters</th>
! <td><span jwcid="insertAllowInformal"/></td>
</tr>
<tr class="odd">
<th>Allow body</th>
! <td><span jwcid="insertAllowBody"/></td>
</tr>
--- 15,31 ----
<tr class="odd">
<th>Java class</th>
! <td><span jwcid="@Insert" value="[[ inspectedSpecification.componentClassName ]]"/></td>
</tr>
! <span jwcid="@Conditional" condition="[ [! inspectedSpecification.pageSpecification ]]">
<tr class="even">
<th>Allow informal parameters</th>
! <td><span jwcid="@Insert" value="[[ inspectedSpecification.allowInformalParameters ]]"/></td>
</tr>
<tr class="odd">
<th>Allow body</th>
! <td><span jwcid="@Insert" value="[[ inspectedSpecification.allowBody ]]"/></td>
</tr>
***************
*** 34,38 ****
</table>
! <span jwcid="ifFormalParameters">
<table class="inspector-data" width="100%">
--- 34,38 ----
</table>
! <span jwcid="@Conditional" condition="[[ formalParameterNames ]]">
<table class="inspector-data" width="100%">
***************
*** 45,54 ****
<tr jwcid="e_formal">
! <td><span jwcid="insertFormalName"/>
! <span jwcid="showParameterDescription"/>
</td>
! <td><span jwcid="insertFormalRequired"/></td>
! <td><span jwcid="insertFormalType"/></td>
! <td><span jwcid="insertFormalBinding"/></td>
</tr>
--- 45,54 ----
<tr jwcid="e_formal">
! <td><span jwcid="@Insert" value="[[ parameterName ]]"/>
! <span jwcid="@ShowDescription" description="[[ parameterSpecification.description ]]"/>
</td>
! <td><span jwcid="@Insert" value="[[ parameterSpecification.required ]]"/></td>
! <td><span jwcid="@Insert" value="[[ parameterSpecification.type ]]"/></td>
! <td><span jwcid="@Insert" value="[[ binding ]]"/></td>
</tr>
***************
*** 56,60 ****
</span>
! <span jwcid="ifInformalParameters">
<table class="inspector-data" width="100%">
--- 56,60 ----
</span>
! <span jwcid="@Conditional" condition="[[ informalParameterNames ]]">
<table class="inspector-data" width="100%">
***************
*** 67,72 ****
<tr jwcid="e_informal">
! <td><span jwcid="insertInformalName"/></td>
! <td><span jwcid="insertInformalBinding"/></td>
</tr>
--- 67,72 ----
<tr jwcid="e_informal">
! <td><span jwcid="@Insert" value="[[ parameterName ]]"/></td>
! <td><span jwcid="@Insert" value="[[ binding ]]"/></td>
</tr>
***************
*** 74,78 ****
</span>
! <span jwcid="ifAssets">
<table class="inspector-data" width="100%">
--- 74,78 ----
</span>
! <span jwcid="@Conditional" condition="[[ assetNames ]]">
<table class="inspector-data" width="100%">
***************
*** 85,90 ****
<tr jwcid="e_asset">
! <td><span jwcid="insertAssetName"/></td>
! <td><span jwcid="insertAssetValue"/></td>
</tr>
--- 85,90 ----
<tr jwcid="e_asset">
! <td><span jwcid="@Insert" value="[[ assetName ]]"/></td>
! <td><span jwcid="@Insert" value="[[ asset ]]"/></td>
</tr>
***************
*** 93,97 ****
</span>
! <span jwcid="ifProperties">
<table class="inspector-data" width="100%">
--- 93,97 ----
</span>
! <span jwcid="@Conditional" condition="[[ sortedPropertyNames ]]">
<table class="inspector-data" width="100%">
***************
*** 104,109 ****
<tr jwcid="e_property">
! <th><span jwcid="insertPropertyName"/></th>
! <td><span jwcid="insertPropertyValue"/></td>
</tr>
--- 104,109 ----
<tr jwcid="e_property">
! <th><span jwcid="@Insert" value="[[ propertyName ]]"/></th>
! <td><span jwcid="@Insert" value="[[ propertyValue ]]"/></td>
</tr>
***************
*** 111,115 ****
</span>
! <span jwcid="ifBeans">
<table class="inspector-data" width="100%">
--- 111,115 ----
</span>
! <span jwcid="@Conditional" condition="[[ beanNames ]]">
<table class="inspector-data" width="100%">
***************
*** 123,129 ****
<tr jwcid="e_bean">
! <td><span jwcid="insertBeanName"/></td>
! <td><span jwcid="insertBeanClass"/></td>
! <td><span jwcid="insertBeanLifecycle"/></td>
</tr>
--- 123,129 ----
<tr jwcid="e_bean">
! <td><span jwcid="@Insert" value="[[ beanName ]]"/></td>
! <td><span jwcid="@Insert" value="[[ beanSpecification.className ]]"/></td>
! <td><span jwcid="@Insert" value="[[ beanSpecification.lifecycle.name ]]"/></td>
</tr>
***************
*** 134,138 ****
<td>
! <span jwcid="ifComponents">
<table border="0" class="inspector-data">
--- 134,138 ----
<td>
! <span jwcid="@Conditional" condition="[[ sortedComponents ]]">
<table border="0" class="inspector-data">
***************
*** 147,154 ****
<tr jwcid="e_components">
<td>
! <a jwcid="selectComponent"><span jwcid="insertComponentId"/></a>
</td>
<td>
! <span jwcid="insertComponentType"/>
</td>
</tr>
--- 147,154 ----
<tr jwcid="e_components">
<td>
! <a jwcid="selectComponent"><span jwcid="@Insert" value="[[ component.id ]]"/></a>
</td>
<td>
! <span jwcid="@Insert" value="[[ componentType ]]"/>
</td>
</tr>
Index: ShowEngine.java
===================================================================
RCS file: /cvsroot/tapestry/Tapestry/contrib/src/net/sf/tapestry/contrib/inspector/Attic/ShowEngine.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** ShowEngine.java 30 Nov 2002 03:31:37 -0000 1.1.2.1
--- ShowEngine.java 31 Dec 2002 12:20:37 -0000 1.1.2.2
***************
*** 34,49 ****
private byte[] serializedEngine;
- /**
- * Registers with the page as a {@link PageDetachListener}.
- *
- * @since 1.0.5
- *
- **/
-
- protected void finishLoad()
- {
- getPage().addPageDetachListener(this);
- }
-
public void pageDetached(PageEvent event)
{
--- 34,37 ----
Index: ShowProperties.java
===================================================================
RCS file: /cvsroot/tapestry/Tapestry/contrib/src/net/sf/tapestry/contrib/inspector/Attic/ShowProperties.java,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -d -r1.1.2.2 -r1.1.2.3
*** ShowProperties.java 30 Dec 2002 03:04:59 -0000 1.1.2.2
--- ShowProperties.java 31 Dec 2002 12:20:37 -0000 1.1.2.3
***************
*** 34,49 ****
/**
- * Registers this component as a {@link PageRenderListener}.
- *
- * @since 1.0.5
- *
- **/
-
- protected void finishLoad()
- {
- getPage().addPageRenderListener(this);
- }
-
- /**
* Does nothing.
*
--- 34,37 ----
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf