X4O: Formatted plugins and maisdoc

This commit is contained in:
Willem Cazander 2025-11-07 21:48:59 +01:00
parent a61ce241e1
commit bd4a04a813
63 changed files with 1690 additions and 1589 deletions

View file

@ -52,14 +52,8 @@ public class TagHandlerTest {
X4ODriver<TestObjectRoot> driver = TestDriver.getInstance(); X4ODriver<TestObjectRoot> driver = TestDriver.getInstance();
X4OReader<TestObjectRoot> reader = driver.createReader(); X4OReader<TestObjectRoot> reader = driver.createReader();
/* /*
File f = File.createTempFile("test-taghandlers", ".xml"); * File f = File.createTempFile("test-taghandlers", ".xml"); f.deleteOnExit(); reader.setProperty(X4OLanguagePropertyKeys.DEBUG_OUTPUT_STREAM, new
f.deleteOnExit(); * FileOutputStream(f)); try { reader.readResource("tests/test-taghandlers.xml"); } catch (Exception e) { printS(e); }
reader.setProperty(X4OLanguagePropertyKeys.DEBUG_OUTPUT_STREAM, new FileOutputStream(f));
try {
reader.readResource("tests/test-taghandlers.xml");
} catch (Exception e) {
printS(e);
}
*/ */
} }
} }

View file

