source: java/main/src/main/java/com/framsticks/params/ListAccess.java @ 97

Last change on this file since 97 was 97, checked in by psniegowski, 11 years ago

HIGHLIGHTS:

  • add proper exception passing between communication sides:

if exception occur during handling client request, it is
automatically passed as comment to error response.

it may be used to snoop communication between peers

  • fix algorithm choosing text controls in GUI
  • allow GUI testing in virtual frame buffer (xvfb)

FEST had some problem with xvfb but workaround was found

supports tab-completion based on requests history

CHANGELOG:
Further improve handling of exceptions in GUI.

Add StatusBar? implementing ExceptionResultHandler?.

Make completion processing asynchronous.

Minor changes.

Improve completion in console.

Improve history in InteractiveConsole?.

First working version of DirectConsole?.

Minor changes.

Make Connection.address non final.

It is more suitable to use in configuration.

Improvement of consoles.

Improve PopupMenu? and closing of FrameJoinable?.

Fix BrowserTest?.

Found bug with FEST running under xvfb.

JButtonFixture.click() is not working under xvfb.
GuiTest? has wrapper which uses JButton.doClick() directly.

Store CompositeParam? param in TreeNode?.

Simplify ClientSideManagedConnection? connecting.

There is now connectedFunctor needed, ApplicationRequests? can be
send right after creation. They are buffered until the version
and features are negotiated.

Narow down interface of ClientSideManagedConnection?.

Allow that connection specialization send only
ApplicationRequests?.

Improve policy of text control choosing.

Change name of Genotype in BrowserTest?.

Make BrowserTest? change name of Genotype.

Minor change.

First working draft of TrackConsole?.

Simplify Consoles.

More improvements with gui joinables.

Unify initialization on gui joinables.

More rework of Frame based entities.

Refactorize structure of JFrames based entities.

Extract GuiTest? from BrowserBaseTest?.

Reorganize Console classes structure.

Add Collection view to JoinableCollection?.

Configure timeout in testing.

Minor changes.

Rework connections hierarchy.

Add Mode to the get operation.

Make get and set in Tree take PrimitiveParam?.

Unify naming of operations.

Make RunAt? use the given ExceptionHandler?.

It wraps the virtual runAt() method call with
try-catch passing exception to handler.

Force RunAt? to include ExceptionHandler?.

Improve ClientAtServer?.

Minor change.

Another sweep with FindBugs?.

Rename Instance to Tree.

Minor changes.

Minor changes.

Further clarify semantics of Futures.

Add FutureHandler?.

FutureHandler? is refinement of Future, that proxifies
exception handling to ExceptionResultHandler? given
at construction time.

Remove StateFunctor? (use Future<Void> instead).

Make Connection use Future<Void>.

Unparametrize *ResponseFuture?.

Remove StateCallback? not needed anymore.

Distinguish between sides of ResponseFuture?.

Base ResponseCallback? on Future (now ResponseFuture?).

Make asynchronous store taking Future for flags.

Implement storeValue in ObjectInstance?.

File size: 1.9 KB
Line 
1package com.framsticks.params;
2
3
4
5import static com.framsticks.util.lang.Containers.filterInstanceof;
6
7import com.framsticks.params.types.ProcedureParam;
8
9/**
10 * @author Piotr Sniegowski
11 */
12public abstract class ListAccess implements AccessInterface {
13
14        final AccessInterface elementAccess;
15
16        public ListAccess(AccessInterface elementAccess) {
17                this.elementAccess = elementAccess;
18        }
19
20        // @Override
21        // public Param getGroupMember(int gi, int n) {
22        //      return null;
23        // }
24
25        @Override
26        public void setDefault(boolean numericOnly) {
27        }
28
29        @Override
30        public void setDefault(int i, boolean numericOnly) {
31        }
32
33        @Override
34        public void setMin() {
35        }
36
37        @Override
38        public void setMin(int i) {
39        }
40
41        @Override
42        public void setMax() {
43        }
44
45        @Override
46        public void setMax(int i) {
47        }
48
49        @Override
50        public void copyFrom(AccessInterface src) {
51        }
52
53        @Override
54        public void save(SinkInterface sink) {
55                for (CompositeParam p : filterInstanceof(getParams(), CompositeParam.class)) {
56                        Object child = get(p, Object.class);
57                        //this is probably an assertion
58                        assert child != null;
59                        elementAccess.select(child);
60                        elementAccess.save(sink);
61                }
62        }
63
64        @Override
65        public void load(SourceInterface stream) {
66        }
67
68        public AccessInterface getElementAccess() {
69                return elementAccess;
70        }
71
72        public abstract String computeIdentifierFor(Object selected);
73
74        @Override
75        public final FramsClass getFramsClass() {
76                return elementAccess.getFramsClass();
77        }
78
79        //TODO it could actually be used also
80        @Override
81        public void tryAutoAppend(Object object) {
82                throw new InvalidOperationException();
83        }
84
85        @Override
86        public Object call(String id, Object[] arguments) {
87                throw new InvalidOperationException().msg("list access does not support calling methods").arg("id", id);
88        }
89
90        @Override
91        public Object call(ProcedureParam param, Object[] arguments) {
92                throw new InvalidOperationException().msg("list access does not support calling methods").arg("param", param);
93        }
94
95};
Note: See TracBrowser for help on using the repository browser.