Revision 27794
extProjectBackup/src/org/gvsig/backup/BackUpProjectExtension.java | ||
---|---|---|
1 |
package org.gvsig.backup; |
|
2 |
|
|
3 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
4 |
* |
|
5 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
6 |
* of the Valencian Government (CIT) |
|
7 |
* |
|
8 |
* This program is free software; you can redistribute it and/or |
|
9 |
* modify it under the terms of the GNU General Public License |
|
10 |
* as published by the Free Software Foundation; either version 2 |
|
11 |
* of the License, or (at your option) any later version. |
|
12 |
* |
|
13 |
* This program is distributed in the hope that it will be useful, |
|
14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
16 |
* GNU General Public License for more details. |
|
17 |
* |
|
18 |
* You should have received a copy of the GNU General Public License |
|
19 |
* along with this program; if not, write to the Free Software |
|
20 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
21 |
* MA 02110-1301, USA. |
|
22 |
* |
|
23 |
*/ |
|
24 |
|
|
25 |
import java.awt.event.ActionEvent; |
|
26 |
import java.awt.event.ActionListener; |
|
27 |
import java.io.File; |
|
28 |
|
|
29 |
import javax.swing.JCheckBox; |
|
30 |
import javax.swing.JOptionPane; |
|
31 |
|
|
32 |
import org.gvsig.tools.backup.DefaultBackupGeneratorFactory; |
|
33 |
|
|
34 |
import com.iver.andami.PluginServices; |
|
35 |
import com.iver.andami.messages.NotificationManager; |
|
36 |
import com.iver.andami.plugins.Extension; |
|
37 |
import com.iver.cit.gvsig.ProjectExtension; |
|
38 |
import com.iver.core.preferences.general.GeneralPage; |
|
39 |
import com.iver.utiles.extensionPoints.ExtensionPoint; |
|
40 |
import com.iver.utiles.extensionPoints.ExtensionPoints; |
|
41 |
import com.iver.utiles.extensionPoints.ExtensionPointsSingleton; |
|
42 |
import com.iver.utiles.save.BeforeSavingAdapter; |
|
43 |
import com.iver.utiles.save.SaveEvent; |
|
44 |
|
|
45 |
/** |
|
46 |
* <p>Extension to add support for saving a back up of the <a href="">gvSIG</a> project to be replaced.</p> |
|
47 |
* <p>Adds also a check box in the general preferences to enable or disable that option.</p> |
|
48 |
* |
|
49 |
* @author Pablo Piqueras Bartolom? (pablo.piqueras@iver.es) |
|
50 |
*/ |
|
51 |
public class BackUpProjectExtension extends Extension { |
|
52 |
|
|
53 |
private JCheckBox backUpProjectCBox; |
|
54 |
private BackupConfig backupConfig; |
|
55 |
|
|
56 |
/* |
|
57 |
* (non-Javadoc) |
|
58 |
* @see com.iver.andami.plugins.IExtension#initialize() |
|
59 |
*/ |
|
60 |
public void initialize() { |
|
61 |
try { |
|
62 |
/* 1- Replaces in the General panel in the gvSIG preferences, a checkbox as an option to save a back up of the |
|
63 |
previous gvSIG project to be overwritten as a backup */ |
|
64 |
ExtensionPoints extensionPoints = ExtensionPointsSingleton.getInstance(); |
|
65 |
ExtensionPoint extensionPoint = (ExtensionPoint) extensionPoints.get("AplicationPreferences"); |
|
66 |
|
|
67 |
// Adds the new checkbox |
|
68 |
((GeneralPage)extensionPoint.get("GeneralPage")).addComponent(getBackupProjectCheckBox()); |
|
69 |
|
|
70 |
/* 2- Adds the listener to the ProjectExtension (extension that saves the gvSIG project */ |
|
71 |
ProjectExtension prjExtension = (ProjectExtension) PluginServices.getExtension(ProjectExtension.class); |
|
72 |
|
|
73 |
prjExtension.addListener(new BeforeSavingAdapter() { |
|
74 |
/* |
|
75 |
* (non-Javadoc) |
|
76 |
* @see com.iver.utiles.save.BeforeSavingAdapter#beforeSaving(com.iver.utiles.save.SaveEvent) |
|
77 |
*/ |
|
78 |
public void beforeSaving(SaveEvent e) { |
|
79 |
/* 3- Performs a backup of the file as another file at the same directory, with ".bak" as the file extension */ |
|
80 |
if ((backUpProjectCBox != null) && (backUpProjectCBox.isSelected())) { |
|
81 |
// 3.1- If exists the original file |
|
82 |
try { |
|
83 |
File source = e.getFile(); |
|
84 |
|
|
85 |
// 3.2- Validates if can be written |
|
86 |
// 3.2.1- If there is a project in that path with that name -> perform the backup, otherwise no |
|
87 |
if (source.exists()) { |
|
88 |
// 3.2.2- If can't be read -> notifies it, and finish |
|
89 |
if (! source.canRead()) { |
|
90 |
JOptionPane.showMessageDialog(null, PluginServices.getText(null, "The_project_hasnt_read_permissions"), PluginServices.getText(null, "Warning"), JOptionPane.WARNING_MESSAGE); |
|
91 |
return; |
|
92 |
} |
|
93 |
|
|
94 |
// 3.2.3- If can't be written -> notifies it, and finish |
|
95 |
if (! source.canWrite()) { |
|
96 |
JOptionPane.showMessageDialog(null, PluginServices.getText(null, "The_project_has_only_read_permissions"), PluginServices.getText(null, "Warning"), JOptionPane.WARNING_MESSAGE); |
|
97 |
return; |
|
98 |
} |
|
99 |
|
|
100 |
DefaultBackupGeneratorFactory factory = new DefaultBackupGeneratorFactory(); |
|
101 |
|
|
102 |
// 3.3- Performs the backup |
|
103 |
factory.getBackupGenerator().backup(source); |
|
104 |
} |
|
105 |
} |
|
106 |
catch (Exception ex) { |
|
107 |
NotificationManager.showMessageError(PluginServices.getText(null, "Failed_doing_backup_of_project_to_be_overwritten"), ex); |
|
108 |
} |
|
109 |
} |
|
110 |
} |
|
111 |
}); |
|
112 |
|
|
113 |
// Creates a new backupConfig |
|
114 |
backupConfig = new BackupConfig(); |
|
115 |
|
|
116 |
// Sets the preference value |
|
117 |
backUpProjectCBox.setSelected(backupConfig.isBackupProjectToBeOverwritten()); |
|
118 |
} |
|
119 |
catch (Exception e) { |
|
120 |
NotificationManager.showMessageError(PluginServices.getText(this, "Failed_initializing_the_backup_of_previous_project_to_be_overwritten_extension"), e); |
|
121 |
} |
|
122 |
} |
|
123 |
|
|
124 |
/* |
|
125 |
* (non-Javadoc) |
|
126 |
* @see com.iver.andami.plugins.IExtension#execute(java.lang.String) |
|
127 |
*/ |
|
128 |
public void execute(String actionCommand) { |
|
129 |
} |
|
130 |
|
|
131 |
/* |
|
132 |
* (non-Javadoc) |
|
133 |
* @see com.iver.andami.plugins.IExtension#isEnabled() |
|
134 |
*/ |
|
135 |
public boolean isEnabled() { |
|
136 |
return true; |
|
137 |
} |
|
138 |
|
|
139 |
/* |
|
140 |
* (non-Javadoc) |
|
141 |
* @see com.iver.andami.plugins.IExtension#isVisible() |
|
142 |
*/ |
|
143 |
public boolean isVisible() { |
|
144 |
return true; |
|
145 |
} |
|
146 |
|
|
147 |
/** |
|
148 |
* <p>Gets the check box in the General preferences that determines if it has to save a back up |
|
149 |
* of the previous project to be replaced.</p> |
|
150 |
* |
|
151 |
* @return javax.swing.JCheckBox |
|
152 |
*/ |
|
153 |
public JCheckBox getBackupProjectCheckBox() { |
|
154 |
if (backUpProjectCBox == null) { |
|
155 |
backUpProjectCBox = new JCheckBox(PluginServices.getText(this, "options.general.backup_project_to_be_overwriten")); |
|
156 |
backUpProjectCBox.addActionListener(new ActionListener() { |
|
157 |
/* |
|
158 |
* (non-Javadoc) |
|
159 |
* @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent) |
|
160 |
*/ |
|
161 |
public void actionPerformed(ActionEvent e) { |
|
162 |
backupConfig.setBackupProjectToBeOverwritten(((JCheckBox)e.getSource()).isSelected()); |
|
163 |
} |
|
164 |
}); |
|
165 |
} |
|
166 |
|
|
167 |
return backUpProjectCBox; |
|
168 |
} |
|
169 |
} |
extProjectBackup/src/org/gvsig/backup/BackupConfig.java | ||
---|---|---|
1 |
package org.gvsig.backup; |
|
2 |
|
|
3 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
4 |
* |
|
5 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
6 |
* of the Valencian Government (CIT) |
|
7 |
* |
|
8 |
* This program is free software; you can redistribute it and/or |
|
9 |
* modify it under the terms of the GNU General Public License |
|
10 |
* as published by the Free Software Foundation; either version 2 |
|
11 |
* of the License, or (at your option) any later version. |
|
12 |
* |
|
13 |
* This program is distributed in the hope that it will be useful, |
|
14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
16 |
* GNU General Public License for more details. |
|
17 |
* |
|
18 |
* You should have received a copy of the GNU General Public License |
|
19 |
* along with this program; if not, write to the Free Software |
|
20 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
21 |
* MA 02110-1301, USA. |
|
22 |
* |
|
23 |
*/ |
|
24 |
|
|
25 |
import com.iver.andami.PluginServices; |
|
26 |
import com.iver.utiles.IPersistence; |
|
27 |
import com.iver.utiles.XMLEntity; |
|
28 |
|
|
29 |
/** |
|
30 |
* Stores the backup configuration in memory, and offers a simple |
|
31 |
* interface to change them. |
|
32 |
* |
|
33 |
* @author Pablo Piqueras Bartolom? (pablo.piqueras@iver.es) |
|
34 |
*/ |
|
35 |
public class BackupConfig implements IPersistence { |
|
36 |
public static final String BACKUP_PROJECT_TO_BE_OVERWRITTEN_ID = "backup_project_to_be_overwritten"; |
|
37 |
|
|
38 |
protected boolean backupProjectToBeOverwritten = false; // By default -> false |
|
39 |
protected XMLEntity xmlConfig = null; |
|
40 |
|
|
41 |
/** |
|
42 |
* Creates a new BackupConfig instance |
|
43 |
*/ |
|
44 |
public BackupConfig() { |
|
45 |
super(); |
|
46 |
|
|
47 |
initConfig(); |
|
48 |
} |
|
49 |
|
|
50 |
/* |
|
51 |
* @see com.iver.utiles.IPersistance#getClassName() |
|
52 |
*/ |
|
53 |
public String getClassName() { |
|
54 |
return this.getClass().getName(); |
|
55 |
} |
|
56 |
|
|
57 |
/* |
|
58 |
* (non-Javadoc) |
|
59 |
* @see com.iver.utiles.IPersistance#getXMLEntity() |
|
60 |
*/ |
|
61 |
public XMLEntity getXMLEntity() { |
|
62 |
XMLEntity xml = new XMLEntity(); |
|
63 |
xml.putProperty(BACKUP_PROJECT_TO_BE_OVERWRITTEN_ID, backupProjectToBeOverwritten); |
|
64 |
|
|
65 |
return xml; |
|
66 |
} |
|
67 |
|
|
68 |
/* |
|
69 |
* (non-Javadoc) |
|
70 |
* @see com.iver.utiles.IPersistance#setXMLEntity(com.iver.utiles.XMLEntity) |
|
71 |
*/ |
|
72 |
public void setXMLEntity(XMLEntity xml) { |
|
73 |
if (xml.contains(BACKUP_PROJECT_TO_BE_OVERWRITTEN_ID)) { |
|
74 |
backupProjectToBeOverwritten = xml.getBooleanProperty(BACKUP_PROJECT_TO_BE_OVERWRITTEN_ID); |
|
75 |
} |
|
76 |
else { |
|
77 |
backupProjectToBeOverwritten = false; // By default -> false |
|
78 |
} |
|
79 |
} |
|
80 |
|
|
81 |
/** |
|
82 |
* Sets the XML property {@link BackupConfig#BACKUP_PROJECT_TO_BE_OVERWRITTEN_ID BackupConfig#BACKUP_PROJECT_TO_BE_OVERWRITTEN_ID} |
|
83 |
* |
|
84 |
* @param b the value to persist |
|
85 |
*/ |
|
86 |
public void setBackupProjectToBeOverwritten(boolean b) { |
|
87 |
backupProjectToBeOverwritten = b; |
|
88 |
xmlConfig.putProperty(BACKUP_PROJECT_TO_BE_OVERWRITTEN_ID, backupProjectToBeOverwritten); |
|
89 |
} |
|
90 |
|
|
91 |
/** |
|
92 |
* Gets the XML property {@link BackupConfig#BACKUP_PROJECT_TO_BE_OVERWRITTEN_ID BackupConfig#BACKUP_PROJECT_TO_BE_OVERWRITTEN_ID} |
|
93 |
* |
|
94 |
* @return the value to persist |
|
95 |
*/ |
|
96 |
public boolean isBackupProjectToBeOverwritten() { |
|
97 |
return backupProjectToBeOverwritten; |
|
98 |
} |
|
99 |
|
|
100 |
/** |
|
101 |
* Initializes the configuration of the associated extension. |
|
102 |
*/ |
|
103 |
private void initConfig() { |
|
104 |
PluginServices ps = PluginServices.getPluginServices(this); |
|
105 |
XMLEntity xml = ps.getPersistentXML(); |
|
106 |
XMLEntity child; |
|
107 |
boolean found = false; |
|
108 |
|
|
109 |
for (int i=0; i<xml.getChildrenCount(); i++) { |
|
110 |
child = xml.getChild(i); |
|
111 |
if (child.contains(BACKUP_PROJECT_TO_BE_OVERWRITTEN_ID)) { |
|
112 |
setXMLEntity(child); |
|
113 |
found = true; |
|
114 |
xmlConfig = child; |
|
115 |
backupProjectToBeOverwritten = child.getBooleanProperty(BACKUP_PROJECT_TO_BE_OVERWRITTEN_ID); |
|
116 |
} |
|
117 |
} |
|
118 |
if (!found) { |
|
119 |
child = getXMLEntity(); |
|
120 |
xml.addChild(child); |
|
121 |
xmlConfig = child; |
|
122 |
backupProjectToBeOverwritten = false; |
|
123 |
} |
|
124 |
} |
|
125 |
} |
extProjectBackup/src/org/gvsig/backup/AboutBackUpProjectExtension.java | ||
---|---|---|
1 |
package org.gvsig.backup; |
|
2 |
|
|
3 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
4 |
* |
|
5 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
6 |
* of the Valencian Government (CIT) |
|
7 |
* |
|
8 |
* This program is free software; you can redistribute it and/or |
|
9 |
* modify it under the terms of the GNU General Public License |
|
10 |
* as published by the Free Software Foundation; either version 2 |
|
11 |
* of the License, or (at your option) any later version. |
|
12 |
* |
|
13 |
* This program is distributed in the hope that it will be useful, |
|
14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
16 |
* GNU General Public License for more details. |
|
17 |
* |
|
18 |
* You should have received a copy of the GNU General Public License |
|
19 |
* along with this program; if not, write to the Free Software |
|
20 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
21 |
* MA 02110-1301, USA. |
|
22 |
* |
|
23 |
*/ |
|
24 |
|
|
25 |
import com.iver.andami.PluginServices; |
|
26 |
import com.iver.andami.plugins.Extension; |
|
27 |
import com.iver.cit.gvsig.About; |
|
28 |
import com.iver.cit.gvsig.gui.panels.FPanelAbout; |
|
29 |
|
|
30 |
/** |
|
31 |
* <p>Extension that displays information about the gvSIG's extension for the Backup GVP of the <i>Consejer?a de Medio Ambiente de |
|
32 |
* la Junta de Castilla y Le?n.</p> project. |
|
33 |
* |
|
34 |
* @author Vicente Caballero Navarro (vicente.caballero@iver.es) |
|
35 |
* @author Jaume Dom?nguez Faus (jaume.dominguez@iver.es) |
|
36 |
* @author C?sar Mart?nez Izquierdo (cesar.martinez@iver.es) |
|
37 |
* @author Pablo Piqueras Bartolom? (pablo.piqueras@iver.es) |
|
38 |
* @author Jos? Manuel Viv? Arnal (josemanuel.vivo@iver.es) |
|
39 |
*/ |
|
40 |
public class AboutBackUpProjectExtension extends Extension { |
|
41 |
/* |
|
42 |
* (non-Javadoc) |
|
43 |
* @see com.iver.andami.plugins.IExtension#initialize() |
|
44 |
*/ |
|
45 |
public void initialize() { |
|
46 |
} |
|
47 |
|
|
48 |
/* |
|
49 |
* (non-Javadoc) |
|
50 |
* @see com.iver.andami.plugins.Extension#postInitialize() |
|
51 |
*/ |
|
52 |
public void postInitialize() { |
|
53 |
About about=(About)PluginServices.getExtension(About.class); |
|
54 |
FPanelAbout panelAbout=about.getAboutPanel(); |
|
55 |
java.net.URL aboutURL = this.getClass().getResource("/about.htm"); |
|
56 |
panelAbout.addAboutUrl(PluginServices.getText(this, "extProjectBackup"),aboutURL); |
|
57 |
} |
|
58 |
|
|
59 |
/* |
|
60 |
* (non-Javadoc) |
|
61 |
* @see com.iver.andami.plugins.IExtension#execute(java.lang.String) |
|
62 |
*/ |
|
63 |
public void execute(String actionCommand) { |
|
64 |
} |
|
65 |
|
|
66 |
/* |
|
67 |
* (non-Javadoc) |
|
68 |
* @see com.iver.andami.plugins.IExtension#isEnabled() |
|
69 |
*/ |
|
70 |
public boolean isEnabled() { |
|
71 |
return false; |
|
72 |
} |
|
73 |
|
|
74 |
/* |
|
75 |
* (non-Javadoc) |
|
76 |
* @see com.iver.andami.plugins.IExtension#isVisible() |
|
77 |
*/ |
|
78 |
public boolean isVisible() { |
|
79 |
return false; |
|
80 |
} |
|
81 |
} |
extProjectBackup/build.xml | ||
---|---|---|
1 |
<project name="extProjectBackup" default="install" basedir="."> |
|
2 |
|
|
3 |
<description> |
|
4 |
Installs the plugin extProjectBackup in Andami. |
|
5 |
</description> |
|
6 |
|
|
7 |
<!-- set global properties for this build --> |
|
8 |
<property name="src" location="src"/> |
|
9 |
<property name="build" location="bin"/> |
|
10 |
<property name="dist" location="dist"/> |
|
11 |
<property name="lib" location="lib"/> |
|
12 |
<property name="plugin" value="org.gvsig.backup"/> |
|
13 |
<property name="andami-lib" value="../_fwAndami/lib"/> |
|
14 |
<property name="andami" value="../_fwAndami/"/> |
|
15 |
<property name="extension-dir" location="../_fwAndami/gvSIG/extensiones"/> |
|
16 |
<property name="validation-dir" location="../_fwAndami/lib"/> |
|
17 |
<property name="gvSIGlib-dir" location="${extension-dir}/com.iver.cit.gvsig/lib"/> |
|
18 |
<property name="model-dir" location="../_fwAndami/gvSIG/extensiones/"/> |
|
19 |
<property name="img-dir" location="../_fwAndami/src/images"/> |
|
20 |
<property name="theme-dir" location="../_fwAndami/theme"/> |
|
21 |
<property name="gvSIG-dir" location="${extension-dir}/com.iver.cit.gvsig/"/> |
|
22 |
<property name="jarName" value="org.gvsig.backup.jar"/> |
|
23 |
<import file="../binaries/ant/utilities.xml"/> |
|
24 |
|
|
25 |
<target name="init"> |
|
26 |
<!-- Create the time stamp --> |
|
27 |
<tstamp/> |
|
28 |
<!-- Create the build directory structure used by compile --> |
|
29 |
<mkdir dir="${build}"/> |
|
30 |
<mkdir dir="${dist}"/> |
|
31 |
<!-- Creamos un fichero con el timeStamp para que lo lea el FPanelAbout --> |
|
32 |
<!-- <buildnumber/> --> |
|
33 |
</target> |
|
34 |
|
|
35 |
<target name="install" depends="compile,generate-without-source,generate-validation-without-source, generate-model-without-source"> |
|
36 |
</target> |
|
37 |
|
|
38 |
<target name="buildNumber"> |
|
39 |
<propertyfile |
|
40 |
file="build.number" |
|
41 |
comment="Build Number for ANT. Do not edit!"> |
|
42 |
<entry |
|
43 |
key="build.number" |
|
44 |
default="0" |
|
45 |
type="int" operation="+"/> |
|
46 |
</propertyfile> |
|
47 |
<property file="build.number"/> |
|
48 |
</target> |
|
49 |
|
|
50 |
|
|
51 |
<target name="distribution" depends="buildNumber,install"> |
|
52 |
</target> |
|
53 |
|
|
54 |
|
|
55 |
<target name="generate-without-source" description="generate the distribution without the source file" > |
|
56 |
<!-- Create the distribution directory --> |
|
57 |
<mkdir dir="${dist}"/> |
|
58 |
|
|
59 |
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file --> |
|
60 |
<jar jarfile="${dist}/${plugin}.jar" basedir="${build}"/> |
|
61 |
|
|
62 |
<copy todir="${dist}"> |
|
63 |
<fileset dir="config/" includes="*"/> |
|
64 |
</copy> |
|
65 |
|
|
66 |
<mkdir dir="${dist}/images"/> |
|
67 |
<copy todir="${dist}/images"> |
|
68 |
<fileset dir="images" includes="*"/> |
|
69 |
</copy> |
|
70 |
<copy todir="${dist}"> |
|
71 |
<fileset dir="lib" includes="*"/> |
|
72 |
</copy> |
|
73 |
|
|
74 |
<loadproperties srcFile="build.number"/> |
|
75 |
<replace casesensitive="true" |
|
76 |
file="${dist}/about.htm" |
|
77 |
token="#build.number#" |
|
78 |
value="${build.number}"/> |
|
79 |
<copy todir="${dist}"> |
|
80 |
<fileset dir="config" includes="text*.properties"/> |
|
81 |
</copy> |
|
82 |
|
|
83 |
<copy file="build.number" todir="${dist}"/> |
|
84 |
|
|
85 |
<!-- <move file="${dist}/${plugin}.jar" todir="${gvSIGlib-dir}" /> |
|
86 |
<move todir="${extension-dir}/${plugin}/"> |
|
87 |
<fileset dir="${dist}" includes="**/**" /> |
|
88 |
</move> --> |
|
89 |
</target> |
|
90 |
|
|
91 |
<target name="compile" description="compile the source" > |
|
92 |
<!-- Compile the Java code from ${src} to ${build} --> |
|
93 |
<mkdir dir="${build}" /> |
|
94 |
<loadEclipseClasspath project="${basedir}"/> |
|
95 |
<gvSIG-javac |
|
96 |
classpath="${eclipseClasspath}" |
|
97 |
/> |
|
98 |
|
|
99 |
<!--<javac srcdir="${src}" |
|
100 |
destdir="${build}" |
|
101 |
source="${JavaSourceVersion}" |
|
102 |
target="${JavaTargetVersion}" |
|
103 |
debug="${debug}" |
|
104 |
debuglevel="${debuglevel}"> |
|
105 |
<classpath refid="libFMap.compile-classpath"/> |
|
106 |
</javac>--> |
|
107 |
<!-- copy data files --> |
|
108 |
<copy todir="${build}"> |
|
109 |
<fileset |
|
110 |
dir="src" |
|
111 |
excludes="**/*.java"/> |
|
112 |
</copy> |
|
113 |
</target> |
|
114 |
|
|
115 |
<target name="generate-validation-without-source" description="generate the validation module distribution without the source file" > |
|
116 |
<!-- Create the distribution directory --> |
|
117 |
<mkdir dir="${dist}"/> |
|
118 |
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file --> |
|
119 |
|
|
120 |
<!-- <copy todir="${build}/images"> |
|
121 |
<fileset dir="images/" includes="*"/> |
|
122 |
</copy> --> |
|
123 |
<move todir="${extension-dir}/${plugin}/"> |
|
124 |
<fileset dir="${dist}" includes="**/**"/> |
|
125 |
</move> |
|
126 |
|
|
127 |
</target> |
|
128 |
|
|
129 |
<target name="generate-model-without-source" description="generate the model module distribution without the source file" > |
|
130 |
<!-- Create the distribution directory --> |
|
131 |
<mkdir dir="${dist}"/> |
|
132 |
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file --> |
|
133 |
<move todir="${extension-dir}/${plugin}/"> |
|
134 |
<fileset dir="${dist}" includes="**/**"/> |
|
135 |
</move> |
|
136 |
|
|
137 |
</target> |
|
138 |
</project> |
extProjectBackup/.classpath | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<classpath> |
|
3 |
<classpathentry kind="src" path="src"/> |
|
4 |
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> |
|
5 |
<classpathentry kind="lib" path="/_fwAndami/andami.jar"/> |
|
6 |
<classpathentry kind="lib" path="/_fwAndami/lib/iver-utiles.jar" sourcepath="/libIverUtiles"/> |
|
7 |
<classpathentry combineaccessrules="false" kind="src" path="/libCorePlugin"/> |
|
8 |
<classpathentry combineaccessrules="false" kind="src" path="/appgvSIG"/> |
|
9 |
<classpathentry kind="lib" path="/_fwAndami/lib/org.gvsig.ui.jar" sourcepath="/libUIComponent/src"/> |
|
10 |
<classpathentry kind="output" path="bin"/> |
|
11 |
</classpath> |
extProjectBackup/.project | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<projectDescription> |
|
3 |
<name>extProjectBackup</name> |
|
4 |
<comment></comment> |
|
5 |
<projects> |
|
6 |
</projects> |
|
7 |
<buildSpec> |
|
8 |
<buildCommand> |
|
9 |
<name>org.eclipse.jdt.core.javabuilder</name> |
|
10 |
<arguments> |
|
11 |
</arguments> |
|
12 |
</buildCommand> |
|
13 |
</buildSpec> |
|
14 |
<natures> |
|
15 |
<nature>org.eclipse.jdt.core.javanature</nature> |
|
16 |
</natures> |
|
17 |
</projectDescription> |
extProjectBackup/config/text.properties | ||
---|---|---|
1 |
extProjectBackup=Extensi?n Backup GVP |
|
2 |
The_project_hasnt_read_permissions=El proyecto no tiene permisos de lectura. |
|
3 |
The_project_has_only_read_permissions=El proyecto tiene solo permisos de lectura. |
|
4 |
Failed_doing_backup_of_project_to_be_overwritten=Fall? realizando el back up de proyecto a sobrescribir. |
|
5 |
Failed_initializing_the_backup_of_previous_project_to_be_overwritten_extension=Fall? inicializando la extensi?n de back up de proyecto a sobrescribir. |
|
6 |
options.general.backup_project_to_be_overwriten=Guardar copia de seguridad de proyecto a sobrescribir. |
extProjectBackup/config/about.htm | ||
---|---|---|
1 |
<html> |
|
2 |
<head> |
|
3 |
<title>Backup Proyecto GVP al Salvar. Proyecto Junta de Castilla y León. Extensiones de gvSIG.</title> |
|
4 |
<meta content=""> |
|
5 |
<style type="text/css"> |
|
6 |
body { |
|
7 |
background-color: #7e7e7e; |
|
8 |
background-image: url(images/about.jpg); |
|
9 |
background-position: top center; |
|
10 |
background-repeat:no-repeat; |
|
11 |
} |
|
12 |
|
|
13 |
html, body, h1, h2, h3, h4, div, p, ul, li, input { |
|
14 |
font-family: Arial, Helvetica, sans-serif; |
|
15 |
} |
|
16 |
|
|
17 |
p, h1, h2, h3 { |
|
18 |
text-align: center; |
|
19 |
} |
|
20 |
|
|
21 |
</style> |
|
22 |
</head> |
|
23 |
<body> |
|
24 |
<br><br><br><br><br><br><br><br><br><br><br><br> |
|
25 |
<p>Version: 0.1 |
|
26 |
<br>Build Number: #build.number#</p> |
|
27 |
<p><br><br><br><a href="http://www.iver.es/">http://www.iver.es/</a></p> |
|
28 |
</body> |
|
29 |
</html> |
extProjectBackup/config/config.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<plugin-config> |
|
3 |
<libraries library-dir="."/> |
|
4 |
<depends plugin-name="com.iver.cit.gvsig"/> |
|
5 |
<depends plugin-name="com.iver.core"/> |
|
6 |
<resourceBundle name="text"/> |
|
7 |
<extensions> |
|
8 |
<extension class-name="org.gvsig.backup.AboutBackUpProjectExtension" |
|
9 |
description="GVP Backup Extension for the Consejer?a de Medio Ambiente of the Junta de Castilla y Le?n Project." |
|
10 |
active="true" |
|
11 |
priority="1"> |
|
12 |
</extension> |
|
13 |
<extension class-name="org.gvsig.backup.BackUpProjectExtension" |
|
14 |
description="Extension that registers an extension point that allows save a back up of the previous |
|
15 |
gvSIG project." |
|
16 |
active="true" |
|
17 |
priority="100"> |
|
18 |
</extension> |
|
19 |
</extensions> |
|
20 |
</plugin-config> |
extProjectBackup/build.number | ||
---|---|---|
1 |
build.number=1 |
Also available in: Unified diff