• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

link-intersystems / lis-commons / #264

05 Nov 2023 11:38AM UTC coverage: 88.527% (-1.3%) from 89.804%
#264

Pull #7

renelink
Added tests.
Pull Request #7: Migrated swing-view stuff from java-swing-mvc-plugin-architecture.

249 of 400 new or added lines in 23 files covered. (62.25%)

7639 of 8629 relevant lines covered (88.53%)

0.89 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

94.74
/lis-commons-swing-view/src/main/java/com/link_intersystems/swing/view/AbstractView.java
1
package com.link_intersystems.swing.view;
2

3
import com.link_intersystems.util.context.Context;
4
import com.link_intersystems.util.context.dsl.ContextDsl;
5

6
import static java.util.Objects.requireNonNull;
7

8
public abstract class AbstractView implements View {
1✔
9

10
    private ViewSite viewSite;
11
    private ContextDsl contextDsl;
12

13
    @Override
14
    public void install(ViewSite viewSite) {
15
        this.viewSite = requireNonNull(viewSite);
1✔
16
        Context viewContext = viewSite.getViewContext();
1✔
17
        this.contextDsl = new ContextDsl(viewContext);
1✔
18
        doInstall(viewSite);
1✔
19
    }
1✔
20

21
    protected ViewSite getViewSite() {
22
        return viewSite;
1✔
23
    }
24

25
    protected ContextDsl getContextDsl() {
26
        return contextDsl;
1✔
27
    }
28

29
    protected abstract void doInstall(ViewSite viewSite);
30

31
    @Override
32
    public void uninstall() {
33
        if (viewSite == null) {
1✔
NEW
34
            return;
×
35
        }
36

37
        doUninstall(viewSite);
1✔
38

39
        viewSite = null;
1✔
40
        contextDsl.dispose();
1✔
41
    }
1✔
42

43
    protected void doUninstall(ViewSite viewSite) {
44
        ViewContent viewContent = viewSite.getViewContent();
1✔
45
        viewContent.setComponent(null);
1✔
46
    }
1✔
47

48
    protected ViewSite createSubViewSite(ViewContent viewContent) {
49
        Context viewContext = viewSite.getViewContext();
1✔
50
        return new DefaultViewSite(viewContent, viewContext);
1✔
51
    }
52
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc