Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/navigator/NavigatorGroup.xpt')
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/navigator/NavigatorGroup.xpt129
1 files changed, 129 insertions, 0 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/navigator/NavigatorGroup.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/navigator/NavigatorGroup.xpt
new file mode 100644
index 000000000..2a05b29cf
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/navigator/NavigatorGroup.xpt
@@ -0,0 +1,129 @@
+/*
+ * Copyright (c) 2007 Borland Software Corporation
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Alexander Shatalin (Borland) - initial API and implementation
+ */
+
+«IMPORT 'http://www.eclipse.org/gmf/2008/GenModel'»
+
+«DEFINE NavigatorGroup FOR gmfgen::GenNavigator-»
+ «EXPAND xpt::Common::copyright FOR editorGen-»
+package «packageName»;
+
+ «EXPAND xpt::Common::generatedClassComment»
+public class «navigatorGroupClassName» extends «getAbstractNavigatorItemQualifiedClassName()» {
+
+ «EXPAND attributes-»
+
+ «EXPAND _constructor-»
+
+ «EXPAND getGroupName-»
+
+ «EXPAND getIcon-»
+
+ «EXPAND getChildren-»
+
+ «EXPAND addChildren-»
+
+ «EXPAND addChild-»
+
+ «EXPAND isEmpty-»
+
+ «EXPAND equals-»
+
+ «EXPAND hashCode-»
+
+ «EXPAND additions-»
+}
+«ENDDEFINE»
+
+«DEFINE attributes FOR gmfgen::GenNavigator-»
+ «EXPAND xpt::Common::generatedMemberComment»
+private String myGroupName;
+
+ «EXPAND xpt::Common::generatedMemberComment»
+private String myIcon;
+
+ «EXPAND xpt::Common::generatedMemberComment»
+private java.util.Collection myChildren = new java.util.LinkedList();
+«ENDDEFINE»
+
+«DEFINE _constructor FOR gmfgen::GenNavigator-»
+ «EXPAND xpt::Common::generatedMemberComment»
+«navigatorGroupClassName»(String groupName, String icon, Object parent) {
+ super(parent);
+ myGroupName = groupName;
+ myIcon = icon;
+}
+«ENDDEFINE»
+
+«DEFINE getGroupName FOR gmfgen::GenNavigator-»
+ «EXPAND xpt::Common::generatedMemberComment»
+public String getGroupName() {
+ return myGroupName;
+}
+«ENDDEFINE»
+
+«DEFINE getIcon FOR gmfgen::GenNavigator-»
+ «EXPAND xpt::Common::generatedMemberComment»
+public String getIcon() {
+ return myIcon;
+}
+«ENDDEFINE»
+
+«DEFINE getChildren FOR gmfgen::GenNavigator-»
+ «EXPAND xpt::Common::generatedMemberComment»
+public Object[] getChildren() {
+ return myChildren.toArray();
+}
+«ENDDEFINE»
+
+«DEFINE addChildren FOR gmfgen::GenNavigator-»
+ «EXPAND xpt::Common::generatedMemberComment»
+public void addChildren(java.util.Collection children) {
+ myChildren.addAll(children);
+}
+«ENDDEFINE»
+
+«DEFINE addChild FOR gmfgen::GenNavigator-»
+ «EXPAND xpt::Common::generatedMemberComment»
+public void addChild(Object child) {
+ myChildren.add(child);
+}
+«ENDDEFINE»
+
+«DEFINE isEmpty FOR gmfgen::GenNavigator-»
+ «EXPAND xpt::Common::generatedMemberComment»
+public boolean isEmpty() {
+ return myChildren.size() == 0;
+}
+«ENDDEFINE»
+
+«DEFINE equals FOR gmfgen::GenNavigator-»
+ «EXPAND xpt::Common::generatedMemberComment»
+public boolean equals(Object obj) {
+ if (obj instanceof «getNavigatorGroupQualifiedClassName()») {
+ «getNavigatorGroupQualifiedClassName()» anotherGroup = («getNavigatorGroupQualifiedClassName()») obj;
+ if (getGroupName().equals(anotherGroup.getGroupName())) {
+ return getParent().equals(anotherGroup.getParent());
+ }
+ }
+ return super.equals(obj);
+}
+«ENDDEFINE»
+
+«DEFINE hashCode FOR gmfgen::GenNavigator-»
+ «EXPAND xpt::Common::generatedMemberComment»
+public int hashCode() {
+ return getGroupName().hashCode();
+}
+«ENDDEFINE»
+
+«DEFINE additions FOR gmfgen::GenNavigator-»
+«ENDDEFINE» \ No newline at end of file

Back to the top