Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Ferguson2007-10-25 07:02:57 -0400
committerAndrew Ferguson2007-10-25 07:02:57 -0400
commite96881fb2ca40e7ce5cd4eaacbf330b425bd4b6a (patch)
tree1d57e9d728121b9ce04c8a1cfdc338988a01e937
parent80e1e135399a578dcc4b7af0898e1841e8f9f1d7 (diff)
downloadorg.eclipse.cdt-e96881fb2ca40e7ce5cd4eaacbf330b425bd4b6a.tar.gz
org.eclipse.cdt-e96881fb2ca40e7ce5cd4eaacbf330b425bd4b6a.tar.xz
org.eclipse.cdt-e96881fb2ca40e7ce5cd4eaacbf330b425bd4b6a.zip
199379: update docs and tidy code
-rw-r--r--core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/uitree/GenericUIElementGroup.java50
-rw-r--r--core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/uitree/IPageTypeConstants.java10
-rw-r--r--core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/uitree/UIElementTreeBuilderHelper.java6
-rw-r--r--core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/uitree/UIGroupTypeEnum.java10
-rw-r--r--doc/org.eclipse.cdt.doc.isv/guide/projectTemplateEngine/Howtodeveloptemplates.html20
5 files changed, 57 insertions, 39 deletions
diff --git a/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/uitree/GenericUIElementGroup.java b/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/uitree/GenericUIElementGroup.java
index 56d14af1cf3..b7b853aa3bc 100644
--- a/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/uitree/GenericUIElementGroup.java
+++ b/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/uitree/GenericUIElementGroup.java
@@ -17,29 +17,30 @@ import java.util.Map;
import org.eclipse.cdt.ui.templateengine.uitree.uiwidgets.UIComposite;
-
/**
- *
* The GenericUIElementGroup extends UIElement, implements the default behaviour
* expected from UIElementGroup. This gives behaviour expected for PAGES-ONLY
* type. Any other type of UIElement groups can override the definitions given
* to methods in this class.
*
+ * @since 4.0
*/
-
public class GenericUIElementGroup extends UIElement {
-
/**
- * Type of UIElement group. The possible values are PAGES_ONLY, PAGES_TAB,
- * PAGES_TREE, PAGES_TREE_TREE, PAGES_TAB_TREE.
+ * @deprecated use {@value UIGroupTypeEnum#PAGES_ONLY}
+ */
+ public static String PAGES_ONLY = UIGroupTypeEnum.PAGES_ONLY.getId();
+ /**
+ * @deprecated use {@value UIGroupTypeEnum#PAGES_ONLY}
+ */
+ public static String PAGES_TAB = UIGroupTypeEnum.PAGES_TAB.getId();
+ /**
+ * @deprecated
*/
- public static String PAGES_ONLY = "PAGES-ONLY"; //$NON-NLS-1$
- public static String PAGES_TAB = "PAGES-TAB"; //$NON-NLS-1$
public static String LOGTYPE = "UIElement"; //$NON-NLS-1$
UIGroupTypeEnum type = null;
-
/**
* child list for this UIElement
*/
@@ -56,8 +57,9 @@ public class GenericUIElementGroup extends UIElement {
this.childList = new ArrayList/*<UIElement>*/();
}
- /**
- * @see UIElement
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.cdt.ui.templateengine.uitree.UIElement#setValues(java.util.Map)
*/
public void setValues(Map/*<String, String>*/ valueMap) {
int childCount = getChildCount();
@@ -67,11 +69,11 @@ public class GenericUIElementGroup extends UIElement {
}
}
- /**
- * @see UIElement
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.cdt.ui.templateengine.uitree.UIElement#getValues()
*/
public Map/*<String, String>*/ getValues() {
-
HashMap/*<String, String>*/ valueMap = new HashMap/*<String, String>*/();
int childCount = getChildCount();
@@ -82,14 +84,15 @@ public class GenericUIElementGroup extends UIElement {
return valueMap;
}
- /**
- * @see UIElement
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.cdt.ui.templateengine.uitree.UIElement#createWidgets(org.eclipse.cdt.ui.templateengine.uitree.uiwidgets.UIComposite)
*/
public void createWidgets(UIComposite uiComposite) {
int childCount = getChildCount();
// call createWidgets on all the contained
- // UI wigets.
+ // UI widgets.
if (uiComposite != null) {
for (int i = 0; i < childCount; i++) {
getChild(i).createWidgets(uiComposite);
@@ -131,7 +134,6 @@ public class GenericUIElementGroup extends UIElement {
* @param aUIElement
*/
public void addToChildList(UIElement aUIElement) {
-
childList.add(aUIElement);
}
@@ -143,7 +145,6 @@ public class GenericUIElementGroup extends UIElement {
* @return the child count of UIElement
*/
public int getChildCount() {
-
return childList.size();
}
@@ -152,23 +153,24 @@ public class GenericUIElementGroup extends UIElement {
* during UIPage construction.
*/
public UIGroupTypeEnum getType() {
-
return type;
}
- // @see UIElement
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.cdt.ui.templateengine.uitree.UIElement#isValid()
+ */
public boolean isValid() {
-
boolean retVal = true;
int childCount = getChildCount();
- for (int i = 0; i < childCount; i++)
+ for (int i = 0; i < childCount; i++) {
if (!getChild(i).isValid()) {
retVal = false;
break;
}
+ }
return retVal;
}
-
}
diff --git a/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/uitree/IPageTypeConstants.java b/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/uitree/IPageTypeConstants.java
new file mode 100644
index 00000000000..11dcf5c241f
--- /dev/null
+++ b/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/uitree/IPageTypeConstants.java
@@ -0,0 +1,10 @@
+package org.eclipse.cdt.ui.templateengine.uitree;
+
+public interface IPageTypeConstants {
+ /**
+ * Type of UIElement group. The possible values are PAGES_ONLY, PAGES_TAB,
+ * PAGES_TREE, PAGES_TREE_TREE, PAGES_TAB_TREE.
+ */
+
+ public static String LOGTYPE = "UIElement"; //$NON-NLS-1$
+}
diff --git a/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/uitree/UIElementTreeBuilderHelper.java b/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/uitree/UIElementTreeBuilderHelper.java
index fe143e17ec7..23b198a8af7 100644
--- a/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/uitree/UIElementTreeBuilderHelper.java
+++ b/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/uitree/UIElementTreeBuilderHelper.java
@@ -65,7 +65,7 @@ public class UIElementTreeBuilderHelper implements IUIElementTreeBuilderHelper {
/**
* Given an XML Element, representing a PropertyElement. A UIElement for the
* same is returned. The Type attribute is verified, based on Type
- * approprioate UIWidget is instantiated. This calss the getUIWidget private
+ * appropriate UIWidget is instantiated. This class the getUIWidget private
* method.
*
* @param element
@@ -172,11 +172,11 @@ public class UIElementTreeBuilderHelper implements IUIElementTreeBuilderHelper {
// PAGES(Groups).
- if (type.equalsIgnoreCase(GenericUIElementGroup.PAGES_ONLY)) {
+ if (type.equalsIgnoreCase(UIGroupTypeEnum.PAGES_ONLY.getId())) {
widgetElement = new SimpleUIElementGroup(uiAttributes);
}
- if (type.equalsIgnoreCase(GenericUIElementGroup.PAGES_TAB)) {
+ if (type.equalsIgnoreCase(UIGroupTypeEnum.PAGES_TAB.getId())) {
// Note: This is not implemented now as we haven't found a use case
// for generating UI pages as TABS in a single page.
}
diff --git a/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/uitree/UIGroupTypeEnum.java b/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/uitree/UIGroupTypeEnum.java
index 179df093cf5..2a6a9ed027a 100644
--- a/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/uitree/UIGroupTypeEnum.java
+++ b/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/uitree/UIGroupTypeEnum.java
@@ -10,14 +10,12 @@
*******************************************************************************/
package org.eclipse.cdt.ui.templateengine.uitree;
-
/**
* This class defines various types of UIElement groups.
*/
-
public class UIGroupTypeEnum {
- public static final UIGroupTypeEnum PAGES_ONLY = new UIGroupTypeEnum("PAGES_ONLY"); //$NON-NLS-1$
- public static final UIGroupTypeEnum PAGES_TAB = new UIGroupTypeEnum("PAGES_TAB"); //$NON-NLS-1$
+ public static final UIGroupTypeEnum PAGES_ONLY = new UIGroupTypeEnum("PAGES-ONLY"); //$NON-NLS-1$
+ public static final UIGroupTypeEnum PAGES_TAB = new UIGroupTypeEnum("PAGES-TAB"); //$NON-NLS-1$
private String id;
@@ -36,6 +34,10 @@ public class UIGroupTypeEnum {
return id.hashCode();
}
+ public String getId() {
+ return id;
+ }
+
public String toString() {
return id;
}
diff --git a/doc/org.eclipse.cdt.doc.isv/guide/projectTemplateEngine/Howtodeveloptemplates.html b/doc/org.eclipse.cdt.doc.isv/guide/projectTemplateEngine/Howtodeveloptemplates.html
index 3861e5ab5ba..44692ba8d34 100644
--- a/doc/org.eclipse.cdt.doc.isv/guide/projectTemplateEngine/Howtodeveloptemplates.html
+++ b/doc/org.eclipse.cdt.doc.isv/guide/projectTemplateEngine/Howtodeveloptemplates.html
@@ -181,36 +181,40 @@ title.
</p>
<li>
<p>
-<code>type</code>: Use this attribute to specify the wizard page
-type. The possible values for this attribute are:
+<code>type</code>: This attribute is for future expansion. Currently, the only
+valid value is:
</p>
<ul>
<li>
<p>
-<code>PAGES_ONLY</code>: If you want all the properties to be
-listed in a simple page.
+<code>PAGES-ONLY</code>: If you want all the properties to be
+listed in a simple page.
</p>
+
+<!-- Constants currently unsupported
<li>
<p>
-<code>PAGES_TAB</code>: If you want all the properties to be
+<code>PAGES-TAB</code>: If you want all the properties to be
displayed as tabs in a page.
</p>
<li>
<p>
-<code>PAGES_TREE</code>: If you want all the properties to be
+<code>PAGES-TREE</code>: If you want all the properties to be
displayed in a simple tree structure.
</p>
<li>
<p>
-<code>PAGES_TREE_TREE</code>: If you want all the properties to
+<code>PAGES-TREE-TREE</code>: If you want all the properties to
be displayed in a multi-level tree structure.
</p>
<li>
<p>
-<code>PAGES_TAB_TREE</code>: If you want all the properties to be
+<code>PAGES-TAB-TREE</code>: If you want all the properties to be
displayed as tabs or as a tree structure.
</p>
</li>
+-->
+
</ul>
<li>
<p>

Back to the top