Revision 458

View differences:

org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.7/org.gvsig.vectorediting.app/maven-howto.rst
1

  
2
==================================
3
Usefull maven "howtos" and FAQs
4
==================================
5

  
6
.. contents::
7

  
8
How to reduce the process of "install" to run as fast as possible.
9
-------------------------------------------------------------------
10

  
11
Can reduce install execution skiping test execution and compilation,
12
javadoc generation, test signature checking, license checking, and 
13
attach sources in jar.
14

  
15
  mvn  -Danimal.sniffer.skip=true -Dmaven.test.skip=true -Dsource.skip=true -DskipTests -Dmaven.javadoc.skip=true install
16

  
17
How to increment the build number of gvSIG plugins
18
----------------------------------------------------
19

  
20
To increase the build number of gvSIG plugins, yo can do:
21

  
22
  mvn -Dincrease-build-number process-sources
23
  
24
How to deploy a package of a gvSIG plugin
25
--------------------------------------------
26

  
27
Yo can deploy the package of a gvSIG plugin with:
28

  
29
  mvn -Ddeploy-package -Duser=USER -Dpassword=PASSWORD install
30

  
31
Notes:
32
- Require that the gvsig.package.info.poolURL property that this set to the correct value.
33
- The process uses WEBDAV to upload the packages, gvspkg and gvspki, and require 
34
  access to write in the location specified by gvsig.package.info.poolURL
35
- If "user" or "password" is not present, the process ask its each time it need.
36
- If folder specified in  gvsig.package.info.poolURL does not exist, the process try to create it.
37
- The process create a file "addon-request.txt" in the target with the information to 
38
  add to the ticket to request the update of the package in the main repository of
39
  packages of gvSIG.
40

  
41
How to skip attach sources in jar from command line
42
------------------------------------------------------
43

  
44
If in the project is enabled by default the generation of jar whith 
45
the sources of the project, you can disable this setting the property
46
"source.skip" to true in the command line::
47

  
48
    mvn -Dsource.skip=true  install
49

  
50
How to skip test compile from command line
51
--------------------------------------------
52

  
53
You can skip the compilation of test setting the propety "maven.test.skip" 
54
to true in the command line::
55

  
56
    mvn -Dmaven.test.skip=true  install
57

  
58

  
59
How to skip test execution from command line
60
----------------------------------------------
61

  
62
You can skip the tests execution setting the propety "skipTests" to true
63
in the command line::
64

  
65
    mvn -DskipTests install
66

  
67
How to skip javadoc generation from command line
68
--------------------------------------------------
69

  
70
You can skip the javadoc generation setting the property
71
"maven.javadoc.skip" to true in the command line::
72

  
73
    mvn -Dmaven.javadoc.skip=true  install
74

  
75
How to skip test signature cheks from command line
76
---------------------------------------------------
77

  
78
You can skip the signature check setting the property
79
"animal.sniffer.skip" to true in the command line::
80

  
81
    mvn -Danimal.sniffer.skip=true install
82

  
83
How to install a project without install submodules
84
----------------------------------------------------------
85

  
86
To install a project with submodules and only install the
87
parent project without submodules use the option "--non-recursive" ::
88

  
89
    mvn --non-recursive install
90

  
91
  
92
How to skip test compilation
93
--------------------------------
94

  
95
To configure a project to don't run the compilation
96
of test you can add to this pom the next configuration of
97
the plugin "maven-compiler-plugin"::
98

  
99
  <build>
100
    <plugins>
101
      ...
102
      <plugin>
103
        <!-- Skip compilation tests -->
104
        <groupId>org.apache.maven.plugins</groupId>
105
        <artifactId>maven-compiler-plugin</artifactId>
106
        <executions>
107
          <execution>
108
            <id>default-testCompile</id>
109
            <phase>process-test-sources</phase>
110
            <goals>
111
              <goal>testCompile</goal>
112
            </goals>
113
            <configuration>
114
              <skip>true</skip>
115
            </configuration>
116
          </execution>
117
        </executions>
118
      </plugin>
119
      ...
120
    </plugins>
121
  </build>
122

  
123
Skip test execution
124
----------------------
125

  
126
To configure a project to don't run the execution
127
of test you can add to this pom the next configuration of
128
the plugin "maven-surefire-plugin"::
129

  
130

  
131
  <build>
132
    <plugins>
133
      ...
134
      <plugin>
135
        <!-- Skip test execution -->
136
        <groupId>org.apache.maven.plugins</groupId>
137
        <artifactId>maven-surefire-plugin</artifactId>
138
        <configuration>
139
          <skipTests>true</skipTests>
140
        </configuration>
141
      </plugin>
142
      ...
143
    </plugins>
144
  </build>
145

  
146
Continue on test failure
147
-----------------------------
148

  
149
You can configure a project to continue on test execution 
150
failure. To do this add to the pom of the project the next 
151
configuration of plugin "maven-surefire-plugin" ::
152

  
153
  <build>
154
    <plugins>
155
      ...
156
      <plugin>
157
        <!-- Continue on test failure -->
158
        <groupId>org.apache.maven.plugins</groupId>
159
        <artifactId>maven-surefire-plugin</artifactId>
160
        <configuration>
161
          <testFailureIgnore>true</testFailureIgnore>
162
        </configuration>
163
      </plugin>
164
      ...
165
    </plugins>
166
  </build>
167

  
168

  
169
Set java compatibility
170
--------------------------
171

  
172
To set the compatibility with a java version  add to the 
173
pom of the project the next configuration of plugin 
174
"maven-compiler-plugin" ::
175

  
176
  <build>
177
    <plugins>
178
      ...
179
      <plugin>
180
          <!-- Set java compatibility -->
181
          <groupId>org.apache.maven.plugins</groupId>
182
          <artifactId>maven-compiler-plugin</artifactId>
183
          <configuration>
184
              <source>1.5</source>
185
              <target>1.5</target>
186
              <encoding>ISO-8859-1</encoding>
187
          </configuration>
188
      </plugin>
189
      ...
190
    </plugins>
191
  </build>
192

  
193
Packaging tests in jar
194
------------------------
195

  
196
Test classes do not packaging in jar by default.
197
To packing add to pom::
198

  
199
  <build>
200
    <plugins>
201
      ...
202
      <plugin>
203
        <!-- Packaging tests in jar -->
204
        <groupId>org.apache.maven.plugins</groupId>
205
        <artifactId>maven-jar-plugin</artifactId>
206
        <executions>
207
          <!-- Generates a jar file only with the test classes -->
208
          <execution>
209
            <goals>
210
              <goal>test-jar</goal>
211
            </goals>
212
            <configuration>
213
              <includes>