@ -26,7 +26,6 @@ import javax.swing.JFrame;
import org.x4o.xml.element.AbstractElement; import org.x4o.xml.element.AbstractElement;
/** /**
* *
* @author Willem Cazander * @author Willem Cazander

View file

@ -22,12 +22,10 @@
*/ */
package org.x4o.xml.test.element; package org.x4o.xml.test.element;
import org.x4o.xml.element.AbstractElementConfigurator; import org.x4o.xml.element.AbstractElementConfigurator;
import org.x4o.xml.element.Element; import org.x4o.xml.element.Element;
import org.x4o.xml.element.ElementConfiguratorException; import org.x4o.xml.element.ElementConfiguratorException;
/** /**
* TestElementConfigurator * TestElementConfigurator
* *

View file

@ -42,30 +42,35 @@ public class TestAttributeOrderChild extends TestObjectChild {
public String getCaaName() { public String getCaaName() {
return caaName; return caaName;
} }
/** /**
* @param caaName the caaName to set * @param caaName the caaName to set
*/ */
public void setCaaName(String caaName) { public void setCaaName(String caaName) {
this.caaName = caaName; this.caaName = caaName;
} }
/** /**
* @return the cabName * @return the cabName
*/ */
public String getCabName() { public String getCabName() {
return cabName; return cabName;
} }
/** /**
* @param cabName the cabName to set * @param cabName the cabName to set
*/ */
public void setCabName(String cabName) { public void setCabName(String cabName) {
this.cabName = cabName; this.cabName = cabName;
} }
/** /**
* @return the cacName * @return the cacName
*/ */
public String getCacName() { public String getCacName() {
return cacName; return cacName;
} }
/** /**
* @param cacName the cacName to set * @param cacName the cacName to set
*/ */
@ -79,66 +84,77 @@ public class TestAttributeOrderChild extends TestObjectChild {
public String getAaaName() { public String getAaaName() {
return aaaName; return aaaName;
} }
/** /**
* @param aaaName the aaaName to set * @param aaaName the aaaName to set
*/ */
public void setAaaName(String aaaName) { public void setAaaName(String aaaName) {
this.aaaName = aaaName; this.aaaName = aaaName;
} }
/** /**
* @return the aabName * @return the aabName
*/ */
public String getAabName() { public String getAabName() {
return aabName; return aabName;
} }
/** /**
* @param aabName the aabName to set * @param aabName the aabName to set
*/ */
public void setAabName(String aabName) { public void setAabName(String aabName) {
this.aabName = aabName; this.aabName = aabName;
} }
/** /**
* @return the aacName * @return the aacName
*/ */
public String getAacName() { public String getAacName() {
return aacName; return aacName;
} }
/** /**
* @param aacName the aacName to set * @param aacName the aacName to set
*/ */
public void setAacName(String aacName) { public void setAacName(String aacName) {
this.aacName = aacName; this.aacName = aacName;
} }
/** /**
* @return the abaName * @return the abaName
*/ */
public String getAbaName() { public String getAbaName() {
return abaName; return abaName;
} }
/** /**
* @param abaName the abaName to set * @param abaName the abaName to set
*/ */
public void setAbaName(String abaName) { public void setAbaName(String abaName) {
this.abaName = abaName; this.abaName = abaName;
} }
/** /**
* @return the abbName * @return the abbName
*/ */
public String getAbbName() { public String getAbbName() {
return abbName; return abbName;
} }
/** /**
* @param abbName the abbName to set * @param abbName the abbName to set
*/ */
public void setAbbName(String abbName) { public void setAbbName(String abbName) {
this.abbName = abbName; this.abbName = abbName;
} }
/** /**
* @return the abcName * @return the abcName
*/ */
public String getAbcName() { public String getAbcName() {
return abcName; return abcName;
} }
/** /**
* @param abcName the abcName to set * @param abcName the abcName to set
*/ */

View file

@ -87,7 +87,6 @@ public class TestBean {
private String privateStringObjectFieldUnicode仙上主天 = "仙上主天"; private String privateStringObjectFieldUnicode仙上主天 = "仙上主天";
// private Date privateDateObjectField = new Date(0); // private Date privateDateObjectField = new Date(0);
// auto gen , get/set-ers // auto gen , get/set-ers
/** /**
@ -96,180 +95,210 @@ public class TestBean {
public int getPublicIntegerTypeField() { public int getPublicIntegerTypeField() {
return publicIntegerTypeField; return publicIntegerTypeField;
} }
/** /**
* @param publicIntegerTypeField the publicIntegerTypeField to set * @param publicIntegerTypeField the publicIntegerTypeField to set
*/ */
public void setPublicIntegerTypeField(int publicIntegerTypeField) { public void setPublicIntegerTypeField(int publicIntegerTypeField) {
this.publicIntegerTypeField = publicIntegerTypeField; this.publicIntegerTypeField = publicIntegerTypeField;
} }
/** /**
* @return the publicIntegerObjectField * @return the publicIntegerObjectField
*/ */
public Integer getPublicIntegerObjectField() { public Integer getPublicIntegerObjectField() {
return publicIntegerObjectField; return publicIntegerObjectField;
} }
/** /**
* @param publicIntegerObjectField the publicIntegerObjectField to set * @param publicIntegerObjectField the publicIntegerObjectField to set
*/ */
public void setPublicIntegerObjectField(Integer publicIntegerObjectField) { public void setPublicIntegerObjectField(Integer publicIntegerObjectField) {
this.publicIntegerObjectField = publicIntegerObjectField; this.publicIntegerObjectField = publicIntegerObjectField;
} }
/** /**
* @return the publicLongTypeField * @return the publicLongTypeField
*/ */
public long getPublicLongTypeField() { public long getPublicLongTypeField() {
return publicLongTypeField; return publicLongTypeField;
} }
/** /**
* @param publicLongTypeField the publicLongTypeField to set * @param publicLongTypeField the publicLongTypeField to set
*/ */
public void setPublicLongTypeField(long publicLongTypeField) { public void setPublicLongTypeField(long publicLongTypeField) {
this.publicLongTypeField = publicLongTypeField; this.publicLongTypeField = publicLongTypeField;
} }
/** /**
* @return the publicLongObjectField * @return the publicLongObjectField
*/ */
public Long getPublicLongObjectField() { public Long getPublicLongObjectField() {
return publicLongObjectField; return publicLongObjectField;
} }
/** /**
* @param publicLongObjectField the publicLongObjectField to set * @param publicLongObjectField the publicLongObjectField to set
*/ */
public void setPublicLongObjectField(Long publicLongObjectField) { public void setPublicLongObjectField(Long publicLongObjectField) {
this.publicLongObjectField = publicLongObjectField; this.publicLongObjectField = publicLongObjectField;
} }
/** /**
* @return the publicDoubleTypeField * @return the publicDoubleTypeField
*/ */
public double getPublicDoubleTypeField() { public double getPublicDoubleTypeField() {
return publicDoubleTypeField; return publicDoubleTypeField;
} }
/** /**
* @param publicDoubleTypeField the publicDoubleTypeField to set * @param publicDoubleTypeField the publicDoubleTypeField to set
*/ */
public void setPublicDoubleTypeField(double publicDoubleTypeField) { public void setPublicDoubleTypeField(double publicDoubleTypeField) {
this.publicDoubleTypeField = publicDoubleTypeField; this.publicDoubleTypeField = publicDoubleTypeField;
} }
/** /**
* @return the publicDoubleObjectField * @return the publicDoubleObjectField
*/ */
public Double getPublicDoubleObjectField() { public Double getPublicDoubleObjectField() {
return publicDoubleObjectField; return publicDoubleObjectField;
} }
/** /**
* @param publicDoubleObjectField the publicDoubleObjectField to set * @param publicDoubleObjectField the publicDoubleObjectField to set
*/ */
public void setPublicDoubleObjectField(Double publicDoubleObjectField) { public void setPublicDoubleObjectField(Double publicDoubleObjectField) {
this.publicDoubleObjectField = publicDoubleObjectField; this.publicDoubleObjectField = publicDoubleObjectField;
} }
/** /**
* @return the publicFloatTypeField * @return the publicFloatTypeField
*/ */
public float getPublicFloatTypeField() { public float getPublicFloatTypeField() {
return publicFloatTypeField; return publicFloatTypeField;
} }
/** /**
* @param publicFloatTypeField the publicFloatTypeField to set * @param publicFloatTypeField the publicFloatTypeField to set
*/ */
public void setPublicFloatTypeField(float publicFloatTypeField) { public void setPublicFloatTypeField(float publicFloatTypeField) {
this.publicFloatTypeField = publicFloatTypeField; this.publicFloatTypeField = publicFloatTypeField;
} }
/** /**
* @return the publicFloatObjectField * @return the publicFloatObjectField
*/ */
public Float getPublicFloatObjectField() { public Float getPublicFloatObjectField() {
return publicFloatObjectField; return publicFloatObjectField;
} }
/** /**
* @param publicFloatObjectField the publicFloatObjectField to set * @param publicFloatObjectField the publicFloatObjectField to set
*/ */
public void setPublicFloatObjectField(Float publicFloatObjectField) { public void setPublicFloatObjectField(Float publicFloatObjectField) {
this.publicFloatObjectField = publicFloatObjectField; this.publicFloatObjectField = publicFloatObjectField;
} }
/** /**
* @return the publicByteTypeField * @return the publicByteTypeField
*/ */
public byte getPublicByteTypeField() { public byte getPublicByteTypeField() {
return publicByteTypeField; return publicByteTypeField;
} }
/** /**
* @param publicByteTypeField the publicByteTypeField to set * @param publicByteTypeField the publicByteTypeField to set
*/ */
public void setPublicByteTypeField(byte publicByteTypeField) { public void setPublicByteTypeField(byte publicByteTypeField) {
this.publicByteTypeField = publicByteTypeField; this.publicByteTypeField = publicByteTypeField;
} }
/** /**
* @return the publicByteObjectField * @return the publicByteObjectField
*/ */
public Byte getPublicByteObjectField() { public Byte getPublicByteObjectField() {
return publicByteObjectField; return publicByteObjectField;
} }
/** /**
* @param publicByteObjectField the publicByteObjectField to set * @param publicByteObjectField the publicByteObjectField to set
*/ */
public void setPublicByteObjectField(Byte publicByteObjectField) { public void setPublicByteObjectField(Byte publicByteObjectField) {
this.publicByteObjectField = publicByteObjectField; this.publicByteObjectField = publicByteObjectField;
} }
/** /**
* @return the publicBooleanTypeField * @return the publicBooleanTypeField
*/ */
public boolean isPublicBooleanTypeField() { public boolean isPublicBooleanTypeField() {
return publicBooleanTypeField; return publicBooleanTypeField;
} }
/** /**
* @param publicBooleanTypeField the publicBooleanTypeField to set * @param publicBooleanTypeField the publicBooleanTypeField to set
*/ */
public void setPublicBooleanTypeField(boolean publicBooleanTypeField) { public void setPublicBooleanTypeField(boolean publicBooleanTypeField) {
this.publicBooleanTypeField = publicBooleanTypeField; this.publicBooleanTypeField = publicBooleanTypeField;
} }
/** /**
* @return the publicBooleanObjectField * @return the publicBooleanObjectField
*/ */
public Boolean getPublicBooleanObjectField() { public Boolean getPublicBooleanObjectField() {
return publicBooleanObjectField; return publicBooleanObjectField;
} }
/** /**
* @param publicBooleanObjectField the publicBooleanObjectField to set * @param publicBooleanObjectField the publicBooleanObjectField to set
*/ */
public void setPublicBooleanObjectField(Boolean publicBooleanObjectField) { public void setPublicBooleanObjectField(Boolean publicBooleanObjectField) {
this.publicBooleanObjectField = publicBooleanObjectField; this.publicBooleanObjectField = publicBooleanObjectField;
} }
/** /**
* @return the publicCharTypeField * @return the publicCharTypeField
*/ */
public char getPublicCharTypeField() { public char getPublicCharTypeField() {
return publicCharTypeField; return publicCharTypeField;
} }
/** /**
* @param publicCharTypeField the publicCharTypeField to set * @param publicCharTypeField the publicCharTypeField to set
*/ */
public void setPublicCharTypeField(char publicCharTypeField) { public void setPublicCharTypeField(char publicCharTypeField) {
this.publicCharTypeField = publicCharTypeField; this.publicCharTypeField = publicCharTypeField;
} }
/** /**
* @return the publicCharObjectField * @return the publicCharObjectField
*/ */
public Character getPublicCharObjectField() { public Character getPublicCharObjectField() {
return publicCharObjectField; return publicCharObjectField;
} }
/** /**
* @param publicCharObjectField the publicCharObjectField to set * @param publicCharObjectField the publicCharObjectField to set
*/ */
public void setPublicCharObjectField(Character publicCharObjectField) { public void setPublicCharObjectField(Character publicCharObjectField) {
this.publicCharObjectField = publicCharObjectField; this.publicCharObjectField = publicCharObjectField;
} }
/** /**
* @return the publicStringObjectField * @return the publicStringObjectField
*/ */
public String getPublicStringObjectField() { public String getPublicStringObjectField() {
return publicStringObjectField; return publicStringObjectField;
} }
/** /**
* @param publicStringObjectField the publicStringObjectField to set * @param publicStringObjectField the publicStringObjectField to set
*/ */
public void setPublicStringObjectField(String publicStringObjectField) { public void setPublicStringObjectField(String publicStringObjectField) {
this.publicStringObjectField = publicStringObjectField; this.publicStringObjectField = publicStringObjectField;
} }
// /** // /**
// * @return the publicStringObjectFieldUnicodeᒡᒢᑊᒻᒻᓫᔿ // * @return the publicStringObjectFieldUnicodeᒡᒢᑊᒻᒻᓫᔿ
// */ // */
@ -288,204 +317,234 @@ public class TestBean {
public String getPublicStringObjectFieldUnicode仙上主天() { public String getPublicStringObjectFieldUnicode仙上主天() {
return publicStringObjectFieldUnicode仙上主天; return publicStringObjectFieldUnicode仙上主天;
} }
/** /**
* @param publicStringObjectFieldUnicode仙上主天 the publicStringObjectFieldUnicode仙上主天 to set * @param publicStringObjectFieldUnicode仙上主天 the publicStringObjectFieldUnicode仙上主天 to set
*/ */
public void setPublicStringObjectFieldUnicode仙上主天(String publicStringObjectFieldUnicode仙上主天) { public void setPublicStringObjectFieldUnicode仙上主天(String publicStringObjectFieldUnicode仙上主天) {
this.publicStringObjectFieldUnicode仙上主天 = publicStringObjectFieldUnicode仙上主天; this.publicStringObjectFieldUnicode仙上主天 = publicStringObjectFieldUnicode仙上主天;
} }
/* /*
* @return the publicDateObjectField * @return the publicDateObjectField
*
public Date getPublicDateObjectField() { * public Date getPublicDateObjectField() { return publicDateObjectField; }
return publicDateObjectField; */
}*/
/* /*
* @param publicDateObjectField the publicDateObjectField to set * @param publicDateObjectField the publicDateObjectField to set
*
public void setPublicDateObjectField(Date publicDateObjectField) { * public void setPublicDateObjectField(Date publicDateObjectField) { this.publicDateObjectField = publicDateObjectField; }
this.publicDateObjectField = publicDateObjectField; */
}*/
/** /**
* @return the privateIntegerTypeField * @return the privateIntegerTypeField
*/ */
public int getPrivateIntegerTypeField() { public int getPrivateIntegerTypeField() {
return privateIntegerTypeField; return privateIntegerTypeField;
} }
/** /**
* @param privateIntegerTypeField the privateIntegerTypeField to set * @param privateIntegerTypeField the privateIntegerTypeField to set
*/ */
public void setPrivateIntegerTypeField(int privateIntegerTypeField) { public void setPrivateIntegerTypeField(int privateIntegerTypeField) {
this.privateIntegerTypeField = privateIntegerTypeField; this.privateIntegerTypeField = privateIntegerTypeField;
} }
/** /**
* @return the privateIntegerObjectField * @return the privateIntegerObjectField
*/ */
public Integer getPrivateIntegerObjectField() { public Integer getPrivateIntegerObjectField() {
return privateIntegerObjectField; return privateIntegerObjectField;
} }
/** /**
* @param privateIntegerObjectField the privateIntegerObjectField to set * @param privateIntegerObjectField the privateIntegerObjectField to set
*/ */
public void setPrivateIntegerObjectField(Integer privateIntegerObjectField) { public void setPrivateIntegerObjectField(Integer privateIntegerObjectField) {
this.privateIntegerObjectField = privateIntegerObjectField; this.privateIntegerObjectField = privateIntegerObjectField;
} }
/** /**
* @return the privateLongTypeField * @return the privateLongTypeField
*/ */
public long getPrivateLongTypeField() { public long getPrivateLongTypeField() {
return privateLongTypeField; return privateLongTypeField;
} }
/** /**
* @param privateLongTypeField the privateLongTypeField to set * @param privateLongTypeField the privateLongTypeField to set
*/ */
public void setPrivateLongTypeField(long privateLongTypeField) { public void setPrivateLongTypeField(long privateLongTypeField) {
this.privateLongTypeField = privateLongTypeField; this.privateLongTypeField = privateLongTypeField;
} }
/** /**
* @return the privateLongObjectField * @return the privateLongObjectField
*/ */
public Long getPrivateLongObjectField() { public Long getPrivateLongObjectField() {
return privateLongObjectField; return privateLongObjectField;
} }
/** /**
* @param privateLongObjectField the privateLongObjectField to set * @param privateLongObjectField the privateLongObjectField to set
*/ */
public void setPrivateLongObjectField(Long privateLongObjectField) { public void setPrivateLongObjectField(Long privateLongObjectField) {
this.privateLongObjectField = privateLongObjectField; this.privateLongObjectField = privateLongObjectField;
} }
/** /**
* @return the privateDoubleTypeField * @return the privateDoubleTypeField
*/ */
public double getPrivateDoubleTypeField() { public double getPrivateDoubleTypeField() {
return privateDoubleTypeField; return privateDoubleTypeField;
} }
/** /**
* @param privateDoubleTypeField the privateDoubleTypeField to set * @param privateDoubleTypeField the privateDoubleTypeField to set
*/ */
public void setPrivateDoubleTypeField(double privateDoubleTypeField) { public void setPrivateDoubleTypeField(double privateDoubleTypeField) {
this.privateDoubleTypeField = privateDoubleTypeField; this.privateDoubleTypeField = privateDoubleTypeField;
} }
/** /**
* @return the privateDoubleObjectField * @return the privateDoubleObjectField
*/ */
public Double getPrivateDoubleObjectField() { public Double getPrivateDoubleObjectField() {
return privateDoubleObjectField; return privateDoubleObjectField;
} }
/** /**
* @param privateDoubleObjectField the privateDoubleObjectField to set * @param privateDoubleObjectField the privateDoubleObjectField to set
*/ */
public void setPrivateDoubleObjectField(Double privateDoubleObjectField) { public void setPrivateDoubleObjectField(Double privateDoubleObjectField) {
this.privateDoubleObjectField = privateDoubleObjectField; this.privateDoubleObjectField = privateDoubleObjectField;
} }
/** /**
* @return the privateFloatTypeField * @return the privateFloatTypeField
*/ */
public float getPrivateFloatTypeField() { public float getPrivateFloatTypeField() {
return privateFloatTypeField; return privateFloatTypeField;
} }
/** /**
* @param privateFloatTypeField the privateFloatTypeField to set * @param privateFloatTypeField the privateFloatTypeField to set
*/ */
public void setPrivateFloatTypeField(float privateFloatTypeField) { public void setPrivateFloatTypeField(float privateFloatTypeField) {
this.privateFloatTypeField = privateFloatTypeField; this.privateFloatTypeField = privateFloatTypeField;
} }
/** /**
* @return the privateFloatObjectField * @return the privateFloatObjectField
*/ */
public Float getPrivateFloatObjectField() { public Float getPrivateFloatObjectField() {
return privateFloatObjectField; return privateFloatObjectField;
} }
/** /**
* @param privateFloatObjectField the privateFloatObjectField to set * @param privateFloatObjectField the privateFloatObjectField to set
*/ */
public void setPrivateFloatObjectField(Float privateFloatObjectField) { public void setPrivateFloatObjectField(Float privateFloatObjectField) {
this.privateFloatObjectField = privateFloatObjectField; this.privateFloatObjectField = privateFloatObjectField;
} }
/** /**
* @return the privateByteTypeField * @return the privateByteTypeField
*/ */
public byte getPrivateByteTypeField() { public byte getPrivateByteTypeField() {
return privateByteTypeField; return privateByteTypeField;
} }
/** /**
* @param privateByteTypeField the privateByteTypeField to set * @param privateByteTypeField the privateByteTypeField to set
*/ */
public void setPrivateByteTypeField(byte privateByteTypeField) { public void setPrivateByteTypeField(byte privateByteTypeField) {
this.privateByteTypeField = privateByteTypeField; this.privateByteTypeField = privateByteTypeField;
} }
/** /**
* @return the privateByteObjectField * @return the privateByteObjectField
*/ */
public Byte getPrivateByteObjectField() { public Byte getPrivateByteObjectField() {
return privateByteObjectField; return privateByteObjectField;
} }
/** /**
* @param privateByteObjectField the privateByteObjectField to set * @param privateByteObjectField the privateByteObjectField to set
*/ */
public void setPrivateByteObjectField(Byte privateByteObjectField) { public void setPrivateByteObjectField(Byte privateByteObjectField) {
this.privateByteObjectField = privateByteObjectField; this.privateByteObjectField = privateByteObjectField;
} }
/** /**
* @return the privateBooleanTypeField * @return the privateBooleanTypeField
*/ */
public boolean isPrivateBooleanTypeField() { public boolean isPrivateBooleanTypeField() {
return privateBooleanTypeField; return privateBooleanTypeField;
} }
/** /**
* @param privateBooleanTypeField the privateBooleanTypeField to set * @param privateBooleanTypeField the privateBooleanTypeField to set
*/ */
public void setPrivateBooleanTypeField(boolean privateBooleanTypeField) { public void setPrivateBooleanTypeField(boolean privateBooleanTypeField) {
this.privateBooleanTypeField = privateBooleanTypeField; this.privateBooleanTypeField = privateBooleanTypeField;
} }
/** /**
* @return the privateBooleanObjectField * @return the privateBooleanObjectField
*/ */
public Boolean getPrivateBooleanObjectField() { public Boolean getPrivateBooleanObjectField() {
return privateBooleanObjectField; return privateBooleanObjectField;
} }
/** /**
* @param privateBooleanObjectField the privateBooleanObjectField to set * @param privateBooleanObjectField the privateBooleanObjectField to set
*/ */
public void setPrivateBooleanObjectField(Boolean privateBooleanObjectField) { public void setPrivateBooleanObjectField(Boolean privateBooleanObjectField) {
this.privateBooleanObjectField = privateBooleanObjectField; this.privateBooleanObjectField = privateBooleanObjectField;
} }
/** /**
* @return the privateCharTypeField * @return the privateCharTypeField
*/ */
public char getPrivateCharTypeField() { public char getPrivateCharTypeField() {
return privateCharTypeField; return privateCharTypeField;
} }
/** /**
* @param privateCharTypeField the privateCharTypeField to set * @param privateCharTypeField the privateCharTypeField to set
*/ */
public void setPrivateCharTypeField(char privateCharTypeField) { public void setPrivateCharTypeField(char privateCharTypeField) {
this.privateCharTypeField = privateCharTypeField; this.privateCharTypeField = privateCharTypeField;
} }
/** /**
* @return the privateCharObjectField * @return the privateCharObjectField
*/ */
public Character getPrivateCharObjectField() { public Character getPrivateCharObjectField() {
return privateCharObjectField; return privateCharObjectField;
} }
/** /**
* @param privateCharObjectField the privateCharObjectField to set * @param privateCharObjectField the privateCharObjectField to set
*/ */
public void setPrivateCharObjectField(Character privateCharObjectField) { public void setPrivateCharObjectField(Character privateCharObjectField) {
this.privateCharObjectField = privateCharObjectField; this.privateCharObjectField = privateCharObjectField;
} }
/** /**
* @return the privateStringObjectField * @return the privateStringObjectField
*/ */
public String getPrivateStringObjectField() { public String getPrivateStringObjectField() {
return privateStringObjectField; return privateStringObjectField;
} }
/** /**
* @param privateStringObjectField the privateStringObjectField to set * @param privateStringObjectField the privateStringObjectField to set
*/ */
public void setPrivateStringObjectField(String privateStringObjectField) { public void setPrivateStringObjectField(String privateStringObjectField) {
this.privateStringObjectField = privateStringObjectField; this.privateStringObjectField = privateStringObjectField;
} }
// /** // /**
// * @return the privateStringObjectFieldUnicodeᒡᒢᑊᒻᒻᓫᔿ // * @return the privateStringObjectFieldUnicodeᒡᒢᑊᒻᒻᓫᔿ
// */ // */
@ -504,6 +563,7 @@ public class TestBean {
public String getPrivateStringObjectFieldUnicode仙上主天() { public String getPrivateStringObjectFieldUnicode仙上主天() {
return privateStringObjectFieldUnicode仙上主天; return privateStringObjectFieldUnicode仙上主天;
} }
/** /**
* @param privateStringObjectFieldUnicode仙上主天 the privateStringObjectFieldUnicode仙上主天 to set * @param privateStringObjectFieldUnicode仙上主天 the privateStringObjectFieldUnicode仙上主天 to set
*/ */
@ -512,14 +572,12 @@ public class TestBean {
} }
/* /*
* @return the privateDateObjectField * @return the privateDateObjectField
*
public Date getPrivateDateObjectField() { * public Date getPrivateDateObjectField() { return privateDateObjectField; }
return privateDateObjectField; */
}*/
/* /*
* @param privateDateObjectField the privateDateObjectField to set * @param privateDateObjectField the privateDateObjectField to set
*
public void setPrivateDateObjectField(Date privateDateObjectField) { * public void setPrivateDateObjectField(Date privateDateObjectField) { this.privateDateObjectField = privateDateObjectField; }
this.privateDateObjectField = privateDateObjectField; */
}*/
} }

View file

@ -30,12 +30,35 @@ public class TestObjectChild {
private Object parent = null; private Object parent = null;
// Some test methods // Some test methods
public String getName() { return name; } public String getName() {
public void setName(String name) { this.name = name; } return name;
public Integer getPrice() { return price; } }
public void setPrice(Integer price) { this.price = price; }
public Double getSize() { return size; } public void setName(String name) {
public void setSize(Double size) { this.size = size; } this.name = name;
public Object getParent() { return parent; } }
public void setParent(Object parent) { this.parent = parent; }
public Integer getPrice() {
return price;
}
public void setPrice(Integer price) {
this.price = price;
}
public Double getSize() {
return size;
}
public void setSize(Double size) {
this.size = size;
}
public Object getParent() {
return parent;
}
public void setParent(Object parent) {
this.parent = parent;
}
} }

View file

@ -76,5 +76,4 @@ public class TestObjectRoot {
return testObjects; return testObjects;
} }
} }

View file

@ -31,8 +31,7 @@ import javax.swing.JOptionPane;
/** /**
* Accelerator2 test demo. * Accelerator2 test demo.
* *
* see swixml sample; http://www.swixml.org/samples/src/Accelerator.java * see swixml sample; http://www.swixml.org/samples/src/Accelerator.java Added exitMethod and render boolean for unit testing.
* Added exitMethod and render boolean for unit testing.
* *
* @author Willem Cazander * @author Willem Cazander
* @version 1.0 Aug 15, 2012 * @version 1.0 Aug 15, 2012

View file

@ -47,11 +47,13 @@ public class SwiXmlDriver extends X4ODriver<Component> {
/** /**
* Helper for while parsing to get the SwingEngine. * Helper for while parsing to get the SwingEngine.
*
* @param elementLanguage The elementLanguage to get the swingEngine out. * @param elementLanguage The elementLanguage to get the swingEngine out.
* @return Returns the SwingEngine for this elementLanguage. * @return Returns the SwingEngine for this elementLanguage.
*/ */
static public SwingEngine getSwingEngine(X4OLanguageSession elementLanguage) { static public SwingEngine getSwingEngine(X4OLanguageSession elementLanguage) {
ValueExpression ee = elementLanguage.getExpressionLanguageFactory().createValueExpression(elementLanguage.getExpressionLanguageContext(),"${"+SwiXmlDriver.LANGUAGE_EL_SWING_ENGINE+"}",Object.class); ValueExpression ee = elementLanguage.getExpressionLanguageFactory().createValueExpression(elementLanguage.getExpressionLanguageContext(),
"${" + SwiXmlDriver.LANGUAGE_EL_SWING_ENGINE + "}", Object.class);
SwingEngine se = (SwingEngine) ee.getValue(elementLanguage.getExpressionLanguageContext()); SwingEngine se = (SwingEngine) ee.getValue(elementLanguage.getExpressionLanguageContext());
return se; return se;
} }

View file

@ -76,5 +76,4 @@ public class ColorConverter extends AbstractStringObjectConverter {
return result; return result;
} }
} }

View file

@ -52,7 +52,6 @@ public class IconConverter extends AbstractStringObjectConverter {
public Object convertStringTo(String str, Locale locale) throws ObjectConverterException { public Object convertStringTo(String str, Locale locale) throws ObjectConverterException {
try { try {
Icon icon = UIManager.getIcon("OptionPane.questionIcon"); Icon icon = UIManager.getIcon("OptionPane.questionIcon");
return icon; return icon;
} catch (Exception e) { } catch (Exception e) {
throw new ObjectConverterException(this, e.getMessage(), e); throw new ObjectConverterException(this, e.getMessage(), e);
@ -66,5 +65,4 @@ public class IconConverter extends AbstractStringObjectConverter {
return result; return result;
} }
} }

View file

@ -65,5 +65,4 @@ public class KeyStrokeConverter extends AbstractStringObjectConverter {
return result; return result;
} }
} }

View file

@ -106,5 +106,4 @@ public class LayoutConverter extends AbstractStringObjectConverter {
return result; return result;
} }
} }

View file

@ -39,6 +39,5 @@ public interface MaisDocProjectPerspectiveWing {
// use: doc.addConcept // use: doc.addConcept
// use: doc.addDocPage // use: doc.addDocPage
// use: waspNode.addNode // use: waspNode.addNode
} }

View file

