Revision 44993

View differences:

tags/org.gvsig.desktop-2.0.279/org.gvsig.desktop.framework/org.gvsig.andami.updater/src/main/java/org/gvsig/andamiupdater/Updater.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or modify it under
7
 * the terms of the GNU General Public License as published by the Free Software
8
 * Foundation; either version 3 of the License, or (at your option) any later
9
 * version.
10
 *
11
 * This program is distributed in the hope that it will be useful, but WITHOUT
12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14
 * details.
15
 *
16
 * You should have received a copy of the GNU General Public License along with
17
 * this program; if not, write to the Free Software Foundation, Inc., 51
18
 * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
 *
20
 * For any additional information, do not hesitate to contact us at info AT
21
 * gvsig.com, or visit our website www.gvsig.com.
22
 */
23
package org.gvsig.andamiupdater;
24

  
25
import java.io.BufferedReader;
26
import java.io.File;
27
import java.io.IOException;
28
import java.lang.reflect.Method;
29

  
30
import com.sardak.antform.AntForm;
31
import com.sardak.antform.AntMenu;
32
import java.io.Closeable;
33
import java.io.FileInputStream;
34
import java.io.FileOutputStream;
35
import java.io.FileReader;
36
import java.io.InputStream;
37
import java.io.OutputStream;
38

  
39
import org.apache.tools.ant.Project;
40
import org.apache.tools.ant.ProjectHelper;
41

  
42
/**
43
 * @author gvSIG Team
44
 * @version $Id$
45
 *
46
 */
47
public class Updater {
48

  
49
    private String[] args;
50

  
51
    /**
52
     * @param args
53
     */
54
    public Updater(String[] args) {
55
        this.args = args;
56
    }
57

  
58
    /**
59
     * @param args
60
     * @throws Exception
61
     */
62
    public static void main(String[] args) throws Exception {
63
        Updater updater = new Updater(args);
64
        updater.copyFiles();
65
        updater.executeScripts();
66
        updater.removeAll();
67
        updater.launchApp(args);
68
    }
69

  
70
    private File getApplicationDirectory() {
71
        return new File("").getAbsoluteFile();
72
    }
73

  
74
    private File getPluginsDirectory() {
75
        return new File(getApplicationDirectory(), this.args[1]);
76
    }
77

  
78
    /**
79
     * @param args
80
     * @throws Exception
81
     */
82
    @SuppressWarnings("unchecked")
83
    private void launchApp(String[] args) throws Exception {
84

  
85
        try {
86
            Class launcher_class = Class.forName("org.gvsig.andami.Launcher");
87
            Object launcher = launcher_class.newInstance();
88
            Method main = launcher_class.getMethod("main", new Class[]{String[].class});
89
            main.invoke(launcher, new Object[]{args});
90

  
91
        } catch (ClassNotFoundException e) {
92
            Class launcher_class = Class.forName("com.iver.andami.Launcher");
93
            Object launcher = launcher_class.newInstance();
94
            Method main = launcher_class.getMethod("main", new Class[]{String[].class});
95
            main.invoke(launcher, new Object[]{args});
96
        }
97
    }
98

  
99
    /**
100
     *
101
     */
102
    private void removeAll() {
103
        File updateDirectory = new File(getApplicationDirectory(), "update");
104
        if (updateDirectory.exists()) {
105
            deleteDir(updateDirectory);
106
        }
107

  
108
    }
109

  
110
    private boolean deleteDir(File folder) {
111
        if (folder == null) {
112
            return true;
113
        }
114
        try {
115
            if (folder.isDirectory()) {
116
                String[] children = folder.list();
117
                for (String children1 : children) {
118
                    boolean success = deleteDir(new File(folder, children1));
119
                    if (!success) {
120
                        return false;
121
                    }
122
                }
123
            }
124
            return folder.delete();
125
        } catch (Throwable th) {
126
            this.warning("Can't remove '" + folder.getAbsolutePath() + "'.", th);
127
            return false;
128
        }
129
    }
130

  
131
    /**
132
     * Reads every line of appDirectory/update/scripts.lst and executes the ant
133
     * file that this line points to
134
     */
135
    private void executeScripts() {
136
        File updateFolder = new File(getApplicationDirectory(), "update");
137
        File antFilesScript = new File(updateFolder, "scripts.lst");
138

  
139
        if (antFilesScript.exists()) {
140
            BufferedReader reader = null;
141
            try {
142
                reader = new BufferedReader(new FileReader(antFilesScript));
143
                String line;
144
                while ((line = reader.readLine()) != null) {
145
                    File antFile = new File(line);
146
                    try {
147
                        executeAntFile(antFile);
148
                    } catch (Throwable th) {
149
                        this.warning("Error running file '" + antFile.getAbsolutePath() + "'.", th);
150
                    }
151
                }
152
            } catch (Throwable th) {
153
                this.warning("Error running ant scripts.", th);
154
            } finally {
155
                closeQuietly(reader, antFilesScript);
156
            }
157

  
158
        }
159

  
160
    }
161

  
162
    /**
163
     * Copies all files and folders from gvSIG/update to gvSIG/extensions
164
     *
165
     * @throws IOException
166
     *
167
     */
168
    private void copyFiles() throws IOException {
169
        File updateFolder = new File(getApplicationDirectory(), "update");
170
        File filesFolder = new File(updateFolder, "files");
171
        File pluginsDirectory = getPluginsDirectory();
172

  
173
        if (updateFolder.exists()) {
174
            String[] childrenDirs = filesFolder.list();
175

  
176
            if (childrenDirs != null) {
177
                for (String childrenDir : childrenDirs) {
178
                    File sourceLocation = new File(filesFolder, childrenDir);
179
                    File targetLocation = new File(pluginsDirectory, childrenDir);
180
                    try {
181
                        deleteDir(targetLocation);
182
                        copyFilesAndFolders(sourceLocation, targetLocation);
183
                    } catch (Throwable th) {
184
                        this.warning("Can't copy files to '" + targetLocation.getAbsolutePath() + "'.", th);
185
                    }
186
                }
187
            }
188
        }
189
    }
190

  
191
    private boolean copyFilesAndFolders(File source, File target)
192
            throws IOException {
193

  
194
        if (source.isDirectory()) {
195
            if (!target.exists()) {
196
                target.mkdir();
197
            }
198

  
199
            String[] children = source.list();
200
            if (children != null) {
201
                for (String children1 : children) {
202
                    copyFilesAndFolders(
203
                            new File(source, children1),
204
                            new File(target, children1)
205
                    );
206
                }
207
            }
208
        } else {
209
            InputStream in = null;
210
            OutputStream out = null;
211
            try {
212
                in = new FileInputStream(source);
213
                out = new FileOutputStream(target);
214

  
215
                // Copy the bits from instream to outstream
216
                byte[] buf = new byte[1024];
217
                int len;
218
                while ((len = in.read(buf)) > 0) {
219
                    out.write(buf, 0, len);
220
                }
221
                in.close();
222
                out.close();
223
            } catch (Throwable th) {
224
                this.warning("Can't copy '" + source + "' to '" + target + "'.", th);
225
            } finally {
226
                closeQuietly(in, source);
227
                closeQuietly(out, target);
228
            }
229
        }
230

  
231
        return true;
232
    }
233

  
234
    private void closeQuietly(Closeable closeable, File f) {
235
        if (closeable == null) {
236
            return;
237
        }
238
        try {
239
            closeable.close();
240
        } catch (IOException ex) {
241
            if (f == null) {
242
                this.warning("Can't close file '" + closeable.toString() + "'.", ex);
243
            } else {
244
                this.warning("Can't close file '" + f.getAbsolutePath() + "'.", ex);
245
            }
246
        }
247
    }
248

  
249
    private void executeAntFile(File file) {
250
        Project p = new Project();
251
        p.setUserProperty("ant.file", file.getAbsolutePath());
252
        p.setUserProperty("gvsig_dir", getApplicationDirectory().getAbsolutePath());
253
        p.setUserProperty("extensions_dir", getPluginsDirectory().getAbsolutePath());
254
        p.init();
255
        p.setBaseDir(file.getParentFile());
256
        p.addTaskDefinition("antform", AntForm.class);
257
        p.addTaskDefinition("antmenu", AntMenu.class);
258
        p.init();
259
        ProjectHelper helper = ProjectHelper.getProjectHelper();
260
        p.addReference("ant.projectHelper", helper);
261
        helper.parse(p, file);
262
        p.executeTarget(p.getDefaultTarget());
263
    }
264

  
265
    private void warning(String message, Throwable th) {
266
        System.err.println(message);
267
        th.printStackTrace();
268
    }
269

  
270
}
0 271

  
tags/org.gvsig.desktop-2.0.279/org.gvsig.desktop.framework/org.gvsig.andami.updater/pom.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2

  
3
<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">
4
    <modelVersion>4.0.0</modelVersion>
5
    <artifactId>org.gvsig.andami.updater</artifactId>
6
    <packaging>jar</packaging>
7
    <name>${project.artifactId}</name>
8
    <parent>
9
        <groupId>org.gvsig</groupId>
10
        <artifactId>org.gvsig.desktop.framework</artifactId>
11
        <version>2.0.279</version>
12
    </parent>
13
    
14
    <dependencies>
15
      <dependency>
16
          <groupId>org.slf4j</groupId>
17
          <artifactId>slf4j-api</artifactId>
18
          <scope>compile</scope>
19
      </dependency>
20
      <dependency>
21
          <groupId>org.gvsig</groupId>
22
          <artifactId>org.gvsig.tools.lib</artifactId>
23
          <scope>compile</scope>
24
      </dependency>
25
      <dependency>
26
          <groupId>org.gvsig</groupId>
27
          <artifactId>org.gvsig.installer.lib.api</artifactId>
28
          <scope>compile</scope>
29
      </dependency>
30
      <dependency>
31
        <groupId>org.apache.ant</groupId>
32
        <artifactId>ant</artifactId>
33
        <scope>compile</scope>
34
      </dependency>
35
      <dependency>
36
          <groupId>com.sardak</groupId>
37
          <artifactId>antform</artifactId>
38
          <scope>compile</scope>
39
      </dependency>
40
      
41
      <!--  Need to include dependencies with andami in the MANIFEST classpath entry -->
42
      <dependency>
43
          <groupId>org.gvsig</groupId>
44
          <artifactId>org.gvsig.andami</artifactId>
45
          <scope>runtime</scope>
46
      </dependency>
47
    </dependencies>
48

  
49
  <build>
50
    <plugins>
51

  
52
     <plugin>
53
          <groupId>org.apache.maven.plugins</groupId>
54
          <artifactId>maven-jar-plugin</artifactId>
55
          <configuration>
56
              <archive>
57
                  <manifest>
58
                      <addClasspath>true</addClasspath>
59
                      <mainClass>org.gvsig.andamiupdater.Updater</mainClass>
60
                  </manifest>
61
              </archive>
62
          </configuration>
63
      </plugin>
64

  
65
        <plugin>
66
          <groupId>org.codehaus.gmaven</groupId>
67
          <artifactId>gmaven-plugin</artifactId>
68
          <executions>
69
            <execution>
70
              <id>install-plugin</id>
71
              <phase>install</phase>
72
              <goals>
73
                <goal>execute</goal>
74
              </goals>
75
              <configuration>
76
                <source><![CDATA[
77
                  ant = new AntBuilder()
78
                  source = project.basedir.getAbsolutePath() + 
79
                    "/target/" + 
80
                    project.artifactId + "-" +
81
                    project.version +
82
                    ".jar"
83
                  target = project.properties["gvsig.product.folder.path"] + 
84
                    "/lib/" +
85
                    project.artifactId + "-" +
86
                    project.version +
87
                    ".jar"
88
                  ant.copy(file: source, tofile: target)
89
                ]]></source>
90
              </configuration>
91
            </execution>
92
          </executions>
93
        </plugin>
94

  
95
    </plugins>
96
  </build>
97

  
98
            
99
</project>
0 100

  
tags/org.gvsig.desktop-2.0.279/org.gvsig.desktop.framework/pom.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2
<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">
3

  
4
    <modelVersion>4.0.0</modelVersion>
5
    <artifactId>org.gvsig.desktop.framework</artifactId>
6
    <packaging>pom</packaging>
7
    <name>${project.artifactId}</name>
8
    <parent>
9
        <groupId>org.gvsig</groupId>
10
        <artifactId>org.gvsig.desktop</artifactId>
11
        <version>2.0.279</version>
12
    </parent>
13

  
14
    <modules>
15
        <module>org.gvsig.andami</module>
16
        <module>org.gvsig.andami.updater</module>
17
    </modules>
18

  
19
    <description>Contains the launcher and plugin framework used in gvSIG.</description>
20
</project>
21

  
0 22

  
tags/org.gvsig.desktop-2.0.279/org.gvsig.desktop.framework/org.gvsig.andami/pom.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2

  
3
<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">
4
    <modelVersion>4.0.0</modelVersion>
5
    <artifactId>org.gvsig.andami</artifactId>
6
    <packaging>jar</packaging>
7
    <name>${project.artifactId}</name>
8
    <description>Plugins management framework</description>
9
    <parent>
10
        <groupId>org.gvsig</groupId>
11
        <artifactId>org.gvsig.desktop.framework</artifactId>
12
        <version>2.0.279</version>
13
    </parent>
14

  
15
    <dependencies>
16

  
17
        <dependency>
18
            <groupId>org.slf4j</groupId>
19
            <artifactId>slf4j-api</artifactId>
20
            <scope>compile</scope>
21
        </dependency>
22
        <dependency>
23
            <groupId>commons-configuration</groupId>
24
            <artifactId>commons-configuration</artifactId>
25
            <scope>compile</scope>
26
        </dependency>
27
        <dependency>
28
            <groupId>commons-io</groupId>
29
            <artifactId>commons-io</artifactId>
30
            <scope>compile</scope>
31
        </dependency>
32
        <dependency>
33
            <groupId>org.apache.commons</groupId>
34
            <artifactId>commons-math</artifactId>
35
            <scope>runtime</scope>
36
        </dependency>                
37
        <dependency>
38
            <groupId>org.apache.commons</groupId>
39
            <artifactId>commons-text</artifactId>
40
            <scope>runtime</scope>
41
        </dependency>
42
        <dependency>
43
            <groupId>org.gvsig</groupId>
44
            <artifactId>org.gvsig.tools.lib</artifactId>
45
            <scope>compile</scope>
46
        </dependency>
47
        <dependency>
48
            <groupId>org.gvsig</groupId>
49
            <artifactId>org.gvsig.tools.dynform.api</artifactId>
50
            <scope>compile</scope>
51
        </dependency>
52
        <dependency>
53
            <groupId>org.gvsig</groupId>
54
            <artifactId>org.gvsig.tools.dynform.spi</artifactId>
55
            <scope>compile</scope>
56
        </dependency>
57
        <dependency>
58
            <groupId>org.gvsig</groupId>
59
            <artifactId>org.gvsig.tools.dynform.services</artifactId>
60
            <scope>compile</scope>
61
        </dependency>
62
        <dependency>
63
            <groupId>org.gvsig</groupId>
64
            <artifactId>org.gvsig.tools.util.api</artifactId>
65
            <scope>compile</scope>
66
        </dependency>
67
        <dependency>
68
            <groupId>org.gvsig</groupId>
69
            <artifactId>org.gvsig.tools.util.impl</artifactId>
70
            <scope>compile</scope>
71
        </dependency>
72
        <dependency>
73
            <groupId>org.gvsig</groupId>
74
            <artifactId>org.gvsig.tools.dynform.impl</artifactId>
75
            <scope>runtime</scope>
76
        </dependency>
77
        <dependency>
78
            <groupId>org.gvsig</groupId>
79
            <artifactId>org.gvsig.i18n</artifactId>
80
            <scope>compile</scope>
81
        </dependency>
82
        <dependency>
83
            <groupId>org.gvsig</groupId>
84
            <artifactId>org.gvsig.tools.swing.api</artifactId>
85
            <scope>compile</scope>
86
        </dependency>
87
        <dependency>
88
            <groupId>org.gvsig</groupId>
89
            <artifactId>org.gvsig.tools.swing.impl</artifactId>
90
            <scope>compile</scope>
91
        </dependency>
92
        <dependency>
93
            <groupId>org.gvsig</groupId>
94
            <artifactId>org.gvsig.utils</artifactId>
95
            <scope>compile</scope>
96
        </dependency>
97
        <dependency>
98
            <groupId>org.gvsig</groupId>
99
            <artifactId>org.gvsig.ui</artifactId>
100
            <scope>compile</scope>
101
        </dependency>
102
        <dependency>
103
            <groupId>org.gvsig</groupId>
104
            <artifactId>org.gvsig.installer.lib.api</artifactId>
105
            <scope>compile</scope>
106
        </dependency>
107
        <dependency>
108
            <groupId>org.gvsig</groupId>
109
            <artifactId>org.gvsig.installer.swing.api</artifactId>
110
            <scope>compile</scope>
111
        </dependency>
112
        <dependency>
113
            <groupId>org.gvsig</groupId>
114
            <artifactId>org.gvsig.expressionevaluator.lib.impl</artifactId>
115
            <scope>runtime</scope>
116
        </dependency>
117
        <dependency>
118
            <groupId>org.gvsig</groupId>
119
            <artifactId>org.gvsig.expressionevaluator.swing.impl</artifactId>
120
            <scope>runtime</scope>
121
        </dependency>
122
        <dependency>
123
            <groupId>javax.help</groupId>
124
            <artifactId>javahelp</artifactId>
125
            <scope>compile</scope>
126
        </dependency>
127
        <dependency>
128
            <groupId>com.jgoodies</groupId>
129
            <artifactId>jgoodies-looks</artifactId>
130
        </dependency>
131
        <dependency>
132
            <groupId>castor</groupId>
133
            <artifactId>castor</artifactId>
134
            <scope>compile</scope>
135
        </dependency>
136
        <dependency>
137
            <groupId>log4j</groupId>
138
            <artifactId>log4j</artifactId>
139
            <scope>compile</scope>
140
        </dependency>
141
        <dependency>
142
            <groupId>commons-cli</groupId>
143
            <artifactId>commons-cli</artifactId>
144
            <scope>compile</scope>
145
        </dependency>
146
        <dependency>
147
            <groupId>commons-collections</groupId>
148
            <artifactId>commons-collections</artifactId>
149
            <scope>compile</scope>
150
        </dependency>
151
        <dependency>
152
            <groupId>org.apache.commons</groupId>
153
            <artifactId>commons-collections4</artifactId>
154
            <scope>compile</scope>
155
        </dependency>
156
        <dependency>
157
            <groupId>org.gnu</groupId>
158
            <artifactId>jel</artifactId>
