1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package pl.edu.agh.cast.data.model.resource;
19
20 import java.util.Arrays;
21 import java.util.List;
22
23 import pl.edu.agh.cast.Activator;
24 import pl.edu.agh.cast.data.model.domain.IDomainElement;
25 import pl.edu.agh.cast.data.model.presentation.IPresentationElement;
26 import pl.edu.agh.cast.resource.AbstractVisualResourcesProvider;
27 import pl.edu.agh.cast.resource.ImageVariants;
28 import pl.edu.agh.cast.resource.VisualResourceEntry;
29 import pl.edu.agh.cast.util.Messages;
30
31
32
33
34
35
36 public class DataModelVisualResourcesProvider extends AbstractVisualResourcesProvider {
37
38 private static final String RESOURCES_PATH_DATA_MODEL_ICON = "data/model/icon";
39
40
41
42
43 public static final String DEFAULT_GROUP_ID = "pl.edu.agh.cast.data.model.defaultgroup";
44
45
46
47
48 public static final String DEFAULT_RESOURCE_ID = "pl.edu.agh.cast.data.model.default";
49
50
51
52
53 public static final String RESOURCE_OPENED_FOLDER_ID = "pl.edu.agh.cast.data.model.folder.opened";
54
55
56
57
58 public static final String RESOURCE_DOMAIN_DATASET_DESCRIPTOR_ID = "pl.edu.agh.cast.data.model.domain.IDomainDataSet";
59
60
61
62
63 public static final String RESOURCE_PRESENTATION_DATASET_DESCRIPTOR_ID = "pl.edu.agh.cast.data.model.presentation.IPresentationDataSet";
64
65 private List<VisualResourceEntry> entries = Arrays
66 .asList(
67
68 new VisualResourceEntry(
69 DEFAULT_RESOURCE_ID,
70 Arrays.asList(Activator.RESOURCE_TAG_DATA_MODEL),
71 DEFAULT_GROUP_ID,
72 null,
73 Messages.DataModelVisualResourcesProvider_6,
74 Messages.DataModelVisualResourcesProvider_7, RESOURCES_PATH_DATA_MODEL_ICON, "default",
75 VisualResourceEntry.RESOURCE_EXTENSION_GIF, Arrays.asList(ImageVariants.VARIANT_OPENED)),
76 new VisualResourceEntry(RESOURCE_OPENED_FOLDER_ID,
77 Arrays.asList(Activator.RESOURCE_TAG_DATA_MODEL), DEFAULT_GROUP_ID, null,
78 Messages.DataModelVisualResourcesProvider_0, Messages.DataModelVisualResourcesProvider_1,
79 RESOURCES_PATH_DATA_MODEL_ICON, "folder",
80 VisualResourceEntry.RESOURCE_EXTENSION_GIF, Arrays.asList(ImageVariants.VARIANT_OPENED)),
81 new VisualResourceEntry(RESOURCE_DOMAIN_DATASET_DESCRIPTOR_ID, Arrays
82 .asList(Activator.RESOURCE_TAG_DATA_MODEL), DEFAULT_GROUP_ID, IDomainElement.TYPE,
83 Messages.DataModelVisualResourcesProvider_2, Messages.DataModelVisualResourcesProvider_3,
84 RESOURCES_PATH_DATA_MODEL_ICON, "domain_dataset",
85 VisualResourceEntry.RESOURCE_EXTENSION_GIF, null),
86 new VisualResourceEntry(RESOURCE_PRESENTATION_DATASET_DESCRIPTOR_ID, Arrays
87 .asList(Activator.RESOURCE_TAG_DATA_MODEL), DEFAULT_GROUP_ID, IPresentationElement.TYPE,
88 Messages.DataModelVisualResourcesProvider_4, Messages.DataModelVisualResourcesProvider_5,
89 RESOURCES_PATH_DATA_MODEL_ICON, "presentation_dataset",
90 VisualResourceEntry.RESOURCE_EXTENSION_GIF, null));
91
92
93
94
95 public DataModelVisualResourcesProvider() {
96 initialize(Activator.class, entries);
97 }
98
99 }