carbidecpp22devenv/plugins/org.eclipse.gmf.templates.legacy_1.0.0.v20090614-0839/codegen.templates/xpt/editor/UriEditorInputTester.xpt
changeset 422 033392511bf7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/carbidecpp22devenv/plugins/org.eclipse.gmf.templates.legacy_1.0.0.v20090614-0839/codegen.templates/xpt/editor/UriEditorInputTester.xpt	Fri Dec 04 11:06:59 2009 -0600
@@ -0,0 +1,40 @@
+/*
+ * 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 UriEditorInputTester FOR gmfgen::GenNavigator-»
+	«EXPAND xpt::Common::copyright FOR editorGen-»
+package «editorGen.editor.packageName»;
+
+	«EXPAND xpt::Common::generatedClassComment»
+public class «uriInputTesterClassName» extends org.eclipse.core.expressions.PropertyTester {
+
+	«EXPAND test FOR editorGen-»
+
+	«EXPAND additions-»
+}
+«ENDDEFINE»
+
+«DEFINE test FOR gmfgen::GenEditorGenerator-»
+	«EXPAND xpt::Common::generatedMemberComment»
+public boolean test(Object receiver, String method, Object[] args, Object expectedValue) {
+	if (false == receiver instanceof org.eclipse.emf.common.ui.URIEditorInput) {
+		return false;
+	}
+	org.eclipse.emf.common.ui.URIEditorInput editorInput = (org.eclipse.emf.common.ui.URIEditorInput) receiver;
+	return "«diagramFileExtension»".equals(editorInput.getURI().fileExtension()); «EXPAND xpt::Common::nonNLS»
+}
+«ENDDEFINE»
+
+«DEFINE additions FOR gmfgen::GenNavigator-»
+«ENDDEFINE»
\ No newline at end of file