159
            <scope>compile</scope>
160
        </dependency>
161
        <dependency>
162
            <groupId>jwizardcomponent</groupId>
163
            <artifactId>jwizardcomponent</artifactId>
164
            <scope>compile</scope>
165
        </dependency>
166
        <dependency>
167
            <groupId>jwizardcomponent</groupId>
168
            <artifactId>jwizardcomponent-0i18n</artifactId>
169
            <scope>compile</scope>
170
        </dependency>
171
        <dependency>
172
            <groupId>net.sf.kxml</groupId>
173
            <artifactId>kxml2</artifactId>
174
            <scope>compile</scope>
175
        </dependency>
176

  
177
        <dependency>
178
            <groupId>org.gvsig</groupId>
179
            <artifactId>org.gvsig.about.api</artifactId>
180
            <scope>runtime</scope>
181
        </dependency> 
182
       <dependency>
183
            <groupId>org.gvsig</groupId>
184
            <artifactId>org.gvsig.about.impl</artifactId>
185
            <scope>runtime</scope>
186
        </dependency>
187
        <dependency>
188
            <groupId>org.gvsig</groupId>
189
            <artifactId>org.gvsig.jdk.v1_6</artifactId>
190
            <scope>runtime</scope>
191
        </dependency>
192
        <dependency>
193
            <groupId>org.gvsig</groupId>
194
            <artifactId>org.gvsig.compat.api</artifactId>
195
            <scope>runtime</scope>
196
        </dependency>
197
        <dependency>
198
            <groupId>org.gvsig</groupId>
199
            <artifactId>org.gvsig.compat.se</artifactId>
200
            <scope>runtime</scope>
201
        </dependency>
202
        <dependency>
203
            <groupId>xerces</groupId>
204
            <artifactId>xercesImpl</artifactId>
205
            <scope>runtime</scope>
206
        </dependency>
207
        <dependency>
208
            <groupId>org.slf4j</groupId>
209
            <artifactId>slf4j-log4j12</artifactId>
210
            <scope>runtime</scope>
211
        </dependency>
212
        <dependency>
213
            <groupId>org.gvsig</groupId>
214
            <artifactId>org.gvsig.installer.lib.impl</artifactId>
215
            <scope>runtime</scope>
216
        </dependency>
217
        <dependency>
218
            <groupId>org.gvsig</groupId>
219
            <artifactId>org.gvsig.installer.lib.spi</artifactId>
220
            <scope>compile</scope>
221
        </dependency>
222
        <dependency>
223
            <groupId>org.gvsig</groupId>
224
            <artifactId>org.gvsig.installer.prov.plugin</artifactId>
225
            <scope>runtime</scope>
226
        </dependency>
227
        <dependency>
228
            <groupId>org.gvsig</groupId>
229
            <artifactId>org.gvsig.installer.swing.impl</artifactId>
230
            <scope>runtime</scope>
231
        </dependency>
232
        <dependency>
233
            <groupId>com.sardak</groupId>
234
            <artifactId>antform</artifactId>
235
            <scope>runtime</scope>
236
        </dependency>
237
        <dependency>
238
            <groupId>ant-contrib</groupId>
239
            <artifactId>ant-contrib</artifactId>
240
            <scope>runtime</scope>
241
        </dependency>
242
        <dependency>
243
            <groupId>org.apache.commons</groupId>
244
            <artifactId>commons-lang3</artifactId>
245
            <scope>compile</scope>
246
        </dependency>
247
        <dependency>
248
            <groupId>commons-lang</groupId>
249
            <artifactId>commons-lang</artifactId>
250
            <scope>compile</scope>
251
        </dependency>
252
        
253
        <dependency>
254
            <groupId>org.swinglabs</groupId>
255
            <artifactId>swing-layout</artifactId>
256
            <scope>compile</scope>
257
        </dependency>
258
        <dependency>
259
            <!-- lo requieren los paneles de timesupport -->
260
            <groupId>com.toedter</groupId>
261
            <artifactId>jcalendar</artifactId> 				
262
            <scope>runtime</scope>
263
        </dependency>	
264
        <dependency>
265
            <groupId>xml-apis</groupId>
266
            <artifactId>xml-apis</artifactId>
267
            <scope>runtime</scope>
268
        </dependency>
269
        <dependency>
270
            <groupId>com.fifesoft</groupId>
271
            <artifactId>rsyntaxtextarea</artifactId>
272
            <scope>runtime</scope>
273
        </dependency>
274
        <dependency>
275
            <groupId>com.fifesoft</groupId>
276
            <artifactId>rstaui</artifactId>
277
            <scope>runtime</scope>
278
        </dependency>
279
        <dependency>
280
            <groupId>com.fifesoft</groupId>
281
            <artifactId>autocomplete</artifactId>
282
            <scope>runtime</scope>
283
        </dependency>
284
        <dependency>
285
            <groupId>org.json</groupId>
286
            <artifactId>json</artifactId>
287
            <scope>runtime</scope>
288
        </dependency>
289
        <dependency>
290
            <groupId>commons-codec</groupId>
291
            <artifactId>commons-codec</artifactId>
292
            <scope>runtime</scope>
293
        </dependency>
294
        <dependency>
295
            <groupId>org.apache.xmlgraphics</groupId>
296
            <artifactId>batik-awt-util</artifactId>
297
            <scope>runtime</scope>
298
        </dependency>
299
        <dependency>
300
            <groupId>org.apache.xmlgraphics</groupId>
301
            <artifactId>batik-bridge</artifactId>
302
            <scope>runtime</scope>
303
        </dependency>
304
        <dependency>
305
            <groupId>org.apache.xmlgraphics</groupId>
306
            <artifactId>batik-ext</artifactId>
307
            <scope>runtime</scope>
308
        </dependency>
309
        <dependency>
310
            <groupId>org.apache.xmlgraphics</groupId>
311
            <artifactId>batik-gui-util</artifactId>
312
            <scope>runtime</scope>
313
        </dependency>
314
        <dependency>
315
            <groupId>org.apache.xmlgraphics</groupId>
316
            <artifactId>batik-gvt</artifactId>
317
            <scope>runtime</scope>
318
        </dependency>
319
        <dependency>
320
            <groupId>org.apache.xmlgraphics</groupId>
321
            <artifactId>batik-script</artifactId>
322
            <scope>runtime</scope>