@ -55,6 +55,7 @@ public class MaisDocWriter {
private final static String PROPERTY_CONTEXT_PREFIX = SAX3PropertyConfig.X4O_PROPERTIES_PREFIX + "api-doc/"; private final static String PROPERTY_CONTEXT_PREFIX = SAX3PropertyConfig.X4O_PROPERTIES_PREFIX + "api-doc/";
public final static SAX3PropertyConfig DEFAULT_PROPERTY_CONFIG; public final static SAX3PropertyConfig DEFAULT_PROPERTY_CONFIG;
//@formatter:off
public final static String OUTPUT_PATH = PROPERTY_CONTEXT_PREFIX+"output/path"; public final static String OUTPUT_PATH = PROPERTY_CONTEXT_PREFIX+"output/path";
public final static String DOC_NAME = PROPERTY_CONTEXT_PREFIX+"doc/name"; public final static String DOC_NAME = PROPERTY_CONTEXT_PREFIX+"doc/name";
public final static String DOC_DESCRIPTION = PROPERTY_CONTEXT_PREFIX+"doc/description"; public final static String DOC_DESCRIPTION = PROPERTY_CONTEXT_PREFIX+"doc/description";
@ -92,6 +93,7 @@ public class MaisDocWriter {
new PropertyConfigItem(PAGE_PRINT_HELP,Boolean.class,true) new PropertyConfigItem(PAGE_PRINT_HELP,Boolean.class,true)
); );
} }
//@formatter:on
/** The config of this writer. */ /** The config of this writer. */
private final SAX3PropertyConfig propertyConfig; private final SAX3PropertyConfig propertyConfig;
@ -103,6 +105,7 @@ public class MaisDocWriter {
/** /**
* Writes the language documentation to the base path. * Writes the language documentation to the base path.
*
* @throws IOException Is thrown when error is done. * @throws IOException Is thrown when error is done.
*/ */
public void writeDocumentation() throws IOException { public void writeDocumentation() throws IOException {
@ -114,6 +117,7 @@ public class MaisDocWriter {
/** /**
* Creates a fully configured ApiDoc object. * Creates a fully configured ApiDoc object.
*
* @return The ApiDoc configured to write eld documentation. * @return The ApiDoc configured to write eld documentation.
*/ */
private MaisDoc buildLanguageDoc() { private MaisDoc buildLanguageDoc() {

View file

@ -40,7 +40,8 @@ import org.x4o.sax3.SAX3WriterHtml.Tag;
public class DefaultPageWriterHelp implements MaisDocPageWriter { public class DefaultPageWriterHelp implements MaisDocPageWriter {
public static MaisDocPage createDocPage() { public static MaisDocPage createDocPage() {
return new MaisDocPage("doc-help","Help","This help file applies to the API documentation generated using the standard format.",new DefaultPageWriterHelp()); return new MaisDocPage("doc-help", "Help", "This help file applies to the API documentation generated using the standard format.",
new DefaultPageWriterHelp());
} }
public void writePageContent(MaisDocWriteEvent<MaisDocPage> e) throws IOException { public void writePageContent(MaisDocWriteEvent<MaisDocPage> e) throws IOException {
@ -48,6 +49,7 @@ public class DefaultPageWriterHelp implements MaisDocPageWriter {
// ApiDocPage page = e.getEvent(); // ApiDocPage page = e.getEvent();
MaisDocContentWriter writer = e.getWriter(); MaisDocContentWriter writer = e.getWriter();
//@formatter:off
writer.printTagStart(Tag.div,"header"); writer.printTagStart(Tag.div,"header");
writer.printTagCharacters(Tag.h1, "How This API Document Is Organized", "title"); writer.printTagCharacters(Tag.h1, "How This API Document Is Organized", "title");
writer.printTagStart(Tag.div, "subTitle"); writer.printTagStart(Tag.div, "subTitle");
@ -73,5 +75,6 @@ public class DefaultPageWriterHelp implements MaisDocPageWriter {
} }
writer.docPageBlockEnd(); writer.docPageBlockEnd();
writer.docPageContentEnd(); writer.docPageContentEnd();
//@formatter:on
} }
} }

View file

@ -71,8 +71,7 @@ public enum MaisDocContentCss {
// frame names maybe can be used to create frame-less html5 JS version // frame names maybe can be used to create frame-less html5 JS version
frameNavOverview, frameNavOverview,
frameNavDetail, frameNavDetail,
frameContent, frameContent,;
;
// //
// TODO: write new CSS spec for html root tag to have tag+style class guards in CSS. // TODO: write new CSS spec for html root tag to have tag+style class guards in CSS.
// because this sun css of above defines the allowed (styled) html tree structure. // because this sun css of above defines the allowed (styled) html tree structure.

View file

@ -59,12 +59,7 @@ public interface MaisDocContentPrinter {
} }
default void printApiTable(MaisDocWriteEvent<MaisDocNode> event, String name, Class<?> interfaceClass) throws IOException { default void printApiTable(MaisDocWriteEvent<MaisDocNode> event, String name, Class<?> interfaceClass) throws IOException {
printApiTable( printApiTable(event.getEventObject(), filterUserDataClassType(event.getEventObject(), interfaceClass), event.getWriter(), name);
event.getEventObject(),
filterUserDataClassType(event.getEventObject(),interfaceClass),
event.getWriter(),
name
);
} }
default void printApiTable(MaisDocNode parent, List<MaisDocNode> nodes, MaisDocContentWriter writer, String name) throws IOException { default void printApiTable(MaisDocNode parent, List<MaisDocNode> nodes, MaisDocContentWriter writer, String name) throws IOException {
@ -105,7 +100,8 @@ public interface MaisDocContentPrinter {
printApiTableBeanClass(event.getDoc(), event.getWriter(), null, beanClass, name, skipProperties); printApiTableBeanClass(event.getDoc(), event.getWriter(), null, beanClass, name, skipProperties);
} }
private void printApiTableBeanClass(MaisDoc doc,MaisDocContentWriter writer,Object bean,Class<?> beanClass,String name,String...skipProperties) throws IOException { private void printApiTableBeanClass(MaisDoc doc, MaisDocContentWriter writer, Object bean, Class<?> beanClass, String name, String... skipProperties)
throws IOException {
writer.docTableStart(name + " Properties", name + " properties overview.", MaisDocContentCss.overviewSummary); writer.docTableStart(name + " Properties", name + " properties overview.", MaisDocContentCss.overviewSummary);
writer.docTableHeader("Name", "Value"); writer.docTableHeader("Name", "Value");
for (Method m : beanClass.getMethods()) { for (Method m : beanClass.getMethods()) {

View file

@ -56,6 +56,7 @@ public class MaisDocContentWriter extends SAX3WriterHtml {
printHtmlStart("en"); printHtmlStart("en");
// ====== Write head // ====== Write head
//@formatter:off
printTagStart(Tag.head); printTagStart(Tag.head);
docCommentGenerated(); docCommentGenerated();
printHeadMetaContentType(); printHeadMetaContentType();
@ -67,6 +68,7 @@ public class MaisDocContentWriter extends SAX3WriterHtml {
printHeadLinkCss(pathPrefix+"resources/stylesheet.css"); printHeadLinkCss(pathPrefix+"resources/stylesheet.css");
printScriptSrc(pathPrefix+"resources/api-theme.js"); printScriptSrc(pathPrefix+"resources/api-theme.js");
printTagEnd(Tag.head); printTagEnd(Tag.head);
//@formatter:on
// ======= Write body // ======= Write body
printTagStart(Tag.body); printTagStart(Tag.body);
@ -75,7 +77,9 @@ public class MaisDocContentWriter extends SAX3WriterHtml {
script.append("\n"); script.append("\n");
script.append("\tif (location.href.indexOf('is-external=true') == -1) {\n"); script.append("\tif (location.href.indexOf('is-external=true') == -1) {\n");
script.append("\t\ttry {\n"); script.append("\t\ttry {\n");
script.append("\t\t\tparent.document.title=\"");script.append(title);script.append("\";\n"); script.append("\t\t\tparent.document.title=\"");
script.append(title);
script.append("\";\n");
script.append("\t\t} catch (e) {}\n"); script.append("\t\t} catch (e) {}\n");
script.append("\t}\n"); script.append("\t}\n");
printScriptInline(script.toString()); printScriptInline(script.toString());
@ -83,11 +87,13 @@ public class MaisDocContentWriter extends SAX3WriterHtml {
} }
public void docHtmlEnd(String copyright, String statsJS) throws IOException { public void docHtmlEnd(String copyright, String statsJS) throws IOException {
//@formatter:off
printTagStart(Tag.p,MaisDocContentCss.legalCopy); printTagStart(Tag.p,MaisDocContentCss.legalCopy);
printTagStart(Tag.small); printTagStart(Tag.small);
printCharacters(copyright); printCharacters(copyright);
printTagEnd(Tag.small); printTagEnd(Tag.small);
printTagEnd(Tag.p); printTagEnd(Tag.p);
//@formatter:on
if (statsJS != null) { if (statsJS != null) {
printScriptInline(statsJS); printScriptInline(statsJS);
} }
@ -113,6 +119,7 @@ public class MaisDocContentWriter extends SAX3WriterHtml {
} }
public void docPagePackageTitle(String title, String summary) throws IOException { public void docPagePackageTitle(String title, String summary) throws IOException {
//@formatter:off
printTagStart(Tag.div, MaisDocContentCss.header); printTagStart(Tag.div, MaisDocContentCss.header);
printTagCharacters(Tag.h1, title, "title"); printTagCharacters(Tag.h1, title, "title");
printTagStart(Tag.div, MaisDocContentCss.docSummary); printTagStart(Tag.div, MaisDocContentCss.docSummary);
@ -123,6 +130,7 @@ public class MaisDocContentWriter extends SAX3WriterHtml {
printHref("#package_description", "Description"); printHref("#package_description", "Description");
printTagEnd(Tag.p); printTagEnd(Tag.p);
printTagEnd(Tag.div); printTagEnd(Tag.div);
//@formatter:on
} }
public void docPagePackageDescription(String title, String summary, String description) throws IOException { public void docPagePackageDescription(String title, String summary, String description) throws IOException {
@ -204,10 +212,12 @@ public class MaisDocContentWriter extends SAX3WriterHtml {
} }
printTagStart(Tag.table, atts); printTagStart(Tag.table, atts);
//@formatter:off
printTagStart(Tag.caption); printTagStart(Tag.caption);
printTagStart(Tag.span);printCharacters(tableTitle);printTagEnd(Tag.span); printTagStart(Tag.span);printCharacters(tableTitle);printTagEnd(Tag.span);
printTagStart(Tag.span,MaisDocContentCss.tabEnd);printCharacters("&nbsp;");printTagEnd(Tag.span); printTagStart(Tag.span,MaisDocContentCss.tabEnd);printCharacters("&nbsp;");printTagEnd(Tag.span);
printTagEnd(Tag.caption); printTagEnd(Tag.caption);
//@formatter:on
} }
public void docTableEnd() throws IOException { public void docTableEnd() throws IOException {
@ -270,7 +280,8 @@ public class MaisDocContentWriter extends SAX3WriterHtml {
return () -> printTagEnd(Tag.tr); return () -> printTagEnd(Tag.tr);
} }
private void docTableRowHref(String dataFirstHref, String dataFirst, String dataLast, String dataBlock, boolean dataFirstCode, boolean dataLastCode, boolean skipLast) throws IOException { private void docTableRowHref(String dataFirstHref, String dataFirst, String dataLast, String dataBlock, boolean dataFirstCode, boolean dataLastCode,
boolean skipLast) throws IOException {
Closeable tableRow = docTableRow(); Closeable tableRow = docTableRow();
if (dataLast == null) { if (dataLast == null) {
printTagStart(Tag.td, MaisDocContentCss.colOne); printTagStart(Tag.td, MaisDocContentCss.colOne);
@ -300,6 +311,7 @@ public class MaisDocContentWriter extends SAX3WriterHtml {
return; return;
} }
//@formatter:off
printTagStart(Tag.td,MaisDocContentCss.colLast); printTagStart(Tag.td,MaisDocContentCss.colLast);
if (dataLastCode) { if (dataLastCode) {
printTagStart(Tag.code);printCharacters(dataLast);printTagEnd(Tag.code); printTagStart(Tag.code);printCharacters(dataLast);printTagEnd(Tag.code);
@ -310,11 +322,11 @@ public class MaisDocContentWriter extends SAX3WriterHtml {
printTagStart(Tag.div, MaisDocContentCss.block);printCharacters(dataBlock);printTagEnd(Tag.div); printTagStart(Tag.div, MaisDocContentCss.block);printCharacters(dataBlock);printTagEnd(Tag.div);
} }
printTagEnd(Tag.td); printTagEnd(Tag.td);
//@formatter:on
tableRow.close(); tableRow.close();
} }
static public String toSafeUri(List<String> paths) { static public String toSafeUri(List<String> paths) {
return toSafeUri(paths.toArray(new String[] {})); return toSafeUri(paths.toArray(new String[] {}));
} }

View file

@ -70,6 +70,7 @@ public class MaisDocGenerator implements MaisDocContentPrinter {
/** /**
* Writes full api doc tree files to the base path. * Writes full api doc tree files to the base path.
*
* @param doc The ApiDoc to writer. * @param doc The ApiDoc to writer.
* @param basePath The bath path to write into. * @param basePath The bath path to write into.
* @throws IOException When file exception happens. * @throws IOException When file exception happens.
@ -252,18 +253,30 @@ public class MaisDocGenerator implements MaisDocContentPrinter {
writer.docPageBlockStart(); writer.docPageBlockStart();
} }
if (bodyWriterSummary.isEmpty() && event.getEventObject().getNodes().isEmpty() == false) { if (bodyWriterSummary.isEmpty() && event.getEventObject().getNodes().isEmpty() == false) {
if (!isPageMode) { writer.docPageBlockStart(); } if (!isPageMode) {
writer.docPageBlockStart();
}
defaultWriteSummary(event.getEventObject(), writer); defaultWriteSummary(event.getEventObject(), writer);
if (!isPageMode) { writer.docPageBlockEnd(); } if (!isPageMode) {
writer.docPageBlockEnd();
}
} }
for (int i = 0; i < bodyWriterSummary.size(); i++) { for (int i = 0; i < bodyWriterSummary.size(); i++) {
MaisDocNodeWriter nodeWriter = bodyWriterSummary.get(i); MaisDocNodeWriter nodeWriter = bodyWriterSummary.get(i);
if (!isPageMode) { writer.docPageBlockStart(); } if (!isPageMode) {
writer.docPageBlockStart();
}
writeSubNavNamedHref(event, nodeWriter); writeSubNavNamedHref(event, nodeWriter);
if (!isPageMode) { writer.printTagCharacters(Tag.h3, "Summary"); } if (!isPageMode) {
writer.printTagCharacters(Tag.h3, "Summary");
}
nodeWriter.writeNodeContent(event); nodeWriter.writeNodeContent(event);
if (!isPageMode) { writer.docPageBlockEnd(); } if (!isPageMode) {
if (isPageMode) { writer.printTagStartEnd(Tag.br); } writer.docPageBlockEnd();
}
if (isPageMode) {
writer.printTagStartEnd(Tag.br);
}
} }
if (!isPageMode) { if (!isPageMode) {
writer.docPageBlockEnd(); writer.docPageBlockEnd();
@ -492,9 +505,11 @@ public class MaisDocGenerator implements MaisDocContentPrinter {
private class ApiDocNodeWriterComparator implements Comparator<MaisDocNodeWriter> { private class ApiDocNodeWriterComparator implements Comparator<MaisDocNodeWriter> {
final Class<?> objClass; final Class<?> objClass;
public ApiDocNodeWriterComparator(Class<?> objClass) { public ApiDocNodeWriterComparator(Class<?> objClass) {
this.objClass = objClass; this.objClass = objClass;
} }
public int compare(MaisDocNodeWriter o1, MaisDocNodeWriter o2) { public int compare(MaisDocNodeWriter o1, MaisDocNodeWriter o2) {
int index1 = -1; int index1 = -1;
int index2 = -1; int index2 = -1;
@ -614,17 +629,10 @@ public class MaisDocGenerator implements MaisDocContentPrinter {
writer.printTagEnd(Tag.head); writer.printTagEnd(Tag.head);
} }
private static final String FRAME_JS = "\n"+ private static final String FRAME_JS = "\n" + "targetPage = \"\" + window.location.search;\n" + "if (targetPage != \"\" && targetPage != \"undefined\")\n"
"targetPage = \"\" + window.location.search;\n"+ + "\t { targetPage = targetPage.substring(1); }\n" + "if (targetPage.indexOf(\":\") != -1)\n" + "\t { targetPage = \"undefined\"; }\n"
"if (targetPage != \"\" && targetPage != \"undefined\")\n"+ + "function loadFrames() {\n" + "\tif (targetPage != \"\" && targetPage != \"undefined\")\n" + "\t\t { top." + MaisDocContentCss.frameContent.name()
"\t { targetPage = targetPage.substring(1); }\n"+ + ".location = top.targetPage; }\n" + "}\n";
"if (targetPage.indexOf(\":\") != -1)\n"+
"\t { targetPage = \"undefined\"; }\n"+
"function loadFrames() {\n"+
"\tif (targetPage != \"\" && targetPage != \"undefined\")\n"+
"\t\t { top."+MaisDocContentCss.frameContent.name()+".location = top.targetPage; }\n"+
"}\n";
public void writeIndex() throws IOException { public void writeIndex() throws IOException {
File outputFile = createOutputPathFile(basePath, "index.html"); File outputFile = createOutputPathFile(basePath, "index.html");
@ -675,7 +683,8 @@ public class MaisDocGenerator implements MaisDocContentPrinter {
writer.printScriptNoDiv(); writer.printScriptNoDiv();
writer.printTagCharacters(Tag.h2, "Frame Alert"); writer.printTagCharacters(Tag.h2, "Frame Alert");
writer.printTagStart(Tag.p); writer.printTagStart(Tag.p);
writer.printCharacters("This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to "); writer.printCharacters(
"This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to ");
writer.printHref(rootLink, "Non-frame version"); writer.printHref(rootLink, "Non-frame version");
writer.printCharacters("."); writer.printCharacters(".");
writer.printTagEnd(Tag.p); writer.printTagEnd(Tag.p);
@ -817,7 +826,8 @@ public class MaisDocGenerator implements MaisDocContentPrinter {
if (searchNode.getParent() != null && !node.getParent().getParent().getId().equals(searchNode.getParent().getId())) { if (searchNode.getParent() != null && !node.getParent().getParent().getId().equals(searchNode.getParent().getId())) {
continue; continue;
} }
if (searchNode.getParent().getParent()!=null && !node.getParent().getParent().getParent().getId().equals(searchNode.getParent().getParent().getId())) { if (searchNode.getParent().getParent() != null
&& !node.getParent().getParent().getParent().getId().equals(searchNode.getParent().getParent().getId())) {
continue; continue;
} }
} }
@ -1058,7 +1068,6 @@ public class MaisDocGenerator implements MaisDocContentPrinter {
writer.printScriptInline(buf.toString()); writer.printScriptInline(buf.toString());
} }
writer.docNavBarAbout(doc.getDocAbout()); writer.docNavBarAbout(doc.getDocAbout());
writer.printTagEnd(Tag.div); // end barCssDiv writer.printTagEnd(Tag.div); // end barCssDiv
@ -1128,7 +1137,9 @@ public class MaisDocGenerator implements MaisDocContentPrinter {
writer.printTagStart(Tag.div); // don't print empty div writer.printTagStart(Tag.div); // don't print empty div
} }
writer.printTagStart(Tag.ul, MaisDocContentCss.subNavList); writer.printTagStart(Tag.ul, MaisDocContentCss.subNavList);
writer.printTagStart(Tag.li);writer.printCharacters(groupName+":&nbsp;");writer.printTagEnd(Tag.li); writer.printTagStart(Tag.li);
writer.printCharacters(groupName + ":&nbsp;");
writer.printTagEnd(Tag.li);
for (int l = 0; l < links.size(); l++) { for (int l = 0; l < links.size(); l++) {
MaisDocNavLink link = links.get(l); MaisDocNavLink link = links.get(l);
writer.printTagStart(Tag.li); writer.printTagStart(Tag.li);
@ -1158,7 +1169,8 @@ public class MaisDocGenerator implements MaisDocContentPrinter {
writer.printComment("========= END OF " + barComment + " NAVBAR ======="); writer.printComment("========= END OF " + barComment + " NAVBAR =======");
} }
private void docNavBarListItemHref(MaisDocContentWriter writer, String href, String title, String text, String cssClass, String spanCss, String linkSpace) throws IOException { private void docNavBarListItemHref(MaisDocContentWriter writer, String href, String title, String text, String cssClass, String spanCss, String linkSpace)
throws IOException {
writer.printTagStart(Tag.li, cssClass); writer.printTagStart(Tag.li, cssClass);
writer.printHref(href, text, title, spanCss); writer.printHref(href, text, title, spanCss);
writer.printCharacters(linkSpace); writer.printCharacters(linkSpace);

View file

@ -79,7 +79,8 @@ public class MaisDocNodeWriterBean implements MaisDocNodeWriter {
throw new IllegalArgumentException("Can't configure writer bean with empty 'targetClasses' parameter."); throw new IllegalArgumentException("Can't configure writer bean with empty 'targetClasses' parameter.");
} }
if (ammo.targetClasses().length != ammo.nodeBodyOrders().length) { if (ammo.targetClasses().length != ammo.nodeBodyOrders().length) {
throw new IllegalArgumentException("Can't configure writer bean with non-equal array size of 'nodeBodyOrders'("+ammo.nodeBodyOrders().length+") and 'targetClasses'("+ammo.targetClasses().length+") parameters."); throw new IllegalArgumentException("Can't configure writer bean with non-equal array size of 'nodeBodyOrders'(" + ammo.nodeBodyOrders().length
+ ") and 'targetClasses'(" + ammo.targetClasses().length + ") parameters.");
} }
MaisDocNodeWriterBean methodWriter = new MaisDocNodeWriterBean(ammo.nodeBody(), bean, method.getName(), ammo.targetClasses()); MaisDocNodeWriterBean methodWriter = new MaisDocNodeWriterBean(ammo.nodeBody(), bean, method.getName(), ammo.targetClasses());
List<Integer> nodeBodyOrder = new ArrayList<Integer>(); List<Integer> nodeBodyOrder = new ArrayList<Integer>();

View file

@ -122,12 +122,12 @@ public class MaisDoc {
setMetaStyleSheetThema("jdk7"); setMetaStyleSheetThema("jdk7");
} }
if (noFrameAllTopJS == null) { if (noFrameAllTopJS == null) {
noFrameAllTopJS = "\nallClassesLink = document.getElementById(\"allclasses_navbar_top\");\n"+ noFrameAllTopJS = "\nallClassesLink = document.getElementById(\"allclasses_navbar_top\");\n"
"if(window==top) {\n\tallClassesLink.style.display = \"block\";\n} else {\n\tallClassesLink.style.display = \"none\";\n}\n"; + "if(window==top) {\n\tallClassesLink.style.display = \"block\";\n} else {\n\tallClassesLink.style.display = \"none\";\n}\n";
} }
if (noFrameAllBottomJS == null) { if (noFrameAllBottomJS == null) {
noFrameAllBottomJS = "\nallClassesLink = document.getElementById(\"allclasses_navbar_bottom\");\n"+ noFrameAllBottomJS = "\nallClassesLink = document.getElementById(\"allclasses_navbar_bottom\");\n"
"if(window==top) {\n\tallClassesLink.style.display = \"block\";\n} else {\n\tallClassesLink.style.display = \"none\";\n}\n"; + "if(window==top) {\n\tallClassesLink.style.display = \"block\";\n} else {\n\tallClassesLink.style.display = \"none\";\n}\n";
} }
if (noFrameAllLink == null) { if (noFrameAllLink == null) {
MaisDocConcept navConcept = findConceptByClass(getFrameNavConceptClass()); MaisDocConcept navConcept = findConceptByClass(getFrameNavConceptClass());
@ -216,21 +216,9 @@ public class MaisDoc {
Class<?> objClass = node.getUserData().getClass(); Class<?> objClass = node.getUserData().getClass();
return findConceptByClass(objClass); return findConceptByClass(objClass);
/* /*
Class<?> parentClass = null; * Class<?> parentClass = null; if (node.getParent()!=null) { parentClass = node.getParent().getUserData().getClass(); } for (MaisDocConcept
if (node.getParent()!=null) { * concept:getConcepts()) { if (parentClass!=null && concept.getConceptClass().isAssignableFrom(parentClass)==false) { continue; } for (MaisDocConcept
parentClass = node.getParent().getUserData().getClass(); * c:concept.getChildConcepts()) { if (c.getConceptClass().isAssignableFrom(objClass)) { return c; } } } return null;
}
for (MaisDocConcept concept:getConcepts()) {
if (parentClass!=null && concept.getConceptClass().isAssignableFrom(parentClass)==false) {
continue;
}
for (MaisDocConcept c:concept.getChildConcepts()) {
if (c.getConceptClass().isAssignableFrom(objClass)) {
return c;
}
}
}
return null;
*/ */
} }
@ -356,6 +344,7 @@ public class MaisDoc {
/** /**
* Creates default copyright message for owner. * Creates default copyright message for owner.
*
* @param owner The owner of the copyright. * @param owner The owner of the copyright.
*/ */
public void createDocCopyright(String owner) { public void createDocCopyright(String owner) {
@ -366,6 +355,7 @@ public class MaisDoc {
/** /**
* Creates default copyright message for owner and year. * Creates default copyright message for owner and year.
*
* @param owner The owner of the copyright. * @param owner The owner of the copyright.
* @param year The year of the copyright. * @param year The year of the copyright.
*/ */

View file

@ -159,6 +159,4 @@ public class MaisDocConcept {
this.parent = parent; this.parent = parent;
} }
} }

View file

@ -29,10 +29,12 @@ package org.x4o.maisdoc.model;
* @version 1.0 May 12, 2013 * @version 1.0 May 12, 2013
*/ */
public enum MaisDocNodeBody { public enum MaisDocNodeBody {
//@formatter:off
TREE_PATH, TREE_PATH,
DESCRIPTION_LINKS, DESCRIPTION_LINKS,
DESCRIPTION_NODE, DESCRIPTION_NODE,
SUMMARY, SUMMARY,
DETAIL DETAIL,
;
//@formatter:on
} }

View file

@ -34,9 +34,13 @@ import java.util.List;
public interface MaisDocNodeWriter { public interface MaisDocNodeWriter {
MaisDocNodeBody getNodeBody(); MaisDocNodeBody getNodeBody();
List<Class<?>> getTargetClasses(); List<Class<?>> getTargetClasses();
List<Integer> getNodeBodyOrders(); List<Integer> getNodeBodyOrders();
String getContentGroup(); String getContentGroup();
String getContentGroupType(); String getContentGroupType();
void writeNodeContent(MaisDocWriteEvent<MaisDocNode> e) throws IOException; void writeNodeContent(MaisDocWriteEvent<MaisDocNode> e) throws IOException;

View file

@ -56,6 +56,7 @@ public class MaisDocRemoteClass {
/** /**
* Creates the ApiDocRemoteClass with a javadoc url to fetch the package-list from. * Creates the ApiDocRemoteClass with a javadoc url to fetch the package-list from.
*
* @param docUrl The remote javadoc base url. * @param docUrl The remote javadoc base url.
*/ */
public MaisDocRemoteClass(String docUrl) { public MaisDocRemoteClass(String docUrl) {
@ -65,6 +66,7 @@ public class MaisDocRemoteClass {
/** /**
* Creates the ApiDocRemoteClass with a javadoc url. but fetched the package-list from the packageListUrl. * Creates the ApiDocRemoteClass with a javadoc url. but fetched the package-list from the packageListUrl.
*
* @param docUrl The remote javadoc base url. * @param docUrl The remote javadoc base url.
* @param packageListUrl The remote/local package-list url. * @param packageListUrl The remote/local package-list url.
*/ */
@ -75,6 +77,7 @@ public class MaisDocRemoteClass {
/** /**
* Returns remote url for a class or null if no remote package excists for the class. * Returns remote url for a class or null if no remote package excists for the class.
*
* @param cls The class to get the remote url for. * @param cls The class to get the remote url for.
* @return The remote url of the class requested or null if none if found. * @return The remote url of the class requested or null if none if found.
*/ */
@ -101,6 +104,7 @@ public class MaisDocRemoteClass {
/** /**
* Cleans the docUrl by sometimes appending postfix slash. * Cleans the docUrl by sometimes appending postfix slash.
*
* @return The cleaned doc url. * @return The cleaned doc url.
*/ */
private String getDocUrlClean() { private String getDocUrlClean() {
@ -113,6 +117,7 @@ public class MaisDocRemoteClass {
/** /**
* Fetches and parses the package-list file. * Fetches and parses the package-list file.
*
* @throws IOException If error happend. * @throws IOException If error happend.
*/ */
public void parseRemotePackageList() throws IOException { public void parseRemotePackageList() throws IOException {
@ -128,6 +133,7 @@ public class MaisDocRemoteClass {
/** /**
* Parsed the inputStream into the packagList values. * Parsed the inputStream into the packagList values.
*
* @param in The inputStream. * @param in The inputStream.
* @param enc The encoding of the inputStream. * @param enc The encoding of the inputStream.
* @throws IOException When error on inputStream. * @throws IOException When error on inputStream.

View file

@ -39,6 +39,7 @@ public class MaisDocWriteEvent<T> {
/** /**
* Creates an ApiDocNodeBodyEvent. * Creates an ApiDocNodeBodyEvent.
*
* @param doc The ApiDoc we are writing. * @param doc The ApiDoc we are writing.
* @param writer The content writer to write to. * @param writer The content writer to write to.
* @param eventObject The event we are firing this event for. * @param eventObject The event we are firing this event for.

View file

@ -32,7 +32,6 @@ import org.x4o.xml.lang.task.X4OLanguageTaskException;
import org.x4o.xml.lang.task.run.X4OTaskProperty; import org.x4o.xml.lang.task.run.X4OTaskProperty;
import org.x4o.xml.lang.task.run.X4OTaskRunner; import org.x4o.xml.lang.task.run.X4OTaskRunner;
/** /**
* AbstractX4OLanguageTask is base ant x4o language task executor. * AbstractX4OLanguageTask is base ant x4o language task executor.
* *
@ -57,6 +56,7 @@ public class X4OTask extends Task {
/** /**
* Adds the ant child x4oTaskProperty element. * Adds the ant child x4oTaskProperty element.
*
* @param property * @param property
*/ */
public void addX4oTaskProperty(X4OTaskProperty property) { public void addX4oTaskProperty(X4OTaskProperty property) {
@ -65,6 +65,7 @@ public class X4OTask extends Task {
/** /**
* Executes the x4o eld schema task. * Executes the x4o eld schema task.
*
* @see org.apache.tools.ant.Task#execute() * @see org.apache.tools.ant.Task#execute()
*/ */
@Override @Override

View file

@ -72,15 +72,19 @@ public class X4OWriteLanguageDocTaskTest extends BuildFileTest {
public void testFailAllMissing() { public void testFailAllMissing() {
expectBuildException("test-fail-all", "Should get exception with no attributes."); expectBuildException("test-fail-all", "Should get exception with no attributes.");
} }
public void testFailBasePath() { public void testFailBasePath() {
expectBuildException("test-fail-destdir", "Should get exception id destdir is not set."); expectBuildException("test-fail-destdir", "Should get exception id destdir is not set.");
} }
public void testFailBasePathError() { public void testFailBasePathError() {
expectBuildException("test-fail-destdir-error", "Should get exception id destdir does not exists."); expectBuildException("test-fail-destdir-error", "Should get exception id destdir does not exists.");
} }
public void testFailLanguage() { public void testFailLanguage() {
expectBuildException("test-fail-language", "Should get exception id language is not set."); expectBuildException("test-fail-language", "Should get exception id language is not set.");
} }
public void testFailLanguageError() { public void testFailLanguageError() {
expectBuildException("test-fail-language-error", "Should get exception id language throws error."); expectBuildException("test-fail-language-error", "Should get exception id language throws error.");
} }

View file

@ -64,15 +64,19 @@ public class X4OWriteLanguageSchemaTaskTest extends BuildFileTest {
public void testFailAllMissing() { public void testFailAllMissing() {
expectBuildException("test-fail-all", "Should get exception if no attributes are set."); expectBuildException("test-fail-all", "Should get exception if no attributes are set.");
} }
public void testFailBasePath() { public void testFailBasePath() {
expectBuildException("test-fail-destdir", "Should get exception id destdir is not set."); expectBuildException("test-fail-destdir", "Should get exception id destdir is not set.");
} }
public void testFailBasePathError() { public void testFailBasePathError() {
expectBuildException("test-fail-destdir-error", "Should get exception id destdir does not exists."); expectBuildException("test-fail-destdir-error", "Should get exception id destdir does not exists.");
} }
public void testFailLanguage() { public void testFailLanguage() {
expectBuildException("test-fail-language", "Should get exception id language is not set."); expectBuildException("test-fail-language", "Should get exception id language is not set.");
} }
public void testFailLanguageError() { public void testFailLanguageError() {
expectBuildException("test-fail-language-error", "Should get exception id language throws error."); expectBuildException("test-fail-language-error", "Should get exception id language throws error.");
} }

View file

@ -167,12 +167,14 @@ public class X4OLanguageTaskMojo extends AbstractMojo {
public void setLanguageVersion(String languageVersion) { public void setLanguageVersion(String languageVersion) {
this.languageVersion = languageVersion; this.languageVersion = languageVersion;
} }
/** /**
* @return the taskId * @return the taskId
*/ */
public String getTaskId() { public String getTaskId() {
return taskId; return taskId;
} }
/** /**
* @param taskId the taskId to set * @param taskId the taskId to set
*/ */

View file

@ -75,46 +75,26 @@ public class X4OLanguageTaskMojoTest extends AbstractMojoTestCase {
} }
/* /*
public void testConfLangWriteDoc() throws Exception { * public void testConfLangWriteDoc() throws Exception { executeGoal(X4OLanguageTaskMojo.GOAL,"src/test/resources/junit/test-plugin-conf-lang.pom"); File
executeGoal(X4OLanguageTaskMojo.GOAL,"src/test/resources/junit/test-plugin-conf-lang.pom"); * outputDir = new File("target/jtest/test-plugin-conf-lang/cel"); int files = outputDir.listFiles().length;
File outputDir = new File("target/jtest/test-plugin-conf-lang/cel"); * assertEquals("Should created more then one files", true, files>1); }
int files = outputDir.listFiles().length; *
assertEquals("Should created more then one files", true, files>1); * public void testConfDefaultsWriteDoc() throws Exception { executeGoal(X4OLanguageTaskMojo.GOAL,"src/test/resources/junit/test-plugin-defaults.pom"); File
} * outputDir = new File("target/x4o/doc-cel-1.0"); int files = outputDir.listFiles().length; assertEquals("Should created more then two files", true,
* files>2); outputDir = new File("target/x4o/doc-eld-1.0"); files = outputDir.listFiles().length; assertEquals("Should created more then two files", true,
public void testConfDefaultsWriteDoc() throws Exception { * files>2); }
executeGoal(X4OLanguageTaskMojo.GOAL,"src/test/resources/junit/test-plugin-defaults.pom"); *
File outputDir = new File("target/x4o/doc-cel-1.0"); * public void testConfAllWriteSchema() throws Exception { executeGoal(X4OLanguageTaskMojo.GOAL,"src/test/resources/junit/test-plugin-conf-all.pom"); File
int files = outputDir.listFiles().length; * outputDir = new File("target/jtest/test-plugin-conf-all/xsd-eld-1.0"); assertTrue(outputDir.exists()); int files = outputDir.listFiles().length;
assertEquals("Should created more then two files", true, files>2); * assertEquals("Should created more then two files", true, files>2); }
outputDir = new File("target/x4o/doc-eld-1.0"); *
files = outputDir.listFiles().length; * public void testConfLangWriteSchema() throws Exception { executeGoal(X4OLanguageTaskMojo.GOAL,"src/test/resources/junit/test-plugin-conf-lang.pom"); File
assertEquals("Should created more then two files", true, files>2); * outputDir = new File("target/jtest/test-plugin-conf-lang/xsd-cel-1.0"); int files = outputDir.listFiles().length;
} * assertEquals("Should created more then one file", true, files>1); }
*
public void testConfAllWriteSchema() throws Exception { * public void testConfDefaultsWriteSchema() throws Exception { executeGoal(X4OLanguageTaskMojo.GOAL,"src/test/resources/junit/test-plugin-defaults.pom");
executeGoal(X4OLanguageTaskMojo.GOAL,"src/test/resources/junit/test-plugin-conf-all.pom"); * File outputDir = new File("target/x4o/xsd-cel-1.0"); int files = outputDir.listFiles().length; assertEquals("Should created more then one file", true,
File outputDir = new File("target/jtest/test-plugin-conf-all/xsd-eld-1.0"); * files>1); outputDir = new File("target/x4o/xsd-eld-1.0"); files = outputDir.listFiles().length; assertEquals("Should created more then two files", true,
assertTrue(outputDir.exists()); * files>2); }
int files = outputDir.listFiles().length;
assertEquals("Should created more then two files", true, files>2);
}
public void testConfLangWriteSchema() throws Exception {
executeGoal(X4OLanguageTaskMojo.GOAL,"src/test/resources/junit/test-plugin-conf-lang.pom");
File outputDir = new File("target/jtest/test-plugin-conf-lang/xsd-cel-1.0");
int files = outputDir.listFiles().length;
assertEquals("Should created more then one file", true, files>1);
}
public void testConfDefaultsWriteSchema() throws Exception {
executeGoal(X4OLanguageTaskMojo.GOAL,"src/test/resources/junit/test-plugin-defaults.pom");
File outputDir = new File("target/x4o/xsd-cel-1.0");
int files = outputDir.listFiles().length;
assertEquals("Should created more then one file", true, files>1);
outputDir = new File("target/x4o/xsd-eld-1.0");
files = outputDir.listFiles().length;
assertEquals("Should created more then two files", true, files>2);
}
*/ */
} }