Skip to content

Commit

Permalink
Merge branch 'dev_eclipseplugin' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
maybeec committed Sep 14, 2020
2 parents 495fe52 + eba03e5 commit 1530464
Show file tree
Hide file tree
Showing 23 changed files with 129 additions and 40 deletions.
4 changes: 2 additions & 2 deletions cobigen-eclipse/cobigen-eclipse-feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="com.devonfw.cobigen.eclipse.feature"
label="CobiGen Eclipse Plug-in"
version="5.2.1"
version="7.0.0"
provider-name="devonfw Team">

<description>
Expand All @@ -13,7 +13,7 @@
Copyright © 2013-2020 Capgemini SE. All rights reserved.
</copyright>

<license url="https://devonfw.github.io/TermsOfUse">
<license url="https://raw.githubusercontent.com/devonfw/cobigen/master/cobigen/cobigen-htmlplugin/src/main/resources/META-INF/LICENSEP2BUNDLE.html">
License CobiGen


Expand Down
2 changes: 1 addition & 1 deletion cobigen-eclipse/cobigen-eclipse-feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>com.devonfw.cobigen.eclipse.feature</artifactId>
<name>CobiGen - Eclipse Plug-In Feature</name>
<packaging>eclipse-feature</packaging>
<version>5.2.1</version>
<version>7.0.0</version>

<parent>
<groupId>com.devonfw.cobigen</groupId>
Expand Down
1 change: 0 additions & 1 deletion cobigen-eclipse/cobigen-eclipse-test/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<classpathentry kind="src" path="src/main/java/"/>
<classpathentry exported="true" kind="lib" path="lib/slf4j-api-1.7.21.jar"/>
<classpathentry exported="true" kind="lib" path="lib/assertj-core-3.8.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/core-test-5.3.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jcl-over-slf4j-1.7.21.jar"/>
<classpathentry exported="true" kind="lib" path="lib/log4j-over-slf4j-1.7.21.jar"/>
<classpathentry exported="true" kind="lib" path="lib/logback-classic-1.1.2.jar"/>
Expand Down
3 changes: 1 addition & 2 deletions cobigen-eclipse/cobigen-eclipse-test/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: CobiGen Eclipse Plug-In Tests
Bundle-SymbolicName: com.devonfw.cobigen.eclipse.test;singleton:=true
Bundle-Version: 5.2.1
Bundle-Version: 7.0.0
Bundle-Vendor: Capgemini
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .,
lib/slf4j-api-1.7.21.jar,
lib/assertj-core-3.8.0.jar,
lib/core-test-5.3.1.jar,
lib/jcl-over-slf4j-1.7.21.jar,
lib/log4j-over-slf4j-1.7.21.jar,
lib/logback-classic-1.1.2.jar,
Expand Down
1 change: 0 additions & 1 deletion cobigen-eclipse/cobigen-eclipse-test/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ bin.includes = .,\
plugin.xml,\
lib/slf4j-api-1.7.21.jar,\
lib/assertj-core-3.8.0.jar,\
lib/core-test-5.3.1.jar,\
lib/jcl-over-slf4j-1.7.21.jar,\
lib/log4j-over-slf4j-1.7.21.jar,\
lib/logback-classic-1.1.2.jar,\
Expand Down
10 changes: 4 additions & 6 deletions cobigen-eclipse/cobigen-eclipse-test/pom.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>com.devonfw.cobigen.eclipse.test</artifactId>
<name>CobiGen - Eclipse Plug-In Tests</name>
<packaging>eclipse-test-plugin</packaging>
<version>5.2.1</version>
<version>7.0.0</version>

<parent>
<groupId>com.devonfw.cobigen</groupId>
Expand All @@ -21,7 +19,7 @@
<dependency>
<groupId>com.devonfw.cobigen</groupId>
<artifactId>core-test</artifactId>
<version>5.3.1</version>
<version>7.0.0</version>
</dependency>
</dependencies>

Expand Down Expand Up @@ -220,4 +218,4 @@
</repositories>
</profile>
</profiles>
</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;