323
        </dependency>
324
        <dependency>
325
            <groupId>org.apache.xmlgraphics</groupId>
326
            <artifactId>batik-xml</artifactId>
327
            <scope>runtime</scope>
328
        </dependency>
329
        <dependency>
330
            <groupId>org.apache.xmlgraphics</groupId>
331
            <artifactId>batik-anim</artifactId>
332
            <scope>runtime</scope>
333
        </dependency>
334
        <dependency>
335
            <groupId>org.apache.xmlgraphics</groupId>
336
            <artifactId>batik-css</artifactId>
337
            <scope>runtime</scope>
338
        </dependency>
339
        <dependency>
340
            <groupId>org.apache.xmlgraphics</groupId>
341
            <artifactId>batik-dom</artifactId>
342
            <scope>runtime</scope>
343
        </dependency>
344
        <dependency>
345
            <groupId>org.apache.xmlgraphics</groupId>
346
            <artifactId>batik-js</artifactId>
347
            <scope>runtime</scope>
348
        </dependency>
349
        <dependency>
350
            <groupId>org.apache.xmlgraphics</groupId>
351
            <artifactId>batik-parser</artifactId>
352
            <scope>runtime</scope>
353
        </dependency>
354
        <dependency>
355
            <groupId>org.apache.xmlgraphics</groupId>
356
            <artifactId>batik-svg-dom</artifactId>
357
            <scope>runtime</scope>
358
        </dependency>
359
        <dependency>
360
            <groupId>xml-apis</groupId>
361
            <artifactId>xml-apis-ext</artifactId>
362
            <scope>runtime</scope>
363
        </dependency>        
364
        <dependency>
365
            <groupId>com.github.jai-imageio</groupId>
366
            <artifactId>jai-imageio-jpeg2000</artifactId>
367
            <version>1.3.0</version>
368
        </dependency>                
369
        <dependency>
370
            <groupId>com.github.jai-imageio</groupId>
371
            <artifactId>jai-imageio-core</artifactId>
372
            <version>1.4.0</version>
373
        </dependency> 
374
        <dependency>
375
            <groupId>org.glassfish</groupId>
376
            <artifactId>javax.json</artifactId>
377
            <version>1.0.4</version>
378
            <scope>compile</scope>
379
        </dependency>
380
        <dependency>
381
          <groupId>com.fasterxml.uuid</groupId>
382
          <artifactId>java-uuid-generator</artifactId>
383
          <version>4.0.1</version>
384
          <scope>runtime</scope>
385
        </dependency>        
386
          <dependency>
387
            <groupId>com.github.lespaul361</groupId>
388
            <artifactId>JCommunique</artifactId>
389
            <scope>runtime</scope>
390
        </dependency>        
391
        <!--
392
        <dependency>
393
            <groupId>com.jtattoo</groupId>
394
            <artifactId>JTattoo</artifactId>
395
            <scope>runtime</scope>
396
            <version>1.6.13</version>
397
        </dependency>
398
        <dependency>
399
            <groupId>com.seaglasslookandfeel</groupId>
400
            <artifactId>seaglasslookandfeel</artifactId>
401
            <scope>runtime</scope>
402
            <version>0.2.1</version>
403
        </dependency>   
404
                -->
405
        <dependency>
406
            <groupId>org.devzendo</groupId>
407
            <artifactId>quaqua</artifactId>
408
            <scope>runtime</scope>
409
            <version>9.1</version>
410
        </dependency>
411
<!--        Substance da errores en la carga de gvSIG y el L&F no funciona
412
        <dependency>
413
            <groupId>com.github.insubstantial</groupId>
414
            <artifactId>substance</artifactId>
415
            <scope>runtime</scope>
416
            <version>7.3</version>
417
        </dependency>       -->
418
        <!--
419
        <dependency>
420
            <groupId>com.weblookandfeel</groupId>
421
            <artifactId>weblaf-ui</artifactId>
422
            <scope>runtime</scope>
423
            <version>1.2.8</version>
424
        </dependency>
425
        -->
426
    </dependencies>
427

  
428

  
429
    <build>
430
        <plugins>
431

  
432
            <plugin>
433
                <groupId>org.codehaus.mojo</groupId>
434
                <artifactId>exec-maven-plugin</artifactId>
435
                <executions>
436
                    <execution>
437
                        <goals>
438
                            <goal>exec</goal>
439
                        </goals>
440
                    </execution>
441
                </executions>
442
                <configuration>
443
                    <executable>java</executable>
444
                    <arguments>
445
                        <argument>-classpath</argument>
446
                        <!-- automatically creates the classpath using all project
447
                        dependencies, also adding the project build directory -->
448
                        <classpath />
449
                        <argument>org.gvsig.andami.Launcher</argument>
450
                        <argument>gvSIG</argument>
451
                        <argument>${gvsig.install.dir}/gvSIG/extensiones</argument>
452
                    </arguments>
453
                    <environmentVariables>
454
                        <GDAL_DATA>${user.home}/.depman/data/gdal</GDAL_DATA>
455
                        <PROJ_LIB>gvSIG/extensiones/org.gvsig.crs.extension/data</PROJ_LIB>
456
                        <LD_LIBRARY_PATH>${user.home}/.depman/lib</LD_LIBRARY_PATH>
457
                        <PATH>${user.home}/.depman/bin</PATH>
458
                    </environmentVariables>
459
                </configuration>
460
            </plugin>
461

  
462
            <plugin>
463
                <artifactId>maven-assembly-plugin</artifactId>
464
                <configuration>
465
                    <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
466
                    <appendAssemblyId>false</appendAssemblyId>
467
                </configuration>
468
                <executions>
469
                    <execution>
470
                        <id>gvsig-plugin-package</id>
471
                        <phase>package</phase>
472
                        <goals>
473
                            <goal>single</goal>
474
                        </goals>
475
                        <configuration>
476
                            <finalName>${project.artifactId}-${project.version}-root-folder</finalName>
477
                            <descriptors>
478
                                <descriptor>src/main/assembly/gvsig-andami-package.xml</descriptor>
479
                            </descriptors>
480
                        </configuration>
481
                    </execution>
482
                </executions>
483
            </plugin>
484

  
485
            <plugin>
486
                <groupId>org.codehaus.gmaven</groupId>
487
                <artifactId>gmaven-plugin</artifactId>
488
                <executions>
489
                    <execution>
