Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 0082b94eb91e3f4cd701d3188210641a20deb170 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
/*
 * Copyright (c) 2015 Eike Stepper (Berlin, Germany) and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *    Eike Stepper - initial API and implementation
 */
package org.eclipse.emf.cdo.doc.users;

import org.eclipse.emf.cdo.doc.users.Doc01_UserInterface.Doc_ProjectExplorerIntegration;
import org.eclipse.emf.cdo.doc.users.Doc04_CheckingOut.Doc_CheckoutType.Doc_HistoricalCheckouts;
import org.eclipse.emf.cdo.doc.users.Doc09_TechnicalBackground.Doc_BackgroundTransactions;
import org.eclipse.emf.cdo.eresource.CDOBinaryResource;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
import org.eclipse.emf.cdo.eresource.CDOResourceNode;
import org.eclipse.emf.cdo.eresource.CDOTextResource;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
import org.eclipse.emf.cdo.transfer.CDOTransfer;

/**
 * Working with Folders and Resources
 * <p>
 * The models of a checkout are organized in the virtual file system (aka resource tree) of a repository. This resource tree
 * consists of folders and different types of resources, all categorized as {@link CDOResourceNode resource nodes}.
 * <p>
 * All modifications of the resource tree that are triggered in the {@link Doc_ProjectExplorerIntegration Project Explorer}
 * are performed in a separate background {@link CDOTransaction transaction}, see {@link Doc_BackgroundTransactions} for details.
 * <p>
 * Modifying the resource tree is only possible in checkouts that are not read-only, i.e., not in {@link Doc_HistoricalCheckouts}.
 * <p>
 * <b>Table of Contents</b> {@toc}
 *
 * @author Eike Stepper
 */
public class Doc06_UsingResources
{
  /**
   * Creating Resource Nodes
   * <p>
   * New resource nodes can be created directly in the {@link Doc_ProjectExplorerIntegration Project Explorer} by opening the
   * context menu on a checkout or on an existing folder under a checkout and then opening the New sub menu: {@img new-menu.png}
   * <p>
   * The following sub sections describe how to create the different types of resource nodes and how to work with them.
   */
  public class Doc_CreatingResourceNodes
  {

    /**
     * Creating Folders
     * <p>
     * A {@link CDOResourceFolder folder} is a named container for a list of nested resource nodes.
     * Folders provide a means to organize and reorganize the models and files in a checkout according to any criteria that seems adequate
     * for their use cases.
     * <p>
     * A new folder can be created by opening the context menu on a checkout or on an existing folder under a checkout and then
     * selecting New -> Folder. The following dialog will pop up to ask for the name of the new folder:
     * {@img new-folder.png}
     * <p>
     * The name of the new folder is validated to be unique among all nested resource nodes under the container of the new folder.
     */
    public class Doc_CreatingFolders
    {
    }

    /**
     * Creating Model Resources
     * <p>
     * A {@link CDOResource model resource} is a named container for a list of nested model elements.
     * Model resources provide a means to organize and reorganize the model elements in a checkout according to any criteria that seems adequate
     * for their use cases.
     * <p>
     * A new model resource can be created by opening the context menu on a checkout or on an existing folder under a checkout and then
     * selecting New -> Model Resource. The following dialog will pop up to ask for the name of the new model resource:
     * {@img new-resource.png}
     * <p>
     * The name of the new model resource is validated to be unique among all nested resource nodes under the container of the new model resource.
     */
    public class Doc_CreatingModelResources
    {
    }

    /**
     * Creating Text Files
     * <p>
     * A {@link CDOTextResource text file} is a named container for a stream of text characters and the {@link CDOTextResource#getEncoding() encoding}
     * of these characters. Text files provide a means to efficiently store and retrieve unmodeled data.
     * <p>
     * A new text file can be created by opening the context menu on a checkout or on an existing folder under a checkout and then
     * selecting New -> Text File. The following dialog will pop up to ask for the name of the new text file:
     * {@img new-text.png}
     * <p>
     * The name of the new text file is validated to be unique among all nested resource nodes under the container of the new text file.
     */
    public class Doc_CreatingTextFiles
    {
    }

    /**
     * Creating Binary Files
     * <p>
     * A {@link CDOBinaryResource binary file} is a named container for a stream of bytes. Binary files provide a means to efficiently store
     * and retrieve unmodeled data.
     * <p>
     * A new binary file can be created by opening the context menu on a checkout or on an existing folder under a checkout and then
     * selecting New -> Binary File. The following dialog will pop up to ask for the name of the new binary file:
     * {@img new-binary.png}
     * <p>
     * The name of the new binary file is validated to be unique among all nested resource nodes under the container of the new binary file.
     */
    public class Doc_CreatingBinaryFiles
    {
    }
  }

  /**
   * Renaming Resource Nodes
   * <p>
   * A resource node can be renamed at any time by selecting the resource node and pressing the F2 key or opening the context menu and
   * selecting the Rename action. The following dialog will pop up: {@img resource-rename.png}
   * <p>
   * Renaming a resource node <b>does not break</b> cross references to the model elements that are contained
   * in the model resources in or under the renamed resource node.
   */
  public class Doc_RenamingResourceNodes
  {
  }

  /**
   * Moving and Copying Resource Nodes within a Checkout
   * <p>
   * Resource nodes can be moved within the resource tree of a checkout by using drag and drop.
   * <p>
   * When holding the Ctrl key while dropping the resource nodes onto a checkout or a resource folder copies of the dragged
   * resource nodes are created under the drop target.
   * <p>
   * Moving a resource node to a different folder <b>does not break</b> cross references to the model elements that are contained
   * in the model resources in or under the moved resource node.
   */
  public class Doc_MovingResourceNodes
  {
  }

  /**
   * Moving and Copying Resource Nodes between Checkouts and Beyond
   * <p>
   * Moving and copying resource nodes beyond the current checkout with the {@link CDOTransfer resource transfer framework}
   * is not yet supported for checkouts.
   */
  public class Doc_TransferingResourceNodes
  {
  }

  /**
   * Deleting Resource Nodes
   * <p>
   * Resource nodes can be deleted from the resource tree of a checkout by selecting the resource node and pressing
   * the Del key or opening the context menu and
   * selecting the Delete action. The following confirmation dialog will pop up: {@img object-delete.png}
   * <p>
   * This confirmation dialog only shows the directly selected resource nodes. Nested resource nodes or model elements
   * are not shown for performance reasons but will also be deleted if OK is pressed.
   * <p>
   * Deleting a resource node <b>can break</b> cross references to the model elements that are contained
   * in the model resources in or under the deleted resource node!
   */
  public class Doc_DeletingResourceNodes
  {
  }
}

Back to the top