214
                <include>**/**</include>
215
              </includes>
216
            </configuration>
217
          </execution>
218
        </executions>
219
      </plugin> 
220
      ...
221
    </plugins>
222
  </build>
223

  
224
How to set a dependency with tests jar
225
-----------------------------------------
226

  
227
You can set a dependency with a test jar adding to
228
the declaration of the dependency the scope of
229
test and the type of "test-jar"::
230

  
231
  <dependency>
232
      <groupId>...</groupId>
233
      <artifactId>...</artifactId>
234
      <type>test-jar</type>
235
      <scope>test</scope>
236
  </dependency>
237

  
238
How use ant in maven
239
-------------------------
240

  
241
You can use ant embed in the pom of you project.
242
To do this use::
243

  
244
  <plugin>
245
    <artifactId>maven-antrun-plugin</artifactId>
246
    <version>1.7</version>
247
    <executions>
248
      <execution>
249
        <phase>generate-sources</phase>
250
        <configuration>
251
          <target>
252
            <echo>Hello world!</echo>
253
          </target>
254
        </configuration>
255
        <goals>
256
          <goal>run</goal>
257
        </goals>
258
      </execution>
259
    </executions>
260
  </plugin>
261

  
262
Fail when execute "mvn deploy" with "No connector available"
263
-------------------------------------------------------------
264

  
265
When execute a "mvn deploy" fail with the error::
266

  
267
  [INFO] ------------------------------------------------------------------------
268
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy 
269
    (default-deploy) on project org.gvsig.desktop: Failed to deploy artifacts/metadata: 
270
    No connector available to access repository gvsig-repository (dav:https://devel.gvsig.org/m2repo/j2se) 
271
    of type default using the available factories WagonRepositoryConnectorFactory -> [Help 1]
272
  [ERROR] 
273
  
274
This happens to be configured the webdav wagon as an extension in the section "build"::
275

  
276
  ...
277
  <build>
278
    <extensions>
279
        <extension>
280
            <groupId>org.apache.maven.wagon</groupId>
281
            <artifactId>wagon-webdav-jackrabbit</artifactId>
282
            <version>1.0-beta-7</version>
283
        </extension>
284
    </extensions>
285
  ...
286

  
287
Fail when execute "mvn release: prepare" with "svn command failed... Could not authenticate"
288
------------------------------------------------------------------------------------------------
289

  
290
When running "mvn release: prepare" updates poms, compiles, and then
291
fails with the following error ::
292

  
293
  [INFO] ------------------------------------------------------------------------
294
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.1:prepare 
295
    (default-cli) on project org.gvsig.desktop: Unable to commit files
296
  [ERROR] Provider message:
297
  [ERROR] The svn command failed.
298
  [ERROR] Command output:
299
  [ERROR] svn: Commit failed (details follow):
300
  [ERROR] svn: MKACTIVITY of '/svn/gvsig-desktop/!svn/act/931a27bc-57e8-45d9-adcd-5a2cf54a7045': 
301
    authorization failed: Could not authenticate to server: rejected Basic challenge (https://devel.gvsig.org)
302
  [ERROR] -> [Help 1]
303
  [ERROR] 
304
  [ERROR]
305

  
306
Apparently maven in linux system use the svn of system and if you're not
307
authenticated when trying to access to the repository, svn fails.
308

  
309
This is solved by executing a commit from the command line on
310
some file of the project (only if you have not enabled the option 
311
"store-passwords = no" in $ HOME / .subversion / config). For example, you 
312
can add or remove at the end of "pom.xml" a blank line and then run 
313
from the command line ::
314

  
315
  svn ci -m "" pom.xml
316
  
317
Another option that works on Windows in declaring the user and password in the command:
318

  
319
mvn release:prepare -Dusername=[username] -Dpassword=[password]
320

  
321

  
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.7/org.gvsig.vectorediting.app/org.gvsig.vectorediting.app.mainplugin/src/main/java/org/gvsig/app/project/documents/view/toc/actions/EndEditingTocMenuEntry.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.app.project.documents.view.toc.actions;
25

  
26
import org.slf4j.Logger;
27
import org.slf4j.LoggerFactory;
28

  
29
import org.gvsig.andami.PluginServices;
30
import org.gvsig.andami.plugins.IExtension;
31
import org.gvsig.app.project.documents.view.toc.AbstractTocContextMenuAction;
32
import org.gvsig.app.project.documents.view.toc.ITocItem;
33
import org.gvsig.fmap.mapcontext.layers.FLayer;
34
import org.gvsig.vectorediting.app.mainplugin.EditingExtension;
35

  
36

  
37
public class EndEditingTocMenuEntry extends AbstractTocContextMenuAction {
38

  
39
    public static final String EXTENSION_POINT_NAME = "EndEditing";
40

  
41
    private IExtension ext = null;
42

  
43
    private static Logger logger =
44
        LoggerFactory.getLogger(EndEditingTocMenuEntry.class);
45

  
46
	public String getGroup() {
47
		return "vectorEditing";
48
	}
49

  
50
	public int getGroupOrder() {
51
		return 0;
52
	}
53

  
54
	public int getOrder() {
55
		return 1;
56
	}
57

  
58
	public String getText() {
59
		return PluginServices.getText(this, "end_editing");
60
	}
61

  
62
	public boolean isEnabled(ITocItem item, FLayer[] selectedItems) {
63
	    return ((EditingExtension)getExtension()).isEnabled("end-editing");
64
	}
65

  
66
   public boolean isVisible(ITocItem item, FLayer[] selectedItems) {
67
        return ((EditingExtension)getExtension()).isVisible("end-editing");
68
    }
69

  
70

  
71
	public void execute(ITocItem item, FLayer[] selItems) {
72
	       getExtension().execute("end-editing");
73
	}
74

  
75
    private IExtension getExtension() {
76

  
77
        if (ext == null) {
78
            ext = PluginServices.getExtension(EditingExtension.class);
79
        }
80
        return ext;
81
    }
82

  
83
}
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.7/org.gvsig.vectorediting.app/org.gvsig.vectorediting.app.mainplugin/src/main/java/org/gvsig/app/project/documents/view/toc/actions/StartEditingTocMenuEntry.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.app.project.documents.view.toc.actions;
25

  
26
import org.slf4j.Logger;
27
import org.slf4j.LoggerFactory;
28

  
29
import org.gvsig.andami.PluginServices;
30
import org.gvsig.andami.plugins.IExtension;
31
import org.gvsig.app.project.documents.view.toc.AbstractTocContextMenuAction;
32
import org.gvsig.app.project.documents.view.toc.ITocItem;
33
import org.gvsig.fmap.mapcontext.layers.FLayer;
34
import org.gvsig.vectorediting.app.mainplugin.EditingExtension;
35

  
36

  
37
public class StartEditingTocMenuEntry extends AbstractTocContextMenuAction {
38

  
39
    public static final String EXTENSION_POINT_NAME = "StartEditing";
40

  
41
    private IExtension ext = null;
42

  
43
    private static Logger logger =
44
        LoggerFactory.getLogger(StartEditingTocMenuEntry.class);
45

  
46
	public String getGroup() {
47
		return "vectorEditing";
48
	}
49

  
50
	public int getGroupOrder() {
51
		return 0;
52
	}
53

  
54
	public int getOrder() {
55
		return 0;
56
	}
57

  
58
	public String getText() {
59
		return PluginServices.getText(this, "start_editing");
60
	}
61

  
62
	public boolean isEnabled(ITocItem item, FLayer[] selectedItems) {
63
	    return ((EditingExtension)getExtension()).isEnabled("start-editing");
64
	}
65

  
66
   public boolean isVisible(ITocItem item, FLayer[] selectedItems) {
67
       return ((EditingExtension)getExtension()).isVisible("start-editing");
68
    }
69

  
70

  
71
	public void execute(ITocItem item, FLayer[] selItems) {
72
	       getExtension().execute("start-editing");
73
	}
74

  
75
    private IExtension getExtension() {
76

  
77
        if (ext == null) {
78
            ext = PluginServices.getExtension(EditingExtension.class);
79
        }
80
        return ext;
81
    }
82

  
83
}
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.7/org.gvsig.vectorediting.app/org.gvsig.vectorediting.app.mainplugin/src/main/java/org/gvsig/vectorediting/app/mainplugin/ServiceExtension.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright ? 2007-2014 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 2
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.vectorediting.app.mainplugin;
25

  
26
import org.gvsig.andami.plugins.Extension;
27
import org.gvsig.app.ApplicationLocator;
28
import org.gvsig.app.ApplicationManager;
29
import org.gvsig.app.project.documents.view.ViewDocument;
30
import org.gvsig.app.project.documents.view.gui.IView;
31
import org.gvsig.fmap.mapcontext.layers.FLayer;
32
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect;
33
import org.gvsig.vectorediting.swing.api.EditingContext;
34
import org.gvsig.vectorediting.swing.api.EditingSwingLocator;
35
import org.gvsig.vectorediting.swing.api.EditingSwingManager;
36

  
37
public class ServiceExtension extends Extension {
38

  
39
    public void initialize() {
40
    }
41

  
42
    public void execute(String actionCommand) {
43
        IView view = getActiveView();
44
        EditingSwingManager swingManager =
45
            EditingSwingLocator.getSwingManager();
46

  
47
        if (view != null) {
48
            EditingContext editingContext =
49
                swingManager.getEditingContext(view.getMapControl());
50
            editingContext.activateService(actionCommand);
51
        }
52

  
53
    }
54

  
55
    public boolean isEnabled() {
56
        return this.isVisible();
57
    }
58

  
59
    @Override
60
    public boolean isEnabled(String action) {
61
        IView view = getActiveView();
62
        FLyrVect activeLayer = getActiveLayer(view);
63

  
64
        if ((view != null) && (activeLayer != null) && activeLayer.isEditing() && action!=null) {
65
            EditingSwingManager swingManager =
66
                EditingSwingLocator.getSwingManager();
67
            EditingContext editingContext =
68
                swingManager.getEditingContext(view.getMapControl());
69
            return editingContext.isServiceCompatible(action);
70
        }
71
        return false;
72
    }
73

  
74
    public boolean isVisible() {
75
        IView view = getActiveView();
76
        FLyrVect activeLayer = getActiveLayer(view);
77
        return ((view != null) && (activeLayer != null) && activeLayer
78
            .isEditing());
79
    }
80

  
81
    @Override
82
    public boolean isVisible(String action) {
83
        return this.isVisible();
84
    }
85

  
86
    @Override
87
    public boolean canQueryByAction() {
88
        return true;
89
    }
90

  
91
    private IView getActiveView() {
92

  
93
        ApplicationManager application = ApplicationLocator.getManager();
94
        IView view = (IView) application.getActiveComponent(ViewDocument.class);
95
        return view;
96
    }
97

  
98
    private FLyrVect getActiveLayer(IView view) {
99
        if (view != null) {
100
            ViewDocument viewDocument = view.getViewDocument();
101
            FLayer[] actives =
102
                viewDocument.getMapContext().getLayers().getActives();
103

  
104
            if ((actives.length == 1) && (actives[0] instanceof FLyrVect)) {
105
                return (FLyrVect) actives[0];
106
            }
107
        }
108
        return null;
109
    }
110
}
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.7/org.gvsig.vectorediting.app/org.gvsig.vectorediting.app.mainplugin/src/main/java/org/gvsig/vectorediting/app/mainplugin/EditingExtension.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright ? 2007-2014 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 2
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.vectorediting.app.mainplugin;
25

  
26
import java.io.File;
27

  
28
import org.slf4j.Logger;
29
import org.slf4j.LoggerFactory;
30

  
31
import org.gvsig.andami.IconThemeHelper;
32
import org.gvsig.andami.PluginServices;
33
import org.gvsig.andami.plugins.Extension;
34
import org.gvsig.app.ApplicationLocator;
35
import org.gvsig.app.ApplicationManager;
36
import org.gvsig.app.project.documents.view.ViewDocument;
37
import org.gvsig.app.project.documents.view.gui.DefaultViewPanel;
38
import org.gvsig.app.project.documents.view.gui.IView;
39
import org.gvsig.app.project.documents.view.toc.actions.EndEditingTocMenuEntry;
40
import org.gvsig.app.project.documents.view.toc.actions.StartEditingTocMenuEntry;
41
import org.gvsig.app.project.documents.view.toolListeners.StatusBarListener;
42
import org.gvsig.fmap.mapcontext.MapContextLocator;
43
import org.gvsig.fmap.mapcontext.layers.FLayer;
44
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect;
45
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
46
import org.gvsig.fmap.mapcontext.rendering.symbols.SymbolException;
47
import org.gvsig.fmap.mapcontext.rendering.symbols.SymbolManager;
48
import org.gvsig.fmap.mapcontrol.MapControl;
49
import org.gvsig.fmap.mapcontrol.MapControlCreationListener;
50
import org.gvsig.fmap.mapcontrol.MapControlLocator;
51
import org.gvsig.fmap.mapcontrol.tools.Behavior.Behavior;
52
import org.gvsig.fmap.mapcontrol.tools.Behavior.MouseMovementBehavior;
53
import org.gvsig.tools.ToolsLocator;
54
import org.gvsig.tools.extensionpoint.ExtensionPoint;
55
import org.gvsig.tools.observer.Notification;
56
import org.gvsig.tools.observer.Observable;
57
import org.gvsig.tools.observer.Observer;
58
import org.gvsig.vectorediting.lib.spi.EditingProviderLocator;
59
import org.gvsig.vectorediting.lib.spi.EditingProviderManager;
60
import org.gvsig.vectorediting.swing.api.EditingContext;
61
import org.gvsig.vectorediting.swing.api.EditingSwingLocator;
62
import org.gvsig.vectorediting.swing.api.EditingSwingManager;
63

  
64
public class EditingExtension extends Extension implements Observer {
65

  
66
    private static Logger logger = LoggerFactory.getLogger(EditingExtension.class);
67

  
68
    public void execute(String actionCommand) {
69

  
70
        IView view = getActiveView();
71
        EditingSwingManager swingManager =
72
            EditingSwingLocator.getSwingManager();
73

  
74
        if (view != null) {
75

  
76
            FLyrVect layer = getActiveLayer(view);
77
            EditingContext editingContext =
78
                swingManager.getEditingContext(view.getMapControl());
79

  
80
            if ("start-editing".equals(actionCommand)) {
81

  
82
                if (canBeEdited(layer)) {
83
                    MapControl mapControl = view.getMapControl();
84
                    StatusBarListener sbl = new StatusBarListener(mapControl);
85
                    editingContext.beginEdition(layer,
86
                        new Behavior[] { new MouseMovementBehavior(sbl) });
87
                    editingContext.addObserver(this);
88
                    ApplicationLocator.getManager().refreshMenusAndToolBars();
89
                }
90

  
91
            } else if ("end-editing".equals(actionCommand)) {
92

  
93
                if ((layer != null) && layer.isEditing()) {
94
                    editingContext.endEdition(layer);
95
                    ApplicationLocator.getManager().refreshMenusAndToolBars();
96
                }
97

  
98
            }
99
        }
100
    }
101

  
102
    public void initialize() {
103
        registerIcons();
104

  
105
        // Disable default view panel console. Uses editing context console.
106
        DefaultViewPanel.setDisableConsole(true);
107

  
108
        // Adding TOC menu entry
109
        ExtensionPoint exPoint = ToolsLocator.getExtensionPointManager().add(
110
                "View_TocActions", "");
111
        exPoint.append(
112
            StartEditingTocMenuEntry.EXTENSION_POINT_NAME,
113
                "TOC popup menu to start vector layer's editing",
114
                new StartEditingTocMenuEntry());
115
        exPoint.append(
116
            EndEditingTocMenuEntry.EXTENSION_POINT_NAME,
117
                "TOC popup menu to end vector layer's editing",
118
                new EndEditingTocMenuEntry());
119
    }
120

  
121

  
122
    private void registerIcons() {
123
        IconThemeHelper.registerIcon("vectorediting", "vector-editing", this);
124
    }
125

  
126
    @Override
127
    public void postInitialize() {
128
        super.postInitialize();
129
        registerSymbols();
130

  
131
        MapControlLocator.getMapControlManager().addMapControlCreationListener(new MapControlCreationListener() {
132

  
133
            public MapControl mapControlCreated(MapControl mapControl) {
134
                EditingContext editingContext = EditingSwingLocator.getSwingManager().getEditingContext(mapControl);
135
                StatusBarListener sbl = new StatusBarListener(mapControl);
136
                editingContext.setDefaultBehaviors(new Behavior[] { new MouseMovementBehavior(sbl) });
137
                editingContext.addObserver(EditingExtension.this);
138
                ApplicationLocator.getManager().refreshMenusAndToolBars();
139
                return mapControl;
140
            }
141
        });
142
    }
143

  
144
    /**
145
     * Register all symbols in the plugin symbols folder in the providerManager.
146
     * The description of the symbols must be unique because the key used for registration is the proper description of the symbol.
147
     *
148
     */