490
                        <id>install-plugin</id>
491
                        <phase>install</phase>
492
                        <goals>
493
                            <goal>execute</goal>
494
                        </goals>
495
                        <configuration>
496
                            <source><![CDATA[
497
                  ant = new AntBuilder()
498
                  source = project.basedir.getAbsolutePath() +
499
                    "/target/" +
500
                    project.artifactId + "-" +
501
                    project.version + "-" +
502
                    "root-folder.zip"
503
                  target = project.properties["gvsig.product.folder.path"]
504
                  ant.unzip(src: source, dest: target)
505
                  ant.chmod(file:target+"/gvSIG.sh", perm:"a+rx")
506
                ]]></source>
507
                        </configuration>
508
                    </execution>
509
                </executions>
510
            </plugin>
511

  
512
            <plugin>
513
                <artifactId>maven-clean-plugin</artifactId>
514
                <configuration>
515
                    <skip>false</skip>
516
                    <failOnError>true</failOnError>
517
                    <filesets>
518
                        <fileset>
519
                            <directory>${gvsig.product.folder.path}/lib</directory>
520
                        </fileset>
521
                    </filesets>
522
                </configuration>
523
                <executions>
524
                    <execution>
525
                        <id>default-clean</id>
526
                        <phase>clean</phase>
527
                    </execution>
528
                </executions>
529
            </plugin>
530
        </plugins>
531
    </build>
532

  
533
</project>
0 534

  
tags/org.gvsig.desktop-2.0.279/org.gvsig.desktop.framework/org.gvsig.andami/src/test/java/org/gvsig/andami/AllTests.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 3
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.andami;
25

  
26
import junit.framework.Test;
27
import junit.framework.TestSuite;
28

  
29
public class AllTests {
30

  
31
	public static Test suite() {
32
		TestSuite suite = new TestSuite("Test for com.iver.andami");
33
		//$JUnit-BEGIN$
34

  
35
		//$JUnit-END$
36
		return suite;
37
	}
38

  
39
}
0 40

  
tags/org.gvsig.desktop-2.0.279/org.gvsig.desktop.framework/org.gvsig.andami/src/main/castor/plugin-persistence.xsd
1
<?xml version="1.0" encoding="UTF-8" ?>
2
<!--
3

  
4
    gvSIG. Desktop Geographic Information System.
5

  
6
    Copyright (C) 2007-2013 gvSIG Association.
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 3
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
    For any additional information, do not hesitate to contact us
24
    at info AT gvsig.com, or visit our website www.gvsig.com.
25

  
26
-->
27

  
28
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
29
  <xs:element name="bookmark">
30
    <xs:complexType>
31
      <xs:sequence>
32
        <xs:element ref="xml-entity" />
33
      </xs:sequence>
34
      <xs:attribute name="text" type="xs:string" use="required" />
35
    </xs:complexType>
36
  </xs:element>
37

  
38
  <xs:element name="bookmarks">
39
    <xs:complexType>
40
      <xs:sequence>
41
        <xs:element ref="bookmark" />
42
      </xs:sequence>
43
    </xs:complexType>
44
  </xs:element>
45

  
46
  <xs:element name="plugin">
47
    <xs:complexType>
48
      <xs:sequence>
49
        <xs:element ref="xml-entity" />
50
        <xs:element ref="bookmarks" />
51
        <xs:element ref="windows" />
52
      </xs:sequence>
53
      <xs:attribute name="name" type="xs:NMTOKEN" use="required" />
54
      <xs:attribute name="lastUpdate" type="xs:NMTOKEN" use="required" />
55
    </xs:complexType>
56
  </xs:element>
57

  
58
  <xs:element name="plugins-status">
59
    <xs:complexType>
60
      <xs:sequence>
61
        <xs:element ref="plugin" />
62
      </xs:sequence>
63
    </xs:complexType>
64
  </xs:element>
65

  
66
  <xs:element name="property">
67
    <xs:complexType>
68
      <xs:attribute name="name" type="xs:NMTOKEN" use="required" />
69
      <xs:attribute name="value" type="xs:string" use="required" />
70
    </xs:complexType>
71
  </xs:element>
72

  
73
  <xs:element name="window">
74
    <xs:complexType>
75
      <xs:attribute name="rectangle" type="xs:string" use="required" />
76
      <xs:attribute name="id" type="xs:NMTOKEN" use="required" />
77
    </xs:complexType>
78
  </xs:element>
79

  
80
  <xs:element name="windows">
81
    <xs:complexType>
82
      <xs:sequence>
83
        <xs:element ref="window" maxOccurs="unbounded" />
84
      </xs:sequence>
85
    </xs:complexType>
86
  </xs:element>
87

  
88
  <xs:element name="xml-entity">
89
    <xs:complexType>
90
      <xs:sequence>
91
        <xs:element ref="property" maxOccurs="unbounded" />
92
      </xs:sequence>
93
    </xs:complexType>
94
  </xs:element>
95

  
96
</xs:schema>
0 97

  
tags/org.gvsig.desktop-2.0.279/org.gvsig.desktop.framework/org.gvsig.andami/src/main/castor/plugin-config.xsd
1
<?xml version="1.0" encoding="UTF-8" ?>
2
<!--
3

  
4
    gvSIG. Desktop Geographic Information System.
5

  
6
    Copyright (C) 2007-2013 gvSIG Association.
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 3
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
    For any additional information, do not hesitate to contact us
24
    at info AT gvsig.com, or visit our website www.gvsig.com.
25

  
26
-->
27

  
28
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
29

  
30
<!--
31
	action-tool => Button which fires the execution of this extension
32

  
33
	action-command	Text to identify different action-tools inside a plugin
34
	text		Button's text.
35
	name			Button name (to retrive it)
36
	icon		Tool icon
37
	last		If true, a separator is added.
38
	tooltip		Tooltip
39
	enable-text Text that describes the necessary conditions to enable a tool
40
	position    The position inside the toolbar
41
-->
42
  <xs:element name="action-tool">
43
    <xs:complexType>
44
      <xs:attribute name="text" type="xs:string" use="optional" />
45
      <xs:attribute name="name" type="xs:string" use="optional" />
46
      <xs:attribute name="action-command" type="xs:string" use="optional" />
47
      <xs:attribute name="icon" type="xs:string" use="required" />
48
      <xs:attribute name="last" type="xs:boolean" use="optional" />
49
      <xs:attribute name="tooltip" type="xs:string" use="optional" />
50
      <xs:attribute name="enable-text" type="xs:string" use="optional" />
51
      <xs:attribute name="position" type="xs:int" use="optional" />
52
    </xs:complexType>
53
  </xs:element>
54

  
55
<!--
56
	Plugin dependencies from other plugins
57
	plugin-name		Name of the other plugin (name of the directory.)
58
					Example; com.iver.cig.gvsig
59
-->
60
  <xs:element name="depends">
61
    <xs:complexType>
62
      <xs:attribute name="plugin-name" type="xs:string" use="required" />
63
    </xs:complexType>
64
  </xs:element>
65

  
66
<!--
67
	Extension to Andami
68

  
69
	class-name		Class that handles the extension
70
	menu			Menus installed by the extension
71
	tool-bar		Toolbar installed by this plugin
72
	priority	Orden en el que se procesaran las extensiones durante la
73
				carga de Andami. Se inicializan primero y se instalan sus controles
74
				en las barras de tareas primero. La prioridad es
75
				mayor cuanto más grande es el valor del atributo
76
-->
77

  
78

  
79
	<xs:element name="extension" type="extension-type"/>
80
	<xs:complexType name="extension-type">
81
		<xs:complexContent>
82
		<xs:extension base="skin-extension-type">
83
	    <xs:attribute name="priority" type="xs:int" use="optional" />
84
		<xs:attribute name="active" type="xs:boolean" use="optional" />
85
		<xs:attribute name="description" type="xs:string" use="optional" />
86
		<xs:attribute name="alwaysvisible" type="xs:boolean" use="optional" />
87
	  </xs:extension>
88
	</xs:complexContent>
89
  </xs:complexType>
90

  
91
<!--
92
	Extension's section of the plugin
93
-->
94
  <xs:element name="extensions">
95
    <xs:complexType>
96
      <xs:sequence>
97
        <xs:element ref="extension" maxOccurs="unbounded" />
98
        <xs:element ref="skin-extension" minOccurs="0" maxOccurs="unbounded" />
99
      </xs:sequence>
100

  
101
    </xs:complexType>
102
  </xs:element>
103

  
104
<!--
105
	Main application's Icon
106

  
107
	text 	Title of main window.
108
	src	    path to an icon file
109
-->
110
  <xs:element name="icon">
111
    <xs:complexType>
112
      <xs:attribute name="text" type="xs:string" use="required" />
113
      <xs:attribute name="src" type="xs:string" use="required" />
114
    </xs:complexType>
115
  </xs:element>
116

  
117
<!--
118
	label => In this element you can put the mesages that must appear in the
119
			status bar
120

  
121
	size	Size in pixels of the status label
122
	id		Id assigned to this label
123
-->
124
  <xs:element name="label">
125
    <xs:complexType>
126
      <xs:attribute name="size" type="xs:int" use="required" />
127
      <xs:attribute name="id" type="xs:NMTOKEN" use="required" />
128
    </xs:complexType>
129
  </xs:element>
130

  
131
<!--
132
	Group of labels on the status bar. The order from up to down in xml file
133
	stands for the order right to left in Andami's principal frame.
134

  
135
	class-name	When the active view is an instance of class-name, this
136
			labelSet will be shown.
137
-->
138
  <xs:element name="label-set">
139
    <xs:complexType>
140
      <xs:sequence>
141
        <xs:element ref="label" maxOccurs="unbounded" />
142
      </xs:sequence>
143
      <xs:attribute name="class-name" type="xs:NMTOKEN" use="required" />
144
    </xs:complexType>
145
  </xs:element>
146

  
147
<!--
148
	jars that are used by this plugin
149
	library-dir     Relative path where the jar files are. Usually ./ or ./lib
150
-->
151
  <xs:element name="libraries">
152
    <xs:complexType>
153
      <xs:attribute name="library-dir" type="xs:string" use="required" />
154
    </xs:complexType>
155
  </xs:element>
156

  
157
<!--
158
	action-command	Text to identify different menus inside the same plugin
159

  
160
	key		    Abreviatura de teclado del menu
161
	icon		Menu Icon
162
	enable-text Texto con la descripción de las condiciones que se tienen que dar
163
				para que se visualice la opción
164
	tooltip		Tooltip
165
	mnemonic	Accelerator key
166
	text 		Menu Text
167
	is_separator true means to add a JSeparator to the parent menu defined by text
168
-->
169
  <xs:element name="menu">
170
    <xs:complexType>
171
      <xs:attribute name="action-command" type="xs:string" use="optional" />
172
      <xs:attribute name="key" type="xs:string" use="optional" />
173
      <xs:attribute name="icon" type="xs:string" use="optional" />
174
      <xs:attribute name="tooltip" type="xs:string" use="optional" />
175
      <xs:attribute name="enable-text" type="xs:string" use="optional" />
176
      <xs:attribute name="mnemonic" type="xs:string" use="optional" />
177
      <xs:attribute name="text" type="xs:string" use="required" />
178
      <xs:attribute name="position" type="xs:int" use="optional" />
179
	  <xs:attribute name="is_separator" type="xs:boolean" use="optional" />
180
    </xs:complexType>
181
  </xs:element>
182

  
183
<!--
184
	XML File Root
185

  
186
	name		Plugin's Name
187
	updateURL	URL of zip-file with a new plugin's version.
188
-->
189
  <xs:element name="plugin-config">
190
    <xs:complexType>
191
      <xs:sequence>
192
        <xs:element ref="icon" minOccurs="0"/>
193
        <xs:element ref="depends" minOccurs="0" maxOccurs="unbounded"/>
194
        <xs:element ref="resourceBundle" minOccurs="0"/>
195
        <xs:element ref="label-set" minOccurs="0" maxOccurs="unbounded"/>
196
        <xs:element ref="libraries"/>
197
        <xs:element ref="popup-menus" minOccurs="0"/>
198
        <xs:element ref="extensions" />
199
      </xs:sequence>
200
      <xs:attribute name="update-url" type="xs:string" use="optional" />
201
    </xs:complexType>
202
  </xs:element>
203

  
204
<!--
205
	Popup menu by the plugin. The plugin must register itself as a
206
	popup-menu listener.
207
-->
208
  <xs:element name="popup-menu">
209
    <xs:complexType>
210
      <xs:sequence>
211
        <xs:element ref="menu" maxOccurs="unbounded" />
212
      </xs:sequence>
213
      <xs:attribute name="name" type="xs:string" use="required" />
214
    </xs:complexType>
215
  </xs:element>
216

  
217
<!--
218
	Section to define popup-menus
219
-->
220
  <xs:element name="popup-menus">
221
    <xs:complexType>
222
      <xs:sequence>
223
        <xs:element ref="popup-menu" maxOccurs="unbounded" />
224
      </xs:sequence>
225
    </xs:complexType>
226
  </xs:element>
227

  
228
<!--
229
	Properties file with translations used by the tool.
230

  
231
	name	Name of resource bundle file
232
-->
233
  <xs:element name="resourceBundle">
234
    <xs:complexType>
235
      <xs:attribute name="name" type="xs:NMTOKEN" use="required" />
236
    </xs:complexType>
237
  </xs:element>
238

  
239
<!--
240
	tool button that remains pressed when it is selected.
241

  
242
	text		Button's text.
243
	name			Button name (to retrive it)
244
	action-command	Text to identify the different action-tools inside a plugin.
245

  
246
	group		Group where the selectable-tool belongs. It will be only one selectable-tool
247
				selected inside the group.
248
	is-default  If true, the selectable-tool will be selected by default.
249
	icon		Icon to use.
250
	last		If true, after the tool it will appears a separator.
251
	tooltip		Tooltip
252
	position	The position inside the toolbar
253
-->
254
  <xs:element name="selectable-tool">
255
    <xs:complexType>
256
      <xs:attribute name="text" type="xs:string" use="optional" />
257
      <xs:attribute name="name" type="xs:string" use="optional" />
258
      <xs:attribute name="action-command" type="xs:string" use="optional" />
259
      <xs:attribute name="is-default" type="xs:boolean" use="optional" />
260
      <xs:attribute name="last" type="xs:boolean" use="optional" />
261
      <xs:attribute name="icon" type="xs:string" use="required" />
262
      <xs:attribute name="tooltip" type="xs:string" use="optional" />
263
      <xs:attribute name="enable-text" type="xs:string" use="optional" />
264
      <xs:attribute name="group" type="xs:string" use="optional" default="unico" />
265
      <xs:attribute name="position" type="xs:int" use="optional" />
266
    </xs:complexType>
267
  </xs:element>
268

  
269
<!--
270
	Extension plugin to andami
271

  
272
	class-name		Class which handles the plugin
273
	menu			Menus installed by the plugin
274
	tool-bar		Toolbar of the plugin. If it doesn't exist, it will be created.
275
	combo-button	combo-button to be added to the status bar
276
	combo-scale		combo-scale to be added to the status bar
277
-->
278
  <xs:element name="skin-extension" type="skin-extension-type"/>
279

  
280
  <xs:complexType name="skin-extension-type">
281
    <xs:sequence>
282
      <xs:element ref="menu" minOccurs="0" maxOccurs="unbounded" />
283
      <xs:element ref="tool-bar" minOccurs="0" maxOccurs="unbounded" />
284
      <xs:element ref="combo-button" minOccurs="0" maxOccurs="unbounded" />
285
      <xs:element ref="combo-scale" minOccurs="0" maxOccurs="unbounded" />
286
    </xs:sequence>
287
    <xs:attribute name="class-name" type="xs:NMTOKEN" use="required" />
288
  </xs:complexType>
289

  
290
<!--
291
	tool-bar => Application's main toolbar
292

  
293
	name	Toolbar name. This way, other plugins can refer to this toolbar
294
			and add tools to this toolbar.
295
	position	Used to order the toolbars. Toolbars with higher position are
296
				placed on the right side, toolbars with lower position are
297
				placed on the left. If it's omitted, the default value is 50.
298

  
299
	combo-button	combo-button to be added to the toolbar
300
	commbo-scale	combo-scale to be added to the toolbar
301
	visible			(Not supported yet). Determines whether the toolbar is
302
					visible by default.	In the future it will be possible to
303
					hide/show toolbars, and this attribute will set its	initial
304
					status.	Note: if the toolBar is defined in several
305
					extensions, the	extension with highest priority will decide
306
					the toolbar's visibility.
307
-->
308
  <xs:element name="tool-bar">
309
    <xs:complexType>
310
      <xs:sequence>
311
        <xs:element ref="action-tool" minOccurs="0" maxOccurs="unbounded" />
312
        <xs:element ref="selectable-tool" minOccurs="0" maxOccurs="unbounded" />
313
        <xs:element ref="combo-button" minOccurs="0" maxOccurs="unbounded" />
314
        <xs:element ref="combo-scale" minOccurs="0" maxOccurs="unbounded" />
315
      </xs:sequence>
316
      <xs:attribute name="name" type="xs:string" use="required" />
317
      <xs:attribute name="position" type="xs:int" use="optional" default="50" />
318
      <xs:attribute name="is-visible" type="xs:boolean" use="optional" default="true" />
319
    </xs:complexType>
320
  </xs:element>
321

  
322
 <!--
323
 	combo-scale => A combo box with numeric values, and editable.
324

  
325
 	name		A name to identify the combo-scale.
326

  
327
 	label		The label to be displayed on the left of the combo
328

  
329
 	elements    A semicolon separated list of the combo box' elements
330

  
331
 	value		The initial selected value. If ommited, the first element is selected
332

  
333
	action-command	Text to identify the different action-tools inside a plugin.
334
 -->
335
  <xs:element name="combo-scale">
336
  	<xs:complexType>
337
  		<xs:attribute name="name" type="xs:string" use="required" />
338
  		<xs:attribute name="label" type="xs:string" use="optional" />
339
  		<xs:attribute name="elements" use="required" />
340
  		<xs:attribute name="value" use="optional" />
341
  		<xs:attribute name="action-command" type="xs:string" use="required" />
342
  		<xs:attribute name="position" use="optional" />
343
  	</xs:complexType>
344
  </xs:element>
345
<!--
346
	combo-button => A combo button (drop-down list of selectable buttons).
347

  
348
	name		A name to identify the combo-button
349

  
350
-->
351
  <xs:element name="combo-button">
352
  	<xs:complexType>
353
  		<xs:sequence>
354
        	<xs:element ref="combo-button-element" minOccurs="0" maxOccurs="unbounded" />
355
      	</xs:sequence>
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff