RESOLVED https://bugs.eclipse.org/bugs/show_bug.cgi?id=406564 and
https://bugs.eclipse.org/bugs/show_bug.cgi?id=406562
diff --git a/plugins/org.eclipse.sphinx.emf.mwe/src/org/eclipse/sphinx/emf/mwe/resources/BasicWorkspaceResourceLoader.java b/plugins/org.eclipse.sphinx.emf.mwe/src/org/eclipse/sphinx/emf/mwe/resources/BasicWorkspaceResourceLoader.java
index cc5adb4..b598ffc 100644
--- a/plugins/org.eclipse.sphinx.emf.mwe/src/org/eclipse/sphinx/emf/mwe/resources/BasicWorkspaceResourceLoader.java
+++ b/plugins/org.eclipse.sphinx.emf.mwe/src/org/eclipse/sphinx/emf/mwe/resources/BasicWorkspaceResourceLoader.java
@@ -1,7 +1,7 @@
/**
* <copyright>
*
- * Copyright (c) 2011 See4sys and others.
+ * Copyright (c) 2011-2013 See4sys, itemis and others.
* 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
@@ -9,6 +9,7 @@
*
* Contributors:
* See4sys - Initial API and implementation
+ * itemis - [406564] BasicWorkspaceResourceLoader#getResource should not delegate to super
*
* </copyright>
*/
@@ -51,6 +52,11 @@
protected Set<IProject> projectsInScope = new HashSet<IProject>();
protected ClassLoader workspaceClassLoader = null;
+ /**
+ * @deprecated Not supported any longer. BasicWorkspaceResourceLoader is supposed to load only resources from
+ * workspace but not from JAR files or plug-ins.
+ */
+ @Deprecated
protected boolean searchArchives = true;
public IProject getContextProject() {
@@ -71,6 +77,11 @@
this.contextModel = contextModel;
}
+ /**
+ * @deprecated Not supported any longer. BasicWorkspaceResourceLoader is supposed to load only resources from
+ * workspace but not from JAR files or plug-ins.
+ */
+ @Deprecated
public void setSearchArchives(boolean searchArchives) {
this.searchArchives = searchArchives;
}
@@ -195,6 +206,8 @@
if (url != null) {
return url;
}
+
+ // TODO Delete this if clause when support for deprecated #searchArchives property is removed.
if (searchArchives) {
return super.getResource(path);
}
diff --git a/plugins/org.eclipse.sphinx.emf.mwe/src/org/eclipse/sphinx/emf/mwe/resources/IWorkspaceResourceLoader.java b/plugins/org.eclipse.sphinx.emf.mwe/src/org/eclipse/sphinx/emf/mwe/resources/IWorkspaceResourceLoader.java
index 29be546..60173b6 100644
--- a/plugins/org.eclipse.sphinx.emf.mwe/src/org/eclipse/sphinx/emf/mwe/resources/IWorkspaceResourceLoader.java
+++ b/plugins/org.eclipse.sphinx.emf.mwe/src/org/eclipse/sphinx/emf/mwe/resources/IWorkspaceResourceLoader.java
@@ -1,7 +1,7 @@
/**
* <copyright>
*
- * Copyright (c) 2011 See4sys and others.
+ * Copyright (c) 2011-2013 See4sys, itemis and others.
* 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
@@ -9,6 +9,7 @@
*
* Contributors:
* See4sys - Initial API and implementation
+ * itemis - [406564] BasicWorkspaceResourceLoader#getResource should not delegate to super
*
* </copyright>
*/
@@ -28,5 +29,10 @@
void setContextModel(IModelDescriptor contextModel);
+ /**
+ * @deprecated Not supported any longer. BasicWorkspaceResourceLoader is supposed to load only resources from
+ * workspace but not from JAR files or plug-ins.
+ */
+ @Deprecated
void setSearchArchives(boolean searchArchives);
}
diff --git a/plugins/org.eclipse.sphinx.xtendxpand.ui/src/org/eclipse/sphinx/xtendxpand/ui/util/WorkspaceStorageFinder.java b/plugins/org.eclipse.sphinx.xtendxpand.ui/src/org/eclipse/sphinx/xtendxpand/ui/util/WorkspaceStorageFinder.java
index e15bceb..8fb8b0a 100644
--- a/plugins/org.eclipse.sphinx.xtendxpand.ui/src/org/eclipse/sphinx/xtendxpand/ui/util/WorkspaceStorageFinder.java
+++ b/plugins/org.eclipse.sphinx.xtendxpand.ui/src/org/eclipse/sphinx/xtendxpand/ui/util/WorkspaceStorageFinder.java
@@ -1,7 +1,7 @@
/**
* <copyright>
*
- * Copyright (c) 2011 See4sys, itemis and others.
+ * Copyright (c) 2011-2013 See4sys, itemis and others.
* 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
@@ -10,6 +10,7 @@
* Contributors:
* See4sys - Initial API and implementation
* itemis - [358131] Make Xtend/Xpand/CheckJobs more robust against template file encoding mismatches
+ * itemis - [406562] WorkspaceStorageFinder#getPriority
*
* </copyright>
*/
@@ -76,7 +77,6 @@
*/
public IStorage findStorage(IJavaProject javaProject, ResourceID resourceID, boolean searchJars) {
workspaceResourceLoader.setContextProject(javaProject.getProject());
- workspaceResourceLoader.setSearchArchives(searchJars);
return XtendXpandUtil.getUnderlyingFile(resourceID.name, resourceID.extension, workspaceResourceLoader);
}
@@ -85,6 +85,6 @@
* @see org.eclipse.xtend.shared.ui.StorageFinder#getPriority()
*/
public int getPriority() {
- return 1;
+ return 2;
}
}
diff --git a/tests/org.eclipse.sphinx.tests.xtendxpand.integration/META-INF/MANIFEST.MF b/tests/org.eclipse.sphinx.tests.xtendxpand.integration/META-INF/MANIFEST.MF
index e2e5b7c..e06a2f3 100644
--- a/tests/org.eclipse.sphinx.tests.xtendxpand.integration/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.sphinx.tests.xtendxpand.integration/META-INF/MANIFEST.MF
@@ -14,3 +14,7 @@
Export-Package: org.eclipse.sphinx.tests.xtendxpand.integration,
org.eclipse.sphinx.tests.xtendxpand.integration.internal;x-internal:=true
Bundle-Activator: org.eclipse.sphinx.tests.xtendxpand.integration.internal.Activator$Implementation
+Import-Package: org.eclipse.ui.plugin,
+ org.eclipse.xtend.shared.ui,
+ org.eclipse.xtend.shared.ui.core,
+ org.eclipse.xtend.shared.ui.core.internal
diff --git a/tests/org.eclipse.sphinx.tests.xtendxpand.integration/build.properties b/tests/org.eclipse.sphinx.tests.xtendxpand.integration/build.properties
index f4ae970..45d82bf 100644
--- a/tests/org.eclipse.sphinx.tests.xtendxpand.integration/build.properties
+++ b/tests/org.eclipse.sphinx.tests.xtendxpand.integration/build.properties
@@ -2,4 +2,5 @@
output.. = bin/
bin.includes = META-INF/,\
.,\
- plugin.properties
+ plugin.properties,\
+ templates/
diff --git a/tests/org.eclipse.sphinx.tests.xtendxpand.integration/src/org/eclipse/sphinx/tests/xtendxpand/integration/WorkspaceStorageTest.java b/tests/org.eclipse.sphinx.tests.xtendxpand.integration/src/org/eclipse/sphinx/tests/xtendxpand/integration/WorkspaceStorageTest.java
new file mode 100644
index 0000000..b344fc3
--- /dev/null
+++ b/tests/org.eclipse.sphinx.tests.xtendxpand.integration/src/org/eclipse/sphinx/tests/xtendxpand/integration/WorkspaceStorageTest.java
@@ -0,0 +1,88 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2013 itemis and others.
+ * 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:
+ * itemis - Initial API and implementation
+ * itemis - [406564] BasicWorkspaceResourceLoader#getResource should not delegate to super
+ *
+ * </copyright>
+ */
+package org.eclipse.sphinx.tests.xtendxpand.integration;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IStorage;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.sphinx.emf.mwe.IXtendXpandConstants;
+import org.eclipse.sphinx.testutils.integration.referenceworkspace.xtendxpand.XtendXpandIntegrationTestCase;
+import org.eclipse.sphinx.testutils.integration.referenceworkspace.xtendxpand.XtendXpandTestReferenceWorkspace;
+import org.eclipse.xtend.shared.ui.core.internal.ResourceID;
+
+public class WorkspaceStorageTest extends XtendXpandIntegrationTestCase {
+
+ /**
+ * Test method for {@link org.eclipse.xtend.shared.ui.Activator#findStorage(javaProject, resourceID, searchJars)}.
+ * Test find storage for resources that are located in current workspace.
+ */
+ public void testFindStorage_workspaceFile() throws Exception {
+ // Loads the Hummingbird instance model file
+ IFile hb20InstanceModelFile = refWks.codegenXpandProject
+ .getFile(XtendXpandTestReferenceWorkspace.HB_CODEGEN_XPAND_PROJECT_HB_INSTANCE_MODEL_PATH);
+ assertNotNull(hb20InstanceModelFile);
+ assertTrue(hb20InstanceModelFile.exists());
+
+ // First case: test find Storage for resources that are located in current workspace also in referenced JAR
+ // files on the classpath
+ IStorage storage = findStorage(hb20InstanceModelFile, XtendXpandTestReferenceWorkspace.XPAND_CONFIGH, true);
+ assertNotNull(storage);
+
+ // Second case: test find Storage for resources that are located in current workspace but not from JAR files.
+ storage = findStorage(hb20InstanceModelFile, XtendXpandTestReferenceWorkspace.XPAND_CONFIGH, false);
+ assertNotNull(storage);
+ }
+
+ /**
+ * Test method for {@link org.eclipse.xtend.shared.ui.Activator#findStorage(javaProject, resourceID, searchJars)}.
+ * Test find storage for resources that are located in plug-ins.
+ */
+ public void testFindStorage_pluginFile() throws Exception {
+ // Loads the Hummingbird instance model file
+ IFile hb20InstanceModelFile = refWks.codegenXpandProject
+ .getFile(XtendXpandTestReferenceWorkspace.HB_CODEGEN_XPAND_PROJECT_HB_INSTANCE_MODEL_PATH);
+ assertNotNull(hb20InstanceModelFile);
+ assertTrue(hb20InstanceModelFile.exists());
+
+ // First case: test find Storage for resources that are located in plug-in also in referenced Jar files on
+ // the classpath
+ IStorage storage = findStorage(hb20InstanceModelFile, XtendXpandTestReferenceWorkspace.XPAND_CONFIGHP, true);
+ assertNull(storage);
+
+ // Second case: test find Storage for resources that are located in plug-ins but not from JAR files.
+ storage = findStorage(hb20InstanceModelFile, XtendXpandTestReferenceWorkspace.XPAND_CONFIGHP, false);
+ assertNull(storage);
+ }
+
+ /**
+ * Finds an XtendXpand Storage.
+ *
+ * @param resourceName
+ * Qualified name of the resource
+ * @param searchJars
+ * <tt>true</tt> search also in referenced Jar files on the classpath
+ * @return The storage or <code>null</code> if not found
+ */
+ private IStorage findStorage(IFile hb20InstanceModelFile, String resourceName, boolean searchJars) throws Exception {
+ // Gets the java project of the project that contains the Hummingbird instance model hb20InstanceModelFile
+ IJavaProject javaProject = JavaCore.create(hb20InstanceModelFile.getProject());
+ ResourceID resourceID = new ResourceID(resourceName, IXtendXpandConstants.TEMPLATE_EXTENSION);
+
+ // Search the resource to find storage
+ return org.eclipse.xtend.shared.ui.Activator.findStorage(javaProject, resourceID, searchJars);
+ }
+}
diff --git a/tests/org.eclipse.sphinx.tests.xtendxpand.integration/src/org/eclipse/sphinx/tests/xtendxpand/integration/XpandJobTest.java b/tests/org.eclipse.sphinx.tests.xtendxpand.integration/src/org/eclipse/sphinx/tests/xtendxpand/integration/XpandJobTest.java
index a8549a5..a7e5a8c 100644
--- a/tests/org.eclipse.sphinx.tests.xtendxpand.integration/src/org/eclipse/sphinx/tests/xtendxpand/integration/XpandJobTest.java
+++ b/tests/org.eclipse.sphinx.tests.xtendxpand.integration/src/org/eclipse/sphinx/tests/xtendxpand/integration/XpandJobTest.java
@@ -1,7 +1,7 @@
/**
* <copyright>
*
- * Copyright (c) 2011 See4sys, itemis and others.
+ * Copyright (c) 2011-2013 See4sys, itemis and others.
* 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
@@ -10,6 +10,7 @@
* Contributors:
* See4sys - Initial API and implementation
* itemis - [343844] Enable multiple Xtend MetaModels to be configured on BasicM2xAction, M2xConfigurationWizard, and Xtend/Xpand/CheckJob
+ * itemis - [406564] BasicWorkspaceResourceLoader#getResource should not delegate to super
*
* </copyright>
*/
@@ -24,6 +25,7 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
+import org.eclipse.sphinx.emf.mwe.IXtendXpandConstants;
import org.eclipse.sphinx.emf.mwe.resources.BasicWorkspaceResourceLoader;
import org.eclipse.sphinx.emf.util.EcorePlatformUtil;
import org.eclipse.sphinx.examples.hummingbird20.instancemodel.Application;
@@ -33,6 +35,7 @@
import org.eclipse.sphinx.xtendxpand.XpandEvaluationRequest;
import org.eclipse.sphinx.xtendxpand.jobs.XpandJob;
import org.eclipse.sphinx.xtendxpand.outlet.ExtendedOutlet;
+import org.eclipse.sphinx.xtendxpand.util.XtendXpandUtil;
public class XpandJobTest extends XtendXpandIntegrationTestCase {
@@ -41,28 +44,60 @@
return new String[] { XtendXpandTestReferenceWorkspace.HB_CODEGEN_XPAND_PROJECT_NAME };
}
- public void testHummingbird20Codegen() throws Exception {
- // Load Hummingbird 2.0 instance model file
+ /**
+ * Test Xpand code generation.
+ */
+ public void testHummingbird20Codegen_workspace() throws Exception {
+ // Load Hummingbird resource
IFile hb20InstanceModelFile = refWks.codegenXpandProject
.getFile(XtendXpandTestReferenceWorkspace.HB_CODEGEN_XPAND_PROJECT_HB_INSTANCE_MODEL_PATH);
assertNotNull(hb20InstanceModelFile);
assertTrue(hb20InstanceModelFile.exists());
- Application application = (Application) EcorePlatformUtil.loadModelRoot(refWks.editingDomain20, hb20InstanceModelFile);
- assertNotNull(application);
// Load xpt resource
IFile xptFile = refWks.codegenXpandProject.getFile(XtendXpandTestReferenceWorkspace.CONFIGH_XPT_FILE_PATH);
assertNotNull(xptFile);
assertTrue(xptFile.exists());
- // Xpand execution
- XpandEvaluationRequest xpandEvaluationRequest = new XpandEvaluationRequest(XtendXpandTestReferenceWorkspace.XPAND_CONFIGH_DEFINITION_NAME,
- application);
+ // Load resource, create Xpand job and generate code
+ Hummingbird20Codegen(hb20InstanceModelFile, XtendXpandTestReferenceWorkspace.XPAND_CONFIGH_DEFINITION_NAME,
+ XtendXpandTestReferenceWorkspace.XPAND_CONFIGH_TOHOUTLET_DEFINITION_NAME);
+ }
+
+ /**
+ * Test get resource file from plug-ins in the execution.
+ */
+ public void testGetResourceFile_plugin() throws Exception {
+ // Load Hummingbird resource
+ IFile hb20InstanceModelFile = refWks.codegenXpandProject
+ .getFile(XtendXpandTestReferenceWorkspace.HB_CODEGEN_XPAND_PROJECT_HB_INSTANCE_MODEL_PATH);
+ assertNotNull(hb20InstanceModelFile);
+ assertTrue(hb20InstanceModelFile.exists());
+
+ BasicWorkspaceResourceLoader resourceLoader = new BasicWorkspaceResourceLoader();
+ // Gets the underlying file associated to "templates::ConfigHP::main" extension defined in the plug-in
+ IFile definitionFile = XtendXpandUtil.getUnderlyingFile(XtendXpandTestReferenceWorkspace.XPAND_CONFIGH_DEFINITION_FROM_PLUGIN_NAME,
+ IXtendXpandConstants.TEMPLATE_EXTENSION, resourceLoader);
+ assertNull(definitionFile);
+ }
+
+ /**
+ * Creates Xpand Job. Execute the Xpand job, and generate the code.
+ */
+ public void Hummingbird20Codegen(IFile hb20InstanceModelFile, String xPandConfigHDefinitionName, String xPandConfigHToHoutletDefinitionName)
+ throws Exception {
+ Application application = (Application) EcorePlatformUtil.loadModelRoot(refWks.editingDomain20, hb20InstanceModelFile);
+ assertNotNull(application);
+
+ // Create Xpand Job
+ XpandEvaluationRequest xpandEvaluationRequest = new XpandEvaluationRequest(xPandConfigHDefinitionName, application);
SphinxManagedEmfMetaModel metaModel = new SphinxManagedEmfMetaModel(hb20InstanceModelFile.getProject());
XpandJob xpandJob = new XpandJob("Xpand Job", metaModel, xpandEvaluationRequest); //$NON-NLS-1$
+
+ // Xpand execution
xpandJob.setWorkspaceResourceLoader(new BasicWorkspaceResourceLoader());
IStatus xpandStatus = xpandJob.runInWorkspace(new NullProgressMonitor());
- assertEquals("File encoding of " + xptFile.getFullPath() + ":" + xptFile.getCharset(), Status.OK_STATUS, xpandStatus);
+ assertEquals(Status.OK_STATUS, xpandStatus);
// Load generated resource from current working directory and verify its content
File file = new File(XtendXpandTestReferenceWorkspace.CONFIGH_FILE_NAME);
@@ -78,11 +113,11 @@
*/
// Load xpt resource
- xptFile = refWks.codegenXpandProject.getFile(XtendXpandTestReferenceWorkspace.CONFIGH_TO_HOUTLET_XPT_FILE_PATH);
+ IFile xptFile = refWks.codegenXpandProject.getFile(XtendXpandTestReferenceWorkspace.CONFIGH_TO_HOUTLET_XPT_FILE_PATH);
assertNotNull(xptFile);
assertTrue(xptFile.exists());
- xpandEvaluationRequest = new XpandEvaluationRequest(XtendXpandTestReferenceWorkspace.XPAND_CONFIGH_TOHOUTLET_DEFINITION_NAME, application);
+ xpandEvaluationRequest = new XpandEvaluationRequest(xPandConfigHToHoutletDefinitionName, application);
xpandJob = new XpandJob("Xpand Job", metaModel, xpandEvaluationRequest); //$NON-NLS-1$
xpandJob.setWorkspaceResourceLoader(new BasicWorkspaceResourceLoader());
@@ -126,4 +161,5 @@
inputStream.close();
}
}
+
}
diff --git a/tests/org.eclipse.sphinx.tests.xtendxpand.integration/templates/ConfigHP.xpt b/tests/org.eclipse.sphinx.tests.xtendxpand.integration/templates/ConfigHP.xpt
new file mode 100644
index 0000000..63e67b8
--- /dev/null
+++ b/tests/org.eclipse.sphinx.tests.xtendxpand.integration/templates/ConfigHP.xpt
@@ -0,0 +1,48 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2011 See4sys and others.
+ * 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:
+ * See4sys - Initial API and implementation
+ *
+ * </copyright>
+ */
+«IMPORT instancemodel»
+
+«DEFINE main FOR Application»
+«FILE "Config.h"»
+/**
+ * @file Config.h
+ * @version $Revision: 1.1 $, $Date: 2007/05/21 08:54:08 $
+ *
+ * @brief System-related options and parameter settings, and inline
+ * invocation targets
+ */
+
+#ifndef _CONFIG_H
+#define _CONFIG_H
+«EXPAND configEntry FOREACH components»
+#endif /* _CONFIG_H */
+«ENDFILE»
+«ENDDEFINE»
+
+
+«DEFINE configEntry FOR Component»
+// Parameters of component «name»
+«EXPAND configEntry FOREACH parameterValues-»
+«ENDDEFINE»
+
+
+«DEFINE configEntry FOR ParameterValue-»
+«EXPAND comment FOR this-»
+#define «name» «value»
+«ENDDEFINE»
+
+
+«DEFINE comment FOR ParameterValue-»
+«ENDDEFINE»
\ No newline at end of file
diff --git a/tests/org.eclipse.sphinx.tests.xtendxpand.integration/templates/ConfigHToHoutletP.xpt b/tests/org.eclipse.sphinx.tests.xtendxpand.integration/templates/ConfigHToHoutletP.xpt
new file mode 100644
index 0000000..6f04d19
--- /dev/null
+++ b/tests/org.eclipse.sphinx.tests.xtendxpand.integration/templates/ConfigHToHoutletP.xpt
@@ -0,0 +1,48 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2011 See4sys and others.
+ * 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:
+ * See4sys - Initial API and implementation
+ *
+ * </copyright>
+ */
+«IMPORT instancemodel»
+
+«DEFINE main FOR Application»
+«FILE "Config.h" HOUTLET»
+/**
+ * @file Config.h
+ * @version $Revision: 1.1 $, $Date: 2007/05/21 08:54:08 $
+ *
+ * @brief System-related options and parameter settings, and inline
+ * invocation targets
+ */
+
+#ifndef _CONFIG_H
+#define _CONFIG_H
+«EXPAND configEntry FOREACH components»
+#endif /* _CONFIG_H */
+«ENDFILE»
+«ENDDEFINE»
+
+
+«DEFINE configEntry FOR Component»
+// Parameters of component «name»
+«EXPAND configEntry FOREACH parameterValues-»
+«ENDDEFINE»
+
+
+«DEFINE configEntry FOR ParameterValue-»
+«EXPAND comment FOR this-»
+#define «name» «value»
+«ENDDEFINE»
+
+
+«DEFINE comment FOR ParameterValue-»
+«ENDDEFINE»
\ No newline at end of file
diff --git a/tests/org.eclipse.sphinx.tests.xtendxpand.integration/templates/LogDemoP.xpt b/tests/org.eclipse.sphinx.tests.xtendxpand.integration/templates/LogDemoP.xpt
new file mode 100644
index 0000000..bce22da
--- /dev/null
+++ b/tests/org.eclipse.sphinx.tests.xtendxpand.integration/templates/LogDemoP.xpt
@@ -0,0 +1,31 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2011 itemis and others.
+ * 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:
+ * itemis - Initial API and implementation
+ *
+ * </copyright>
+ */
+«IMPORT instancemodel»
+«EXTENSION org::eclipse::xtend::util::stdlib::io»
+«EXTENSION org::eclipse::sphinx::examples::hummingbird::codegen::xpand::extensions::LogUtil»
+
+«DEFINE logUsingStdLibLogFunctions FOR Application»
+ «info("This is an info level log message")»
+ «debug("This is a debug level log message")»
+ «error("This is an error level log message")»
+«ENDDEFINE»
+
+«DEFINE logUsingStdLibSysErrFunction FOR Application»
+ «syserr(this, "This is a dump of 'this' object to System#err")»
+«ENDDEFINE»
+
+«DEFINE logUsingCustomLogFunction FOR Application»
+«log("This is a custom log message")»
+«ENDDEFINE»
\ No newline at end of file
diff --git a/tests/org.eclipse.sphinx.testutils.integration.referenceworkspace.xtendxpand/src/org/eclipse/sphinx/testutils/integration/referenceworkspace/xtendxpand/XtendXpandTestReferenceWorkspace.java b/tests/org.eclipse.sphinx.testutils.integration.referenceworkspace.xtendxpand/src/org/eclipse/sphinx/testutils/integration/referenceworkspace/xtendxpand/XtendXpandTestReferenceWorkspace.java
index 2e64975..9c7fb3f 100644
--- a/tests/org.eclipse.sphinx.testutils.integration.referenceworkspace.xtendxpand/src/org/eclipse/sphinx/testutils/integration/referenceworkspace/xtendxpand/XtendXpandTestReferenceWorkspace.java
+++ b/tests/org.eclipse.sphinx.testutils.integration.referenceworkspace.xtendxpand/src/org/eclipse/sphinx/testutils/integration/referenceworkspace/xtendxpand/XtendXpandTestReferenceWorkspace.java
@@ -1,7 +1,7 @@
/**
* <copyright>
*
- * Copyright (c) 2011 See4sys and others.
+ * Copyright (c) 2011-2013 See4sys, itemis and others.
* 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
@@ -9,6 +9,7 @@
*
* Contributors:
* See4sys - Initial API and implementation
+ * itemis - [406564] BasicWorkspaceResourceLoader#getResource should not delegate to super
*
* </copyright>
*/
@@ -75,6 +76,12 @@
public static final String XPAND_CONFIGH_TOHOUTLET_DEFINITION_NAME = "templates::ConfigHToHoutlet::main";
+ public static final String XPAND_CONFIGH_DEFINITION_FROM_PLUGIN_NAME = "templates::ConfigHP::main";
+
+ public static final String XPAND_CONFIGH = "templates::ConfigH";
+
+ public static final String XPAND_CONFIGHP = "templates::ConfigHP";
+
// Check model.
//
public static final String HB_CODEGEN_XPAND_PROJECT_CHECK_FILE_PATH = "checks/hb20Check.chk";
@@ -123,5 +130,4 @@
protected String[] getReferenceProjectsNames() {
return new String[] { HB_TRANSFORM_XTEND_PROJECT_NAME, HB_CODEGEN_XPAND_PROJECT_NAME };
}
-
}
\ No newline at end of file