Skip to content

Commit 2a46b59

Browse files
Script prepare-commit: autocreate missing files using IntelliJ IDEA (OpenEMS#2083)
When one create modules in IntelliJ .classpath and .project files are missing. These few lines supports the creation of .classpath and .project files. Co-authored-by: Stefan Feilmeier <[email protected]>
1 parent 60c87da commit 2a46b59

File tree

4 files changed

+30
-16
lines changed

4 files changed

+30
-16
lines changed

io.openems.edge.evcs.alpitronic.hypercharger/.project

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>io.openems.edge.evcs.hypercharger</name>
3+
<name>io.openems.edge.evcs.alpitronic.hypercharger</name>
44
<comment></comment>
55
<projects>
66
</projects>

io.openems.edge.io.offgridswitch/.project

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>io.openems.edge.iooffgridswitch</name>
3+
<name>io.openems.edge.io.offgridswitch</name>
44
<comment></comment>
55
<projects>
66
</projects>

io.openems.edge.meter.sma.shm20/.project

-11
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,4 @@
2020
<nature>org.eclipse.jdt.core.javanature</nature>
2121
<nature>bndtools.core.bndnature</nature>
2222
</natures>
23-
<filteredResources>
24-
<filter>
25-
<id>1603622766746</id>
26-
<name></name>
27-
<type>30</type>
28-
<matcher>
29-
<id>org.eclipse.core.resources.regexFilterMatcher</id>
30-
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
31-
</matcher>
32-
</filter>
33-
</filteredResources>
3423
</projectDescription>

tools/prepare-commit.sh

+28-3
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ EOT
7474
fi
7575

7676
# Set default .classpath file
77-
if [ -f "${D}/.classpath" ]; then
78-
cat <<EOT > "${D}/.classpath"
77+
cat <<EOT > "${D}/.classpath"
7978
<?xml version="1.0" encoding="UTF-8"?>
8079
<classpath>
8180
<classpathentry kind="con" path="aQute.bnd.classpath.container"/>
@@ -89,7 +88,33 @@ EOT
8988
<classpathentry kind="output" path="bin"/>
9089
</classpath>
9190
EOT
92-
fi
91+
92+
# Set default .project file
93+
cat <<EOT > "${D}/.project"
94+
<?xml version="1.0" encoding="UTF-8"?>
95+
<projectDescription>
96+
<name>${D}</name>
97+
<comment></comment>
98+
<projects>
99+
</projects>
100+
<buildSpec>
101+
<buildCommand>
102+
<name>org.eclipse.jdt.core.javabuilder</name>
103+
<arguments>
104+
</arguments>
105+
</buildCommand>
106+
<buildCommand>
107+
<name>bndtools.core.bndbuilder</name>
108+
<arguments>
109+
</arguments>
110+
</buildCommand>
111+
</buildSpec>
112+
<natures>
113+
<nature>org.eclipse.jdt.core.javanature</nature>
114+
<nature>bndtools.core.bndnature</nature>
115+
</natures>
116+
</projectDescription>
117+
EOT
93118

94119
# Verify bnd.bnd file
95120
if [ -f "${D}/bnd.bnd" ]; then

0 commit comments

Comments
 (0)