Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xskeleton/create_new_feature.py6
-rw-r--r--skeleton/pom.xml2
-rw-r--r--skeleton/skeleton.core.tests/build.properties2
-rw-r--r--skeleton/skeleton.core.tests/plugin.properties2
-rw-r--r--skeleton/skeleton.core.tests/src/ActivatorTest.java2
-rw-r--r--skeleton/skeleton.core/build.properties2
-rw-r--r--skeleton/skeleton.core/plugin.properties2
-rw-r--r--skeleton/skeleton.core/src/Activator.java2
-rw-r--r--skeleton/skeleton.core/src/package-info.java2
-rw-r--r--skeleton/skeleton.doc.user/build.properties2
-rw-r--r--skeleton/skeleton.doc.user/plugin.properties2
-rw-r--r--skeleton/skeleton.feature/build.properties2
-rw-r--r--skeleton/skeleton.feature/feature.properties2
-rw-r--r--skeleton/skeleton.ui.swtbot.tests/build.properties2
-rw-r--r--skeleton/skeleton.ui.swtbot.tests/plugin.properties2
-rw-r--r--skeleton/skeleton.ui/build.properties2
-rw-r--r--skeleton/skeleton.ui/plugin.properties2
-rw-r--r--skeleton/skeleton.ui/src/Activator.java2
-rw-r--r--skeleton/skeleton.ui/src/package-info.java2
19 files changed, 24 insertions, 18 deletions
diff --git a/skeleton/create_new_feature.py b/skeleton/create_new_feature.py
index 1563b0e57..fc5f5738d 100755
--- a/skeleton/create_new_feature.py
+++ b/skeleton/create_new_feature.py
@@ -11,18 +11,22 @@
import argparse
import shutil
import os
+import time
parser = argparse.ArgumentParser(description='Creates the plugins and feature for a new incubator functionnality.')
parser.add_argument('name', help='The human readable name of the plugins and feature to add. The plugin names will the the dot-separated lowercase name. For example if name is "My Test Plugin", plugins will be named org.eclipse.tracecompass.incubator.my.test.plugin')
parser.add_argument('--dir', help='Directory in which to add the plugins')
parser.add_argument('--no-ui', dest='noUi', action='store_const', const=True, default=False, help='Whether to add a UI plugin for this feature')
parser.add_argument('--no-help', dest='noHelp', action='store_const', const=True, default=False, help='Whether to add an help plugin for this feature')
+parser.add_argument('--year', default=time.strftime("%Y"), help='The current year (defaults to current year from system time)')
parser.add_argument('--copyright', default="École Polytechnique de Montréal", help='The organisation that has the copyright on the new files')
args = parser.parse_args()
idPlaceholder = "{%skeleton}"
namePlaceholder = "{%skeletonName}"
+yearPlaceholder = "{%year}"
copyrightPlaceholder = "{%copyright}"
+year = args.year
copyright = args.copyright
baseDir = os.path.dirname(os.path.realpath(__file__))
@@ -53,6 +57,7 @@ def copyAndUpdate(srcDir, destDir, name, id):
s = f.read()
s = s.replace(idPlaceholder, id)
s = s.replace(namePlaceholder, name)
+ s = s.replace(yearPlaceholder, year)
s = s.replace(copyrightPlaceholder, copyright)
with open(fpath, encoding = "utf-8", mode = "w") as f:
f.write(s)
@@ -78,6 +83,7 @@ def updatePom(baseDir, destDir, id, moduleStr):
s = f.read();
s = s.replace("{%dir}", destDir)
s = s.replace(pomModulePlaceholder, moduleStr + pomModulePlaceholder)
+ s = s.replace(yearPlaceholder, year)
s = s.replace(copyrightPlaceholder, copyright)
with open(destPom, encoding = "utf-8", mode = 'w+') as f:
f.write(s)
diff --git a/skeleton/pom.xml b/skeleton/pom.xml
index 45273d1c0..2274a677f 100644
--- a/skeleton/pom.xml
+++ b/skeleton/pom.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (C) 2017 {%copyright}
+ Copyright (C) {%year} {%copyright}
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
diff --git a/skeleton/skeleton.core.tests/build.properties b/skeleton/skeleton.core.tests/build.properties
index 19b31a511..4ea742cfb 100644
--- a/skeleton/skeleton.core.tests/build.properties
+++ b/skeleton/skeleton.core.tests/build.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2018 {%copyright}
+# Copyright (c) {%year} {%copyright}
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
diff --git a/skeleton/skeleton.core.tests/plugin.properties b/skeleton/skeleton.core.tests/plugin.properties
index 71bb0f34c..6a4222bba 100644
--- a/skeleton/skeleton.core.tests/plugin.properties
+++ b/skeleton/skeleton.core.tests/plugin.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2018 {%copyright}
+# Copyright (c) {%year} {%copyright}
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
diff --git a/skeleton/skeleton.core.tests/src/ActivatorTest.java b/skeleton/skeleton.core.tests/src/ActivatorTest.java
index fa59641d3..ef75a08d2 100644
--- a/skeleton/skeleton.core.tests/src/ActivatorTest.java
+++ b/skeleton/skeleton.core.tests/src/ActivatorTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2018 {%copyright}
+ * Copyright (c) {%year} {%copyright}
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
diff --git a/skeleton/skeleton.core/build.properties b/skeleton/skeleton.core/build.properties
index b2b78f7a0..407f8fdca 100644
--- a/skeleton/skeleton.core/build.properties
+++ b/skeleton/skeleton.core/build.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2018 {%copyright}
+# Copyright (c) {%year} {%copyright}
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
diff --git a/skeleton/skeleton.core/plugin.properties b/skeleton/skeleton.core/plugin.properties
index f5c290e0d..c86606207 100644
--- a/skeleton/skeleton.core/plugin.properties
+++ b/skeleton/skeleton.core/plugin.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2018 {%copyright}
+# Copyright (c) {%year} {%copyright}
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
diff --git a/skeleton/skeleton.core/src/Activator.java b/skeleton/skeleton.core/src/Activator.java
index 19c13aa54..1c3fa6343 100644
--- a/skeleton/skeleton.core/src/Activator.java
+++ b/skeleton/skeleton.core/src/Activator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2018 {%copyright}
+ * Copyright (c) {%year} {%copyright}
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
diff --git a/skeleton/skeleton.core/src/package-info.java b/skeleton/skeleton.core/src/package-info.java
index 7c4be17af..ff35acb3d 100644
--- a/skeleton/skeleton.core/src/package-info.java
+++ b/skeleton/skeleton.core/src/package-info.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2018 {%copyright}
+ * Copyright (c) {%year} {%copyright}
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
diff --git a/skeleton/skeleton.doc.user/build.properties b/skeleton/skeleton.doc.user/build.properties
index bc085bfad..025848fac 100644
--- a/skeleton/skeleton.doc.user/build.properties
+++ b/skeleton/skeleton.doc.user/build.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2017 {%copyright}
+# Copyright (c) {%year} {%copyright}
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
diff --git a/skeleton/skeleton.doc.user/plugin.properties b/skeleton/skeleton.doc.user/plugin.properties
index 594e5f7e9..afa4d68cf 100644
--- a/skeleton/skeleton.doc.user/plugin.properties
+++ b/skeleton/skeleton.doc.user/plugin.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2017 {%copyright}
+# Copyright (c) {%year} {%copyright}
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
diff --git a/skeleton/skeleton.feature/build.properties b/skeleton/skeleton.feature/build.properties
index 52b2dcd7e..7e5b5e812 100644
--- a/skeleton/skeleton.feature/build.properties
+++ b/skeleton/skeleton.feature/build.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2018 {%copyright}
+# Copyright (c) {%year} {%copyright}
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
diff --git a/skeleton/skeleton.feature/feature.properties b/skeleton/skeleton.feature/feature.properties
index 0c37c1701..c5a883e64 100644
--- a/skeleton/skeleton.feature/feature.properties
+++ b/skeleton/skeleton.feature/feature.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2018 {%copyright}
+# Copyright (c) {%year} {%copyright}
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
diff --git a/skeleton/skeleton.ui.swtbot.tests/build.properties b/skeleton/skeleton.ui.swtbot.tests/build.properties
index 19b31a511..4ea742cfb 100644
--- a/skeleton/skeleton.ui.swtbot.tests/build.properties
+++ b/skeleton/skeleton.ui.swtbot.tests/build.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2018 {%copyright}
+# Copyright (c) {%year} {%copyright}
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
diff --git a/skeleton/skeleton.ui.swtbot.tests/plugin.properties b/skeleton/skeleton.ui.swtbot.tests/plugin.properties
index 5d2808ae2..0ad064d73 100644
--- a/skeleton/skeleton.ui.swtbot.tests/plugin.properties
+++ b/skeleton/skeleton.ui.swtbot.tests/plugin.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2018 {%copyright}
+# Copyright (c) {%year} {%copyright}
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
diff --git a/skeleton/skeleton.ui/build.properties b/skeleton/skeleton.ui/build.properties
index 19b31a511..4ea742cfb 100644
--- a/skeleton/skeleton.ui/build.properties
+++ b/skeleton/skeleton.ui/build.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2018 {%copyright}
+# Copyright (c) {%year} {%copyright}
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
diff --git a/skeleton/skeleton.ui/plugin.properties b/skeleton/skeleton.ui/plugin.properties
index 5d2808ae2..0ad064d73 100644
--- a/skeleton/skeleton.ui/plugin.properties
+++ b/skeleton/skeleton.ui/plugin.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2018 {%copyright}
+# Copyright (c) {%year} {%copyright}
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
diff --git a/skeleton/skeleton.ui/src/Activator.java b/skeleton/skeleton.ui/src/Activator.java
index 9f452e0c7..e18d561ad 100644
--- a/skeleton/skeleton.ui/src/Activator.java
+++ b/skeleton/skeleton.ui/src/Activator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2018 {%copyright}
+ * Copyright (c) {%year} {%copyright}
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
diff --git a/skeleton/skeleton.ui/src/package-info.java b/skeleton/skeleton.ui/src/package-info.java
index 7464d2b88..d47c5eafa 100644
--- a/skeleton/skeleton.ui/src/package-info.java
+++ b/skeleton/skeleton.ui/src/package-info.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2018 {%copyright}
+ * Copyright (c) {%year} {%copyright}
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which

Back to the top