Stefan Egli created SLING-3660:
----------------------------------
Summary: Refine 'connected' state of a (vlt) repository, cache
node types after disconnection properly
Key: SLING-3660
URL: https://issues.apache.org/jira/browse/SLING-3660
Project: Sling
Issue Type: Improvement
Components: IDE
Reporter: Stefan Egli
Assignee: Stefan Egli
Fix For: Sling Eclipse IDE 1.0.0
Currently the ServerUtil.getDefaultRepository always returns a valid repository
with which you can do getNodeTypeRegistry() and that in turn connects to the
server and loads the node types. This seemed convenient.
But the problem is, it doesn't give the user any control when to connect to the
server and when not. And it will result in connection errors at places where
the user maybe didn't intend or know that a connection would be done.
Hence a new, simpler schema:
* when the server is stopped, no 'repository connection' is being established,
including for the node type registry
** hence, with a stopped server, the node type registry can be null - hence
some actions require adjustments for that situation
* when the server is started ('connected to'), the repository is connected and
the node type registry loaded
** at this stage the node type registry can be used for various actions,
including code completion, property type display
* when the server is stopped again, the node type registry is cached and still
provided to the various actions (without any server interaction going on though)
This should be more intuitive and make initial content-browsing in 'offline
mode' simpler
--
This message was sent by Atlassian JIRA
(v6.2#6252)