149
    private void registerSymbols() {
150

  
151
        EditingProviderManager providerManager =
152
            EditingProviderLocator.getProviderManager();
153

  
154
        SymbolManager symbolManager = MapContextLocator.getSymbolManager();
155
        File pluginFolder = getPlugin().getPluginDirectory();
156
        String pathSeparator = System.getProperty("file.separator");
157
        String symbolsPath = pluginFolder.getAbsolutePath()+pathSeparator+"symbols"+pathSeparator+"editing";
158
        File symbolsFolder = new File(symbolsPath);
159
        ISymbol[] symbols = null;
160
        try {
161
            symbols = symbolManager.loadSymbols(symbolsFolder);
162
        } catch (SymbolException e) {
163
            logger.warn("No symbols loaded from "+symbolsPath, e);
164
        }
165

  
166
        if (symbols != null) {
167
            for (int i = 0; i < symbols.length; i++) {
168
                ISymbol symbol = symbols[i];
169
                String description = symbol.getDescription();
170
                providerManager.registerSymbol(description, symbol);
171
            }
172
        }
173
    }
174

  
175
    public boolean isEnabled() {
176
        return true;
177
    }
178

  
179
    public boolean isVisible() {
180
        return true;
181
    }
182

  
183
    @Override
184
    public boolean isVisible(String action) {
185
        IView view = getActiveView();
186
        FLyrVect activeLayer = getActiveLayer(view);
187

  
188
        if ("start-editing".equals(action)) {
189
            return ((view != null) && (activeLayer != null) && !activeLayer
190
                .isEditing());
191

  
192
        } else {
193
            return ((view != null) && (activeLayer != null) && activeLayer
194
                .isEditing());
195

  
196
        }
197
    }
