Revision 44338 trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/symboltables/ProjectSymbolTable.java
ProjectSymbolTable.java | ||
---|---|---|
51 | 51 |
*/ |
52 | 52 |
@SuppressWarnings("UseSpecificCatch") |
53 | 53 |
public class ProjectSymbolTable extends AbstractSymbolTable { |
54 |
public static final String PROJECT_GROUP = "Project"; |
|
54 | 55 |
|
55 | 56 |
public static final String AREA_NAME = "AREA"; |
56 | 57 |
public static final String PERIMETER_NAME = "PERIMETER"; |
... | ... | |
58 | 59 |
public static final String FETCH_FIRST_NAME = "FETCH_FIRST"; |
59 | 60 |
public static final String FETCH_FIRST_SELECTED_NAME = "FETCH_FIRST_SELECTED"; |
60 | 61 |
public static final String FETCH_NAME = "FETCH"; |
62 |
public static final String APPLICATION_NAME = "APPLICATION"; |
|
61 | 63 |
|
62 | 64 |
static final String NAME = "Project"; |
63 | 65 |
|
... | ... | |
131 | 133 |
|
132 | 134 |
public CurrentProjectFunction() { |
133 | 135 |
super( |
134 |
"Project",
|
|
136 |
PROJECT_GROUP,
|
|
135 | 137 |
"project", |
136 | 138 |
Range.is(0), |
137 | 139 |
"Access to the current project loaded in gvSIG desktop.\n", |
... | ... | |
148 | 150 |
|
149 | 151 |
} |
150 | 152 |
|
153 |
private class ApplicationFunction extends AbstractFunction { |
|
154 |
|
|
155 |
public ApplicationFunction() { |
|
156 |
super( |
|
157 |
PROJECT_GROUP, |
|
158 |
APPLICATION_NAME, |
|
159 |
Range.is(0), |
|
160 |
"Access to the Application object.\n", |
|
161 |
APPLICATION_NAME+"()", |
|
162 |
null, |
|
163 |
"ApplicationManager" |
|
164 |
); |
|
165 |
} |
|
166 |
|
|
167 |
@Override |
|
168 |
public Object call(Interpreter interpreter, Object[] args) throws Exception { |
|
169 |
return ApplicationLocator.getApplicationManager(); |
|
170 |
} |
|
171 |
|
|
172 |
} |
|
173 |
|
|
151 | 174 |
private class StoreFunction extends AbstractFunction { |
152 | 175 |
|
153 | 176 |
public StoreFunction() { |
154 | 177 |
super( |
155 |
"Project",
|
|
178 |
PROJECT_GROUP,
|
|
156 | 179 |
STORE_NAME, |
157 | 180 |
Range.is(2), // Range.between(1, 2), |
158 | 181 |
"Return the data store associated with a layer.", // or a table.\n" + |
... | ... | |
224 | 247 |
|
225 | 248 |
public FetchFunction() { |
226 | 249 |
super( |
227 |
"Project",
|
|
250 |
PROJECT_GROUP,
|
|
228 | 251 |
FETCH_NAME, |
229 | 252 |
Range.between(2, 4), |
230 | 253 |
"Access to the features of a table and retuen a list with the values.", |
... | ... | |
286 | 309 |
|
287 | 310 |
public FetchFirstFunction() { |
288 | 311 |
super( |
289 |
"Project",
|
|
312 |
PROJECT_GROUP,
|
|
290 | 313 |
FETCH_FIRST_NAME, |
291 | 314 |
Range.between(2, 4), |
292 | 315 |
"Access to the first feature of the layer, and " |
... | ... | |
359 | 382 |
private class FetchFirstSelectedFunction extends AbstractFunction { |
360 | 383 |
|
361 | 384 |
public FetchFirstSelectedFunction() { |
362 |
super("Project", |
|
385 |
super( |
|
386 |
PROJECT_GROUP, |
|
363 | 387 |
FETCH_FIRST_SELECTED_NAME, |
364 | 388 |
Range.is(2), |
365 | 389 |
"Access to the first feature of the selection.", |
... | ... | |
402 | 426 |
|
403 | 427 |
public ViewFunction() { |
404 | 428 |
super( |
405 |
"Project",
|
|
429 |
PROJECT_GROUP,
|
|
406 | 430 |
"view", |
407 | 431 |
Range.is(1), |
408 | 432 |
"Access to the indicated view", |
... | ... | |
428 | 452 |
|
429 | 453 |
public ViewBBoxFunction() { |
430 | 454 |
super( |
431 |
"Project",
|
|
455 |
PROJECT_GROUP,
|
|
432 | 456 |
"viewbbox", |
433 | 457 |
Range.is(0), |
434 | 458 |
"Return the BBox of the active view.", |
... | ... | |
450 | 474 |
|
451 | 475 |
public SavedPointFunction() { |
452 | 476 |
super( |
453 |
"Project",
|
|
477 |
PROJECT_GROUP,
|
|
454 | 478 |
"savedpoint", |
455 | 479 |
Range.is(1), |
456 | 480 |
"Return the value of the saved point with the name indicated.\n" |
... | ... | |
477 | 501 |
|
478 | 502 |
public AreaFunction() { |
479 | 503 |
super( |
480 |
"Project",
|
|
504 |
PROJECT_GROUP,
|
|
481 | 505 |
AREA_NAME, |
482 | 506 |
Range.between(2,3), |
483 | 507 |
"Calculate the area of the geometry in the indicated units", |
... | ... | |
518 | 542 |
|
519 | 543 |
public PerimeterFunction() { |
520 | 544 |
super( |
521 |
"Project",
|
|
545 |
PROJECT_GROUP,
|
|
522 | 546 |
PERIMETER_NAME, |
523 | 547 |
Range.between(2,3), |
524 | 548 |
"Calculate the perimeter of the geometry in the indicated units", |
... | ... | |
559 | 583 |
|
560 | 584 |
public PropertyFunction() { |
561 | 585 |
super( |
562 |
"Project",
|
|
586 |
PROJECT_GROUP,
|
|
563 | 587 |
"property", |
564 | 588 |
Range.between(2, 3), |
565 | 589 |
"Access to a property value in a properties file. If the" |
... | ... | |
631 | 655 |
this.addFunction(new AreaFunction()); |
632 | 656 |
this.addFunction(new PerimeterFunction()); |
633 | 657 |
this.addFunction(new SavedPointFunction()); |
658 |
this.addFunction(new ApplicationFunction()); |
|
634 | 659 |
} |
635 | 660 |
|
636 | 661 |
private MapContext getMapContext(Feature feature) { |
Also available in: Unified diff