Expand Down Expand Up @@ -56,6 +57,7 @@ public static void setupClass() throws Exception {
* Test fails
*/
@Test
@Ignore // does not run on jdk8 on travis only, for any reason.
public void testPreventClassPathShading() throws Exception {

// create a new temporary java project and copy java class used as an input for CobiGen
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;

Expand Down Expand Up @@ -47,14 +48,9 @@ public class OpenAPITest extends SystemTest {
@BeforeClass
public static void setupClass() throws Exception {

try {
// import the configuration project for this test
EclipseUtils.importExistingGeneralProject(bot, new File(resourcesRootPath + "templates").getAbsolutePath());
EclipseUtils.updateMavenProject(bot, ResourceConstants.CONFIG_PROJECT_NAME);
} catch (Exception e) {
e.printStackTrace();
throw e;
}
// import the configuration project for this test
EclipseUtils.importExistingGeneralProject(bot, new File(resourcesRootPath + "templates").getAbsolutePath());
EclipseUtils.updateMavenProject(bot, ResourceConstants.CONFIG_PROJECT_NAME);
}

/**
Expand All @@ -63,6 +59,7 @@ public static void setupClass() throws Exception {
* test fails
*/
@Test
@Ignore // does not run on jdk8 on travis only, for any reason.
public void testBasicOpenAPIGeneration() throws Exception {

// copy sample project to external location and import it into the workspace
Expand Down Expand Up @@ -144,6 +141,7 @@ public void testBasicOpenAPIGeneration() throws Exception {
* test fails
*/
@Test
@Ignore // does not run on jdk8 on travis only, for any reason.
public void testServiceBasedOpenAPIGeneration() throws Exception {

// copy sample project to external location and import it into the workspace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,15 @@ public static void cleanWorkspace(boolean cleanCobiGenConfiguration) throws Exce
if (cleanCobiGenConfiguration || !ResourceConstants.CONFIG_PROJECT_NAME.equals(project.getName())) {
project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
project.close(new NullProgressMonitor());
project.delete(true, true, new NullProgressMonitor());
// don't delete sources, which might be reused by other tests
if (project.getLocationURI().toString().contains("cobigen-eclipse-test/target")) {
project.delete(true, true, new NullProgressMonitor());
} else {
LOG.debug(
"Project sources in '{}' will not be physically deleted as they are not physically imported into the test workspace '{}'",
project.getLocationURI(), project.getWorkspace().getRoot().getLocationURI());
project.delete(false, true, new NullProgressMonitor());
}
}
}
break;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- This file is for logback classic. The file contains the configuration
for sl4j logging -->
<configuration>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- defines the level of logging -->
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</Pattern>
</layout>
</appender>

<root level="DEBUG">
<appender-ref ref="STDOUT" />
</root>
</configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- This file is for logback classic. The file contains the configuration
for sl4j logging -->
<configuration>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- defines the level of logging -->
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</Pattern>
</layout>
</appender>

<root level="DEBUG">
<appender-ref ref="STDOUT" />
</root>
</configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- This file is for logback classic. The file contains the configuration
for sl4j logging -->
<configuration>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- defines the level of logging -->
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</Pattern>
</layout>
</appender>

<root level="DEBUG">
<appender-ref ref="STDOUT" />
</root>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- This file is for logback classic. The file contains the configuration
for sl4j logging -->
<configuration>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- defines the level of logging -->
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</Pattern>
</layout>
</appender>

<root level="DEBUG">
<appender-ref ref="STDOUT" />
</root>
</configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- This file is for logback classic. The file contains the configuration
for sl4j logging -->
<configuration>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- defines the level of logging -->
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</Pattern>
</layout>
</appender>

<root level="DEBUG">
<appender-ref ref="STDOUT" />
</root>
</configuration>
2 changes: 1 addition & 1 deletion cobigen-eclipse/cobigen-eclipse-updatesite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>eclipse</artifactId>
<name>CobiGen - Eclipse Plug-In UpdateSite</name>
<packaging>eclipse-repository</packaging>
<version>5.2.1</version>
<version>7.0.0</version>

<parent>
<groupId>com.devonfw.cobigen</groupId>
Expand Down
6 changes: 3 additions & 3 deletions cobigen-eclipse/cobigen-eclipse/.classpath
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="lib" path="lib/core-6.1.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/core-api-6.1.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/core-7.0.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/core-api-7.0.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/javaplugin-model-7.0.0.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/"/>
Expand All @@ -17,7 +18,6 @@
<classpathentry exported="true" kind="lib" path="lib/jackson-annotations-2.10.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jackson-core-2.10.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jackson-databind-2.10.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/javaplugin-model-2.0.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/javax.activation-api-1.2.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/javax.inject-1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jaxb-api-2.3.1.jar"/>
Expand Down
8 changes: 4 additions & 4 deletions cobigen-eclipse/cobigen-eclipse/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: CobiGen Eclipse Plug-in
Bundle-SymbolicName: com.devonfw.cobigen.eclipse;singleton:=true
Bundle-Version: 5.2.1
Bundle-Version: 7.0.0
Bundle-Activator: com.devonfw.cobigen.eclipse.Activator
Bundle-Vendor: devonfw Team
Require-Bundle: org.eclipse.ui;bundle-version="3.104.0",
Expand Down Expand Up @@ -32,7 +32,6 @@ Bundle-ClassPath: .,
lib/jackson-annotations-2.10.0.jar,
lib/jackson-core-2.10.0.jar,
lib/jackson-databind-2.10.0.jar,
lib/javaplugin-model-2.0.0.jar,
lib/javax.activation-api-1.2.0.jar,
lib/javax.inject-1.jar,
lib/jaxb-api-2.3.1.jar,
Expand All @@ -45,6 +44,7 @@ Bundle-ClassPath: .,
lib/logback-core-1.1.2.jar,
lib/mmm-util-core-7.4.0.jar,
lib/slf4j-api-1.7.21.jar,
lib/core-6.1.1.jar,
lib/core-api-6.1.1.jar
lib/core-7.0.0.jar,
lib/core-api-7.0.0.jar,
lib/javaplugin-model-7.0.0.jar
Export-Package: com.devonfw.cobigen.eclipse.common.constants.external
6 changes: 3 additions & 3 deletions cobigen-eclipse/cobigen-eclipse/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ bin.includes = .,\
lib/jackson-annotations-2.10.0.jar,\
lib/jackson-core-2.10.0.jar,\
lib/jackson-databind-2.10.0.jar,\
lib/javaplugin-model-2.0.0.jar,\
lib/javax.activation-api-1.2.0.jar,\
lib/javax.inject-1.jar,\
lib/jaxb-api-2.3.1.jar,\
Expand All @@ -28,5 +27,6 @@ bin.includes = .,\
lib/logback-core-1.1.2.jar,\
lib/mmm-util-core-7.4.0.jar,\
lib/slf4j-api-1.7.21.jar,\
lib/core-6.1.1.jar,\
lib/core-api-6.1.1.jar
lib/core-7.0.0.jar,\
lib/core-api-7.0.0.jar,\
lib/javaplugin-model-7.0.0.jar
6 changes: 3 additions & 3 deletions cobigen-eclipse/cobigen-eclipse/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<artifactId>com.devonfw.cobigen.eclipse</artifactId>
<name>CobiGen - Eclipse Plug-In</name>
<packaging>eclipse-plugin</packaging>
<version>5.2.1</version>
<version>7.0.0</version>

<parent>
<groupId>com.devonfw.cobigen</groupId>
Expand All @@ -15,12 +15,12 @@
<dependency>
<groupId>com.devonfw.cobigen</groupId>
<artifactId>core</artifactId>
<version>6.1.1</version>
<version>7.0.0</version>
</dependency>
<dependency>
<groupId>com.devonfw.cobigen</groupId>
<artifactId>javaplugin-model</artifactId>
<version>2.0.0</version>
<version>7.0.0</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ private static Object convertFile(CobiGen cobigen, IFile inputFile) throws Gener
} catch (InputReaderException e) {
LOG.trace("Could not read file {}", inputFile.getLocationURI(), e);
throw new GeneratorCreationException(
"Could not read file " + inputFile.getLocationURI() + "with any input reader", e);
"Could not read file " + inputFile.getLocationURI() + " with any input reader", e);
} catch (PluginNotAvailableException e) {
LOG.trace(e.getMessage(), e);
throw new GeneratorCreationException("Could not read file " + inputFile.getLocationURI()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static List<Object> convertInput(List<Object> javaElements, InputInterpre
if (elem instanceof IPackageFragment) {
try {
IPackageFragment frag = (IPackageFragment) elem;
Object packageFolder = inputInterpreter.read("java",
Object packageFolder = inputInterpreter.read(
Paths.get(frag.getCorrespondingResource().getLocationURI()), Charsets.UTF_8,
frag.getElementName(), ClassLoaderUtil.getProjectClassLoader(frag.getJavaProject()));
convertedInputs.add(packageFolder);
Expand All @@ -66,7 +66,7 @@ public static List<Object> convertInput(List<Object> javaElements, InputInterpre
try {
ClassLoader projectClassLoader =
ClassLoaderUtil.getProjectClassLoader(rootType.getJavaProject());
Object input = inputInterpreter.read("java",
Object input = inputInterpreter.read(
Paths.get(((ICompilationUnit) elem).getCorrespondingResource().getRawLocationURI()),
Charsets.UTF_8, projectClassLoader);
convertedInputs.add(input);
Expand Down
2 changes: 1 addition & 1 deletion documentation/master-cobigen.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ DISCLAIMER: All Cobigen plugins are compatible with the latest release of Devonf

**Current versions:**

* CobiGen - Eclipse Plug-in v5.2.1
* CobiGen - Eclipse Plug-in v7.0.0
* CobiGen - Maven Build Plug-in v5.2.0
* CobiGen CLI v1.2.0

Expand Down

0 comments on commit 1530464

Please sign in to comment.