198

  
199
    @Override
200
    public boolean isEnabled(String action) {
201

  
202
        IView vista = getActiveView();
203
        FLyrVect activeLayer = getActiveLayer(vista);
204

  
205
        if ("start-editing".equals(action)) {
206
            return (canBeEdited(activeLayer));
207

  
208
        } else if ("end-editing".equals(action)) {
209
            return activeLayer.isEditing();
210

  
211
        }
212

  
213
        return false;
214

  
215
    }
216

  
217
    @Override
218
    public boolean canQueryByAction() {
219
        return true;
220
    }
221

  
222
    private IView getActiveView() {
223
        ApplicationManager application = ApplicationLocator.getManager();
224
        IView view = (IView) application.getActiveComponent(ViewDocument.class);
225
        return view;
226
    }
227

  
228
    private boolean canBeEdited(FLyrVect layer) {
229
        if (layer != null && layer.isAvailable()) {
230

  
231
            boolean isWritable = layer.isWritable();
232
            boolean isNotTransformed =
233
                layer.getFeatureStore().getTransforms().isEmpty();
234

  
235
            return isWritable && isNotTransformed && !layer.isEditing();
236
        }
237

  
238
        return false;
239
    }
240

  
241
    private FLyrVect getActiveLayer(IView vista) {
242
        if (vista != null) {
243
            ViewDocument viewDocument = vista.getViewDocument();
244
            FLayer[] actives =
245
                viewDocument.getMapContext().getLayers().getActives();
246

  
247
            if ((actives.length == 1) && (actives[0] instanceof FLyrVect)) {
248
                return (FLyrVect) actives[0];
249
            }
250
        }
251
        return null;
252
    }
253

  
254
    public void update(Observable observable, Object notification) {
255

  
256
        if (notification instanceof Notification){
257
            ApplicationManager appManager =
258
                ApplicationLocator.getManager();
259
            Notification n = (Notification)notification;
260
            if (n.getType().equalsIgnoreCase(EditingContext.CHANGE_SELECTED_TOOL_NOTIFICATION)){
261
                String name = (String)n.getValue();
262
                PluginServices.getMainFrame().setSelectedTool(name);
263
                appManager.refreshMenusAndToolBars();
264

  
265
            } else if (n.getType().equalsIgnoreCase(EditingContext.REFRESH_TOOLS_NOTIFICATION)){
266
                appManager.refreshMenusAndToolBars();
267
            }
268
        }
269
    }
270
}
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.7/org.gvsig.vectorediting.app/org.gvsig.vectorediting.app.mainplugin/src/main/resources-plugin/i18n/text.properties
1
start_editing = Comenzar edici\u00f3n
2
end_editing = Terminar edici\u00f3n
3
insert_point = Insertar punto
4
insert_multipoint = Insertar MultiPunto
5
insert_line = Insertar l\u00ednea
6
insert_arc = Insertar arco
7
insert_circle_cr = Insertar c\u00edrculo (centro y radio)
8
insert_circumference_cr = Insertar circunferencia (centro y radio)
9
insert_circle_3p = Insertar c\u00edrculo (tres puntos)
10
insert_circumference_3p = Insertar circunferencia (tres puntos)
11
insert_ellipse = Insertar elipse
12
insert_filled_ellipse = Insertar elipse rellena
13
insert_polyline = Insertar polil\u00ednea
14
insert_polygon = Insertar pol\u00edgono
15
insert_regular_polygon = Insertar pol\u00edgono regular
16
insert_filled_regular_polygon = Insertar pol\u00edgono regular relleno
17
insert_rectangle = Insertar rect\u00e1ngulo
18
insert_filled_rectangle =  Insertar rect\u00e1ngulo relleno
19
insert_spline= Insertar curva spline
20
insert_filled_spline = Insertar curva spline rellena
21
insert_rectangular_matrix = Matriz rectangular de geometr\u00edas
22
insert_polar_matrix = Matriz polar de geometr\u00edas
23
modify_internal_polygon = Pol\u00edgono interno
24
modify_explode_geometry = Descomponer geometr\u00eda
25
modify_move = Mover geometr\u00eda
26
modify_rotate = Rotar geometr\u00eda
27
modify_duplicate = Duplicar geometr\u00eda
28
modify_split_line = Partir linea por un punto
29
modify_split = Partir geometr\u00eda
30
modify_scale = Escalar geometr\u00eda
31
modify_simplify = Simplificar geometr\u00eda
32
modify_join = Unir geometr\u00edas
33
insert_autopolygon = Insertar autopol\u00edgono
34
modify_stretch = Estirar geometr\u00eda
35
modify_extend_line = Alargar l\u00ednea hasta objeto
36
modify_trim_line = Recortar l\u00ednea por un objeto
37
modify_edit_vertex = Editar v\u00e9rtice
38
uniqueselection = Seleccione una \u00fanica geometr\u00eda
39
selectvertex = Seleccione un v\u00e9rtice
40
moveVertexOr = Punto para mover el v\u00e9rtice o
41
insert_vertex = Insertar v\u00e9rtice
42
remove_vertex = Eliminar v\u00e9rtice
43
selection=Selecci\u00f3n
44
invalid_option=Opci\u00f3n no v\u00e1lida
45
center=Centro
46
radius=Radio
47
save_changes_performed=Guardar cambios realizados
48
discard= Descartar
49
discard_and_loose_changes= Descartar cambios y perder los cambios
50
continue= Continuar
51
do_not_save_yet_stay_in_editing_mode= No guardar los cambios y seguir en modo edici\u00f3n
52
indicate_new_point= Indique un nuevo punto
53
arc_mode = Modo arco
54
line_mode = Modo l\u00ednea
55
select_new_tool= Seleccione una nueva herramienta
56
draw_geometry_to_internal_polygon= Seleccione una herramienta para dibujar un pol\u00edgono interno
57
draw_geometry_to_autopolygon = Seleccione una herramienta para dibujar un autopol\u00edgono
58
draw_geometry_to_split = Seleccione una herramienta para partir las geometr\u00edas
59
draw_geometry_to_select_vertex = Seleccione una herramienta poligonal para seleccionar v\u00e9rtices
60
save = Guardar
61
discard = Descartar
62
continue = Continuar
63
export = Exportar
64
ask_save_layer = \u00bfDesea guardar la capa
65
can_not_write_layer =  No existe writer para este formato de capa o no tiene permisos de escritura.\n\u00bfQu\u00e9 desea hacer?
66
save_changes_performed = Guardar cambios realizados
67
discard_and_loose_changes = Descartar y perder los cambios
68
export_to_another_format = Exportar a otro formato
69
do_not_save_yet_stay_in_editing_mode = No guardar los cambios y seguir editando
70
first_point= Primer punto
71
second_point= Segundo punto
72
third_point= Tercer punto
73
start_point= Punto de inicio
74
middle_point= Punto medio
75
end_point= Punto final
76
first_point_A_axis = Primer punto del eje A
77
second_point_A_axis = Segundo punto del eje A
78
length_of_B_axis= Longitud del eje B
79
inscribed = Inscrito
80
circumscribed = Circunscrito
81
sides_of_regular_polygon = Indique los lados del poligono regular
82
center_of_regular_polygon = Centro del pol\u00edguno regular
83
point_of_circle = Punto del c\u00edrculo del pol\u00edgono
84
sides = Lados
85
key_arc_mode = A
86
key_line_mode = L
87
key_close = C
88
key_finish = F
89
key_inscribed = I
90
key_circumscribed = C
91
key_remove_last_point = Q
92
remove_last_point = Quitar \u00faltimo punto
93
close_polyline = Cerrar polil\u00ednea
94
close_spline = Cerrar curva spline
95
new_point = Nuevo punto
96
new_value = Nuevo valor
97
finished = finalizada
98
center_of_rotation = Centro de rotaci\u00f3n
99
angle_of_rotation = \u00c1ngulo de rotaci\u00f3n (grados)
100
origin_point = Origen
101
scale_factor_or_reference_point = Factor de escala o punto de referencia
102
second_scale_point = Segundo punto para la escala
103
tolerance = Tolerancia
104
line_to_extend = Seleccione l\u00ednea para alargar
105
line_to_trim = Seleccione l\u00ednea para partir
106
modify_smooth_line = Suavizar l\u00ednea
107
intermediate_steps_1_9 = Pasos intermedios [1,9]
108
algorithm = algoritmo
109
natural_cubic_splines = Splines c\u00fabicos naturales
110
bezier_curves = Curvas B\u00e9zier
111
b_splines = B-splines
112
key_natural_cubic_splines = 1
113
key_bezier_curves = 2
114
key_b_splines = 3
115
columns_number = N\u00famero de columnas
116
rows_number = N\u00famero de filas
117
distance_between_columns = Distancia entre columnas
118
distance_between_rows = Distancia entre filas
119
key_yes= S
120
key_no = N
121
yes = Si
122
no = No
123
number_of_total_elements = N\u00famero de elementos totales
124
rotate_elements = Rotar elementos?
125
angle_between_elements = Angulo entre elementos
126
modify = modificar
127
insert = insertar
128
Modify = Modificar
129
Insert = Insertar
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.7/org.gvsig.vectorediting.app/org.gvsig.vectorediting.app.mainplugin/src/main/resources-plugin/i18n/text_en.properties
1
start_editing = Start editing
2
end_editing = End editing
3
insert_point = Insert point
4
insert_multipoint = Insert MultiPoint
5
insert_line = Insert line
6
insert_arc = Insert arc
7
insert_circle_cr=Insert circle (center & radius)
8
insert_circumference_cr=Insert circumference (center & radius)
9
insert_circle_3p = Insert circle (three point)
10
insert_circumference_3p = Insert circumference (three points)
11
insert_ellipse = Insert ellipse
12
insert_filled_ellipse = Insert filled ellipse
13
insert_polyline = Insert polyline
14
insert_polygon = Insert polygon
15
insert_regular_polygon = Insert regular polygon
16
insert_filled_regular_polygon = Insert filled regular polygon
17
insert_rectangle = Insert rectangle
18
insert_filled_rectangle = Insert filled rectangle
19
insert_spline= Insert spline curve
20
insert_filled_spline = Insert filled spline
21
insert_rectangular_matrix = Rectangular matrix of geometries
22
insert_polar_matrix = Polar matrix of geometries
23
modify_internal_polygon = Internal polygon
24
modify_explode_geometry = Explode geometry
25
modify_move = Move geometry
26
modify_rotate = Rotate geometry
27
modify_duplicate = Duplicate geometry
28
modify_split_line = Split line open by a point
29
modify_split = Split geometry
30
modify_scale = Scale geometry
31
modify_simplify = Simplify geometry
32
insert_autopolygon = Insert autopolygon
33
modify_join = Join geometries
34
modify_stretch = Stretch geometry
35
modify_extend_line = Extend line to object
36
modify_trim_line = Trim line by object
37
modify_edit_vertex = Edit vertex
38
uniqueselection = Select only one geometry
39
selectvertex = Select a vertex
40
moveVertexOr = Point to move vertex or
41
insert_vertex = Insertr vertex
42
remove_vertex = Remove vertex
43
selection=Selection
44
invalid_option=Invalid option
45
center=Center
46
radius=Radius
47
save_changes_performed=Save changed performed
48
discard= Discard
49
discard_and_loose_changes= Discard changes and loose changes
50
continue= Continue
51
do_not_save_yet_stay_in_editing_mode= Don't save changes and continue editing
52
indicate_new_point= Indicate new point
53
arc_mode = Arc mode
54
line_mode = Line mode
55
select_new_tool= Select a new tool
56
draw_geometry_to_interal_polygon= Select tool to draw a internal polygon
57
draw_geometry_to_autopolygon = Select tool to draw an autopolygon
58
draw_geometry_to_split = Select tool to split selected geometries
59
draw_geometry_to_select_vertex = Select a polygonal tool to select vertex
60
save = Save
61
discard = Discard
62
continue = Continue
63
export = Export
64
ask_save_layer = Would you really like to save the layer
65
can_not_write_layer =  There are not writer for this layer format or you don't have write permissions.\nWhat do you want to do?
66
save_changes_performed = Save changed performed
67
discard_and_loose_changes = Discard and loose changes
68
export_to_another_format = Export to another format
69
do_not_save_yet_stay_in_editing_mode = Do not save changes and continue editing
70
first_point= First point
71
second_point= Second point
72
start_point= Start point
73
middle_point= Middle point
74
third_point= Third point
75
end_point= End point
76
first_point_A_axis = First point of A axis
77
second_point_A_axis = Second point of A axis
78
length_of_B_axis= Length of B axis
79
inscribed = Inscribed
80
circumscribed = Circumscribed
81
sides_of_regular_polygon = Indicate sides of regular polygon
82
center_of_regular_polygon = Center of regular polygon
83
point_of_circle = Point of circle of  polygon
84
sides = Sides
85
key_arc_mode = A
86
key_line_mode = L
87
key_close = C
88
key_finish = F
89
key_inscribed = I
90
key_circumscribed = C
91
key_remove_last_point = R
92
remove_last_point = Remove last point
93
close_polyline = Close polyline
94
close_spline = Close spline curve
95
new_point = New point
96
new_value = New value
97
finished = finished
98
center_of_rotation=Center of rotation
99
angle_of_rotation=Angle of rotation (degree)
100
origin_point = Origin
101
scale_factor_or_reference_point = Scale factor or reference point
102
second_scale_point = Second scale point
103
tolerance = Tolerance
104
line_to_extend = Select line to extend
105
line_to_trim = Select line to trim
106
modify_smooth_line = Smooth line
107
intermediate_steps_1_9 = Intermediate steps [1,9]
108
algorithm = algorithm
109
natural_cubic_splines = Natural cubic splines
110
bezier_curves = Bezier curves
111
b_splines = B-splines
112
key_natural_cubic_splines = 1
113
key_bezier_curves = 2
114
key_b_splines = 3
115
columns_number = Number of columns
116
rows_number = Number of rows
117
distance_between_columns = Distance between columns
118
distance_between_rows = Distance between rows
119
key_yes= Y
120
key_no = N
121
yes = Yes
122
no = No
123
number_of_total_elements = Number of total elements
124
rotate_elements = Rotate elements?
125
angle_between_elements = Angle between elements
126
modify = modify
127
insert = insert
128
Modify = Modify
129
Insert = Insert
org.gvsig.vectorediting/tags/org.gvsig.vectorediting-1.0.7/org.gvsig.vectorediting.app/org.gvsig.vectorediting.app.mainplugin/src/main/resources-plugin/config.xml
1
<?xml version="1.0" encoding="ISO-8859-1"?>
2
<!-- gvSIG. Desktop Geographic Information System. Copyright (C) 2007-2013 gvSIG
3
  Association. This program is free software; you can redistribute it and/or modify
4
  it under the terms of the GNU General Public License as published by the Free Software
5
  Foundation; either version 3 of the License, or (at your option) any later version.
6
  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
7
  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8
  PURPOSE. See the GNU General Public License for more details. You should have received
9
  a copy of the GNU General Public License along with this program; if not, write to
10
  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
11
  USA. For any additional information, do not hesitate to contact us at info AT gvsig.com,
12
  or visit our website www.gvsig.com. -->
13
<plugin-config>
14
  <depends plugin-name="org.gvsig.app.mainplugin" />
15
  <resourceBundle name="text" />
16
  <libraries library-dir="lib" />
17
  <extensions>
18
    <extension class-name="org.gvsig.vectorediting.app.mainplugin.EditingExtension"
19
      description="" active="true" priority="1">
20

  
21
      <action name="start-editing" label="start_editing" tooltip="start_editing"
22
        position="600800000" action-command="start-editing" icon="vector-editing"
23
        accelerator="" />
24

  
25
      <action name="end-editing" label="end_editing" tooltip="end_editing"
26
        position="600800000" action-command="end-editing" icon="vector-editing"
27
        accelerator="" />
28

  
29
      <menu text="Layer/start_editing" name="start-editing" />
30
      <menu text="Layer/end_editing" name="end-editing" />
31

  
32
      <tool-bar name="vector_editing" position="600800000">
33
        <action-tool name="start-editing" />
34
        <action-tool name="end-editing" />
35
      </tool-bar>
36

  
37
    </extension>
38

  
39
    <extension class-name="org.gvsig.vectorediting.app.mainplugin.ServiceExtension"
40
      description="" active="true" priority="1">
41

  
42
      <action name="remove" label="remove" tooltip="remove"
43
        action-command="remove" icon="remove" position="601002000"
44
        accelerator="" />
45
        <!-- accelerator="delete" /> -->
46

  
47
      <action name="insert-point" label="insert_point" tooltip="insert_point"
48
        action-command="insert-point" icon="insert-point" position="601002010"
49
        accelerator="" />
50

  
51
      <action name="insert-multipoint" label="insert_multipoint" tooltip="insert_multipoint"
52
        action-command="insert-multipoint" icon="insert-multipoint" position="601002025"
53
        accelerator="" />
54

  
55
      <action name="insert-line" label="insert_line" tooltip="insert_line"
56
        position="601002050" action-command="insert-line" icon="insert-line"
57
        accelerator="" />
58

  
59
      <action name="insert-arc" label="insert_arc" tooltip="insert_arc"
60
        position="601002060" action-command="insert-arc" icon="insert-arc"
61
        accelerator="" />
62

  
63
      <action name="insert-circle-cr" label="insert_circle_cr" tooltip="insert_circle_cr"
64
        position="601002100" action-command="insert-circle-cr" icon="insert-circle-cr"
65
        accelerator="" />
66

  
67
      <action name="insert-circumference-cr" label="insert_circumference_cr"
68
        tooltip="insert_circumference_cr" position="601002101" action-command="insert-circumference-cr"
69
        icon="insert-circumference-cr" accelerator="" />
70

  
71
      <action name="insert-circle-3p" label="insert_circle_3p" tooltip="insert_circle_3p"
72
        position="601002125" action-command="insert-circle-3p" icon="insert-circle-3p"
73
        accelerator="" />
74

  
75
      <action name="insert-circumference-3p" label="insert_circumference_3p"
76
        tooltip="insert_circumference_3p" position="601002126" action-command="insert-circumference-3p"
77
        icon="insert-circumference-3p" accelerator="" />
78

  
79
      <action name="insert-ellipse" label="insert_ellipse" tooltip="insert_ellipse"
80
        position="601002150" action-command="insert-ellipse" icon="insert-ellipse"
81
        accelerator="" />
82

  
83
      <action name="insert-filled-ellipse" label="insert_filled_ellipse"
84
        tooltip="insert_filled_ellipse" position="601002160" action-command="insert-filled-ellipse"
85
        icon="insert-filled-ellipse" accelerator="" />
86

  
87
      <action name="insert-polygon" label="insert_polygon" tooltip="insert_polygon"
88
        position="601002200" action-command="insert-polygon" icon="insert-polygon"
89
        accelerator="" />
90

  
91
      <action name="insert-polyline" label="insert_polyline" tooltip="insert_polyline"
92
        position="601002201" action-command="insert-polyline" icon="insert-polyline"
93
        accelerator="" />
94

  
95
      <action name="insert-filled-regular-polygon" label="insert_filled_regular_polygon"
96
        tooltip="insert_filled_regular_polygon" position="601002300"
97
        action-command="insert-filled-regular-polygon" icon="insert-filled-regular-polygon"
98
        accelerator="" />
99

  
100
      <action name="insert-regular-polygon" label="insert_regular_polygon"
101
        tooltip="insert_regular_polygon" position="601002301" action-command="insert-regular-polygon"
102
        icon="insert-regular-polygon" accelerator="" />
103

  
104
      <action name="insert-filled-rectangle" label="insert_filled_rectangle"
105
        tooltip="insert_filled_rectangle" position="601002350" action-command="insert-filled-rectangle"
106
        icon="insert-filled-rectangle" accelerator="" />
107

  
108
      <action name="insert-rectangle" label="insert_rectangle" tooltip="insert_rectangle"
109
        position="601002351" action-command="insert-rectangle" icon="insert-rectangle"
110
        accelerator="" />
111

  
112
      <action name="insert-filled-spline" label="insert_filled_spline"
113
        tooltip="insert_filled_spline" position="601002370" action-command="insert-filled-spline"
114
        icon="insert-filled-spline" accelerator="" />
115

  
116
      <action name="insert-spline" label="insert_spline" tooltip="insert_spline"
117
        position="601002371" action-command="insert-spline" icon="insert-spline"
118
        accelerator="" />
119

  
120
      <action name="modify-internal-polygon" label="modify_internal_polygon"
121
        tooltip="modify_internal_polygon" position="601002500" action-command="modify-internal-polygon"
122
        icon="modify-internal-polygon" accelerator="" />
123

  
124
      <action name="modify-explode-geometry" label="modify_explode_geometry"
125
        tooltip="modify_explode_geometry" position="601002600" action-command="modify-explode-geometry"
126
        icon="modify-explode-geometry" accelerator="" />
127

  
128
      <action name="modify-move" label="modify_move" tooltip="modify_move"
129
        position="601002700" action-command="modify-move" icon="modify-move"
130
        accelerator="" />
131

  
132
      <action name="modify-rotate" label="modify_rotate" tooltip="modify_rotate"
133
        position="601002800" action-command="modify-rotate" icon="modify-rotate"
134
        accelerator="" />
135

  
136
      <action name="modify-duplicate" label="modify_duplicate" tooltip="modify_duplicate"
137
        position="601002900" action-command="modify-duplicate" icon="modify-duplicate"
138
        accelerator="" />
139

  
140
      <action name="modify-split" label="modify_split" tooltip="modify_split"
141
        position="601003000" action-command="modify-split" icon="modify-split"
142
        accelerator="" />
143

  
144
      <action name="modify-split-line" label="modify_split_line" tooltip="modify_split_line"
145
        position="601003050" action-command="modify-split-line" icon="modify-split-line"
146
        accelerator="" />
147

  
148
      <action name="modify-scale" label="modify_scale" tooltip="modify_scale"
149
        position="601003100" action-command="modify-scale" icon="modify-scale"
150
        accelerator="" />
151

  
152
      <action name="modify-simplify" label="modify_simplify" tooltip="modify_simplify"
153
        position="601003200" action-command="modify-simplify" icon="modify-simplify"
154
        accelerator="" />
155

  
156
      <action name="modify-join" label="modify_join" tooltip="modify_join"
157
        position="601003300" action-command="modify-join" icon="modify-join"
158
        accelerator="" />
159

  
160
      <action name="insert-autopolygon" label="insert_autopolygon"
161
        tooltip="insert_autopolygon" position="601003400" action-command="insert-autopolygon"
162
        icon="insert-autopolygon" accelerator="" />
163

  
164
      <action name="modify-stretch" label="modify_stretch" tooltip="modify_stretch"
165
        position="601003500" action-command="modify-stretch" icon="modify-stretch"
166
        accelerator="" />
167

  
168
      <action name="modify-extend-line" label="modify_extend_line"
169
        tooltip="modify_extend_line" position="601003600" action-command="modify-extend-line"
170
        icon="modify-extend-line" accelerator="" />
171

  
172
      <action name="modify-trim-line" label="modify_trim_line" tooltip="modify_trim_line"
173
        position="601003700" action-command="modify-trim-line" icon="modify-trim-line"
174
        accelerator="" />
175

  
176
      <action name="modify-smooth-line" label="modify_smooth_line"
177
        tooltip="modify_smooth_line" position="601003800" action-command="modify-smooth-line"
178
        icon="modify-smooth-line" accelerator="" />
179

  
180
      <action name="modify-edit-vertex" label="modify_edit_vertex"
181
        tooltip="modify_edit_vertex" position="601003900" action-command="modify-edit-vertex"
182
        icon="modify-edit-vertex" accelerator="" />
183

  
184
      <action name="insert-rectangular-matrix" label="insert_rectangular_matrix"
185
        tooltip="insert_rectangular_matrix" position="601004000" action-command="insert-rectangular-matrix"
186
        icon="insert-rectangular-matrix" accelerator="" />
187

  
188
      <action name="insert-polar-matrix" label="insert_polar_matrix"
189
        tooltip="insert_polar_matrix" position="601004100" action-command="insert-polar-matrix"
190
        icon="insert-polar-matrix" accelerator="" />
191

  
192

  
193
      <menu text="Layer/Remove/remove" name="remove" />
194
      <menu text="Layer/Insert/insert_point" name="insert-point" />
195
      <menu text="Layer/Insert/insert_multipoint" name="insert-multipoint" />
196
      <menu text="Layer/Insert/insert_line" name="insert-line" />
197
      <menu text="Layer/Insert/insert_arc" name="insert-arc" />
198
      <menu text="Layer/Insert/insert_circle_cr" name="insert-circle-cr" />
199
      <menu text="Layer/Insert/insert_circumference_cr" name="insert-circumference-cr" />
200
      <menu text="Layer/Insert/insert_circle_3p" name="insert-circle-3p" />
201
      <menu text="Layer/Insert/insert_circumference_3p" name="insert-circumference-3p" />
202
      <menu text="Layer/Insert/insert_ellipse" name="insert-ellipse" />
203
      <menu text="Layer/Insert/insert_filled_ellipse" name="insert-filled-ellipse" />
204
      <menu text="Layer/Insert/insert_polyline" name="insert-polyline" />
205
      <menu text="Layer/Insert/insert_polygon" name="insert-polygon" />
206
      <menu text="Layer/Insert/insert_regular_polygon" name="insert-regular-polygon" />
207
      <menu text="Layer/Insert/insert_filled_regular_polygon" name="insert-filled-regular-polygon" />
208
      <menu text="Layer/Insert/insert_rectangle" name="insert-rectangle" />
209
      <menu text="Layer/Insert/insert_filled_rectangle" name="insert-filled-rectangle" />
210
      <menu text="Layer/Insert/insert_spline" name="insert-spline" />
211
      <menu text="Layer/Insert/insert_filled_spline" name="insert-filled-spline" />
212
      <menu text="Layer/Insert/insert_rectangular_matrix" name="insert-rectangular-matrix" />
213
      <menu text="Layer/Insert/insert_polar_matrix" name="insert-polar-matrix" />
214
      <menu text="Layer/Modify/modify_internal_polygon" name="modify-internal-polygon" />
215
      <menu text="Layer/Modify/modify_explode_geometry" name="modify-explode-geometry" />
216
      <menu text="Layer/Modify/modify_move" name="modify-move" />
217
      <menu text="Layer/Modify/modify_rotate" name="modify-rotate" />
218
      <menu text="Layer/Modify/modify_duplicate" name="modify-duplicate" />
219
      <menu text="Layer/Modify/modify_split_line" name="modify-split-line" />
220
      <menu text="Layer/Modify/modify_split" name="modify-split" />
221
      <menu text="Layer/Modify/modify_scale" name="modify-scale" />
222
      <menu text="Layer/Modify/modify_simplify" name="modify-simplify" />
223
      <menu text="Layer/Modify/insert_autopolygon" name="insert_autopolygon" />
224
      <menu text="Layer/Modify/modify_join" name="modify-join" />
225
      <menu text="Layer/Modify/modify_stretch" name="modify-stretch" />
226
      <menu text="Layer/Modify/modify_extend_line" name="modify-extend-line" />
227
      <menu text="Layer/Modify/modify_trim_line" name="modify-extend-line" />
228
      <menu text="Layer/Modify/modify_smooth_line" name="modify-smooth-line" />
229
      <menu text="Layer/Modify/modify_edit_vertex" name="modify-edit-vertex" />
230

  
231
      <tool-bar name="vector_editing" position="600800000">
232
        <selectable-tool name="remove" />
233
        <selectable-tool name="insert-point" />
234
        <selectable-tool name="insert-multipoint" />
235
        <selectable-tool name="insert-line" />
236
        <selectable-tool name="insert-arc" />
237
        <selectable-tool name="insert-circumference-cr" dropdowngroup="circle" />
238
        <selectable-tool name="insert-circle-cr" dropdowngroup="circle" />
239
        <selectable-tool name="insert-circumference-3p" dropdowngroup="circle" />
240
        <selectable-tool name="insert-circle-3p" dropdowngroup="circle" />
241
        <selectable-tool name="insert-ellipse" dropdowngroup="ellipse" />
242
        <selectable-tool name="insert-filled-ellipse" dropdowngroup="ellipse" />
243
        <selectable-tool name="insert-polyline" dropdowngroup="polygon"/>
244
        <selectable-tool name="insert-polygon" dropdowngroup="polygon"/>
245
        <selectable-tool name="insert-regular-polygon" dropdowngroup="regularpolygon"/>
246
        <selectable-tool name="insert-filled-regular-polygon" dropdowngroup="regularpolygon"/>
247
        <selectable-tool name="insert-rectangle" dropdowngroup="rectangle"/>
248
        <selectable-tool name="insert-filled-rectangle" dropdowngroup="rectangle"/>
249
        <selectable-tool name="insert-filled-spline" dropdowngroup="spline"/>
250
        <selectable-tool name="insert-spline" dropdowngroup="spline"/>
251
        <selectable-tool name="modify-internal-polygon" />
252
        <selectable-tool name="modify-explode-geometry" />
253
        <selectable-tool name="modify-move" />
254
        <selectable-tool name="modify-rotate" />
255
        <selectable-tool name="modify-duplicate" />
256
        <selectable-tool name="modify-split" />
257
        <selectable-tool name="modify-split-line" />
258
        <selectable-tool name="modify-scale" />
259
        <selectable-tool name="modify-simplify" />
260
        <selectable-tool name="insert-autopolygon" />
261
        <selectable-tool name="modify-join" />
262
        <selectable-tool name="modify-stretch" />
263
        <selectable-tool name="modify-extend-line" />
264
        <selectable-tool name="modify-trim-line" />
265
        <selectable-tool name="modify-smooth-line" />
266
        <selectable-tool name="insert-rectangular-matrix" dropdowngroup="matrix" />
267
        <selectable-tool name="insert-polar-matrix" dropdowngroup="matrix" />
268
        <selectable-tool name="modify-edit-vertex" />
269
      </tool-bar>
270

  
271
    </extension>
272
  </extensions>
273
</plugin-config>
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff