Skip to content

Commit def2530

Browse files
committed
Imported eclipse project into repo from old GitLab
1 parent 793f54e commit def2530

File tree

154 files changed

+13914
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+13914
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src-gen"/>
4+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
5+
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
6+
<classpathentry kind="output" path="bin"/>
7+
</classpath>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>com.burlette.emf.countries.model.edit</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.pde.ManifestBuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
<buildCommand>
19+
<name>org.eclipse.pde.SchemaBuilder</name>
20+
<arguments>
21+
</arguments>
22+
</buildCommand>
23+
</buildSpec>
24+
<natures>
25+
<nature>org.eclipse.jdt.core.javanature</nature>
26+
<nature>org.eclipse.pde.PluginNature</nature>
27+
</natures>
28+
</projectDescription>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Manifest-Version: 1.0
2+
Bundle-ManifestVersion: 2
3+
Bundle-Name: %pluginName
4+
Bundle-SymbolicName: com.burlette.emf.countries.model.edit;singleton:=true
5+
Bundle-Version: 1.0.0.qualifier
6+
Bundle-ClassPath: .
7+
Bundle-Activator: com.burlette.emf.countries.model.countries.provider.CountriesEditPlugin$Implementation
8+
Bundle-Vendor: %providerName
9+
Bundle-Localization: plugin
10+
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
11+
Export-Package: com.burlette.emf.countries.model.countries.provider
12+
Require-Bundle: org.eclipse.core.runtime,
13+
com.burlette.emf.countries.model;visibility:=reexport,
14+
org.eclipse.emf.edit;visibility:=reexport
15+
Bundle-ActivationPolicy: lazy
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#
2+
3+
bin.includes = .,\
4+
icons/,\
5+
META-INF/,\
6+
plugin.xml,\
7+
plugin.properties
8+
jars.compile.order = .
9+
source.. = src-gen/
10+
output.. = bin/
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
#
2+
3+
pluginName = Countries Edit Support
4+
providerName = www.example.org
5+
6+
_UI_CreateChild_text = {0}
7+
_UI_CreateChild_text2 = {1} {0}
8+
_UI_CreateChild_text3 = {1}
9+
_UI_CreateChild_tooltip = Create New {0} Under {1} Feature
10+
_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}.
11+
_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
12+
13+
_UI_PropertyDescriptor_description = The {0} of the {1}
14+
15+
_UI_Country_type = Country
16+
_UI_State_type = State
17+
_UI_County_type = County
18+
_UI_City_type = City
19+
_UI_Governor_type = Governor
20+
_UI_President_type = President
21+
_UI_Commissioner_type = Commissioner
22+
_UI_Mayor_type = Mayor
23+
_UI_Politician_type = Politician
24+
_UI_Unknown_type = Object
25+
26+
_UI_Unknown_datatype= Value
27+
28+
_UI_Country_name_feature = Name
29+
_UI_Country_yearFounded_feature = Year Founded
30+
_UI_Country_isPartOfUN_feature = Is Part Of UN
31+
_UI_Country_state_feature = State
32+
_UI_Country_president_feature = President
33+
_UI_State_name_feature = Name
34+
_UI_State_population_feature = Population
35+
_UI_State_totalArea_feature = Total Area
36+
_UI_State_county_feature = County
37+
_UI_State_governor_feature = Governor
38+
_UI_County_name_feature = Name
39+
_UI_County_countyNumber_feature = County Number
40+
_UI_County_largestCity_feature = Largest City
41+
_UI_County_city_feature = City
42+
_UI_County_commissioner_feature = Commissioner
43+
_UI_City_name_feature = Name
44+
_UI_City_population_feature = Population
45+
_UI_City_isStateCapital_feature = Is State Capital
46+
_UI_City_mayor_feature = Mayor
47+
_UI_Governor_yearElected_feature = Year Elected
48+
_UI_Governor_endOfTermYear_feature = End Of Term Year
49+
_UI_Governor_yearsLivedInState_feature = Years Lived In State
50+
_UI_President_presidentNumber_feature = President Number
51+
_UI_President_eligibleForReelection_feature = Eligible For Reelection
52+
_UI_President_secretCodename_feature = Secret Codename
53+
_UI_Commissioner_yearElected_feature = Year Elected
54+
_UI_Commissioner_congressionalDistrict_feature = Congressional District
55+
_UI_Commissioner_isIncumbent_feature = Is Incumbent
56+
_UI_Mayor_address_feature = Address
57+
_UI_Mayor_timesElected_feature = Times Elected
58+
_UI_Mayor_ageElectedAsMayor_feature = Age Elected As Mayor
59+
_UI_Politician_name_feature = Name
60+
_UI_Politician_politicalParty_feature = Political Party
61+
_UI_Politician_totalYearsInService_feature = Total Years In Service
62+
_UI_Unknown_feature = Unspecified
63+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<?eclipse version="3.0"?>
3+
4+
<!--
5+
-->
6+
7+
<plugin>
8+
9+
<extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
10+
<!-- @generated countries -->
11+
<factory
12+
uri="http://www.example.org/countries"
13+
class="com.burlette.emf.countries.model.countries.provider.CountriesItemProviderAdapterFactory"
14+
supportedTypes=
15+
"org.eclipse.emf.edit.provider.IEditingDomainItemProvider
16+
org.eclipse.emf.edit.provider.IStructuredItemContentProvider
17+
org.eclipse.emf.edit.provider.ITreeItemContentProvider
18+
org.eclipse.emf.edit.provider.IItemLabelProvider
19+
org.eclipse.emf.edit.provider.IItemPropertySource"/>
20+
</extension>
21+
22+
</plugin>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
/**
2+
*/
3+
package com.burlette.emf.countries.model.countries.provider;
4+
5+
import com.burlette.emf.countries.model.countries.City;
6+
import com.burlette.emf.countries.model.countries.CountriesPackage;
7+
8+
import java.util.Collection;
9+
import java.util.List;
10+
11+
import org.eclipse.emf.common.notify.AdapterFactory;
12+
import org.eclipse.emf.common.notify.Notification;
13+
14+
import org.eclipse.emf.common.util.ResourceLocator;
15+
16+
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
17+
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
18+
import org.eclipse.emf.edit.provider.IItemLabelProvider;
19+
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
20+
import org.eclipse.emf.edit.provider.IItemPropertySource;
21+
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
22+
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
23+
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
24+
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
25+
import org.eclipse.emf.edit.provider.ViewerNotification;
26+
27+
/**
28+
* This is the item provider adapter for a {@link com.burlette.emf.countries.model.countries.City} object.
29+
* <!-- begin-user-doc -->
30+
* <!-- end-user-doc -->
31+
* @generated
32+
*/
33+
public class CityItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider,
34+
IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
35+
/**
36+
* This constructs an instance from a factory and a notifier.
37+
* <!-- begin-user-doc -->
38+
* <!-- end-user-doc -->
39+
* @generated
40+
*/
41+
public CityItemProvider(AdapterFactory adapterFactory) {
42+
super(adapterFactory);
43+
}
44+
45+
/**
46+
* This returns the property descriptors for the adapted class.
47+
* <!-- begin-user-doc -->
48+
* <!-- end-user-doc -->
49+
* @generated
50+
*/
51+
@Override
52+
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
53+
if (itemPropertyDescriptors == null) {
54+
super.getPropertyDescriptors(object);
55+
56+
addNamePropertyDescriptor(object);
57+
addPopulationPropertyDescriptor(object);
58+
addIsStateCapitalPropertyDescriptor(object);
59+
addMayorPropertyDescriptor(object);
60+
}
61+
return itemPropertyDescriptors;
62+
}
63+
64+
/**
65+
* This adds a property descriptor for the Name feature.
66+
* <!-- begin-user-doc -->
67+
* <!-- end-user-doc -->
68+
* @generated
69+
*/
70+
protected void addNamePropertyDescriptor(Object object) {
71+
itemPropertyDescriptors
72+
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
73+
getResourceLocator(), getString("_UI_City_name_feature"),
74+
getString("_UI_PropertyDescriptor_description", "_UI_City_name_feature", "_UI_City_type"),
75+
CountriesPackage.Literals.CITY__NAME, true, false, false,
76+
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
77+
}
78+
79+
/**
80+
* This adds a property descriptor for the Population feature.
81+
* <!-- begin-user-doc -->
82+
* <!-- end-user-doc -->
83+
* @generated
84+
*/
85+
protected void addPopulationPropertyDescriptor(Object object) {
86+
itemPropertyDescriptors
87+
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
88+
getResourceLocator(), getString("_UI_City_population_feature"),
89+
getString("_UI_PropertyDescriptor_description", "_UI_City_population_feature", "_UI_City_type"),
90+
CountriesPackage.Literals.CITY__POPULATION, true, false, false,
91+
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null));
92+
}
93+
94+
/**
95+
* This adds a property descriptor for the Is State Capital feature.
96+
* <!-- begin-user-doc -->
97+
* <!-- end-user-doc -->
98+
* @generated
99+
*/
100+
protected void addIsStateCapitalPropertyDescriptor(Object object) {
101+
itemPropertyDescriptors
102+
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
103+
getResourceLocator(), getString("_UI_City_isStateCapital_feature"),
104+
getString("_UI_PropertyDescriptor_description", "_UI_City_isStateCapital_feature",
105+
"_UI_City_type"),
106+
CountriesPackage.Literals.CITY__IS_STATE_CAPITAL, true, false, false,
107+
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null));
108+
}
109+
110+
/**
111+
* This adds a property descriptor for the Mayor feature.
112+
* <!-- begin-user-doc -->
113+
* <!-- end-user-doc -->
114+
* @generated
115+
*/
116+
protected void addMayorPropertyDescriptor(Object object) {
117+
itemPropertyDescriptors
118+
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
119+
getResourceLocator(), getString("_UI_City_mayor_feature"),
120+
getString("_UI_PropertyDescriptor_description", "_UI_City_mayor_feature", "_UI_City_type"),
121+
CountriesPackage.Literals.CITY__MAYOR, true, false, true, null, null, null));
122+
}
123+
124+
/**
125+
* This returns City.gif.
126+
* <!-- begin-user-doc -->
127+
* <!-- end-user-doc -->
128+
* @generated
129+
*/
130+
@Override
131+
public Object getImage(Object object) {
132+
return overlayImage(object, getResourceLocator().getImage("full/obj16/City"));
133+
}
134+
135+
/**
136+
* <!-- begin-user-doc -->
137+
* <!-- end-user-doc -->
138+
* @generated
139+
*/
140+
@Override
141+
protected boolean shouldComposeCreationImage() {
142+
return true;
143+
}
144+
145+
/**
146+
* This returns the label text for the adapted class.
147+
* <!-- begin-user-doc -->
148+
* <!-- end-user-doc -->
149+
* @generated
150+
*/
151+
@Override
152+
public String getText(Object object) {
153+
String label = ((City) object).getName();
154+
return label == null || label.length() == 0 ? getString("_UI_City_type")
155+
: getString("_UI_City_type") + " " + label;
156+
}
157+
158+
/**
159+
* This handles model notifications by calling {@link #updateChildren} to update any cached
160+
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
161+
* <!-- begin-user-doc -->
162+
* <!-- end-user-doc -->
163+
* @generated
164+
*/
165+
@Override
166+
public void notifyChanged(Notification notification) {
167+
updateChildren(notification);
168+
169+
switch (notification.getFeatureID(City.class)) {
170+
case CountriesPackage.CITY__NAME:
171+
case CountriesPackage.CITY__POPULATION:
172+
case CountriesPackage.CITY__IS_STATE_CAPITAL:
173+
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
174+
return;
175+
}
176+
super.notifyChanged(notification);
177+
}
178+
179+
/**
180+
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
181+
* that can be created under this object.
182+
* <!-- begin-user-doc -->
183+
* <!-- end-user-doc -->
184+
* @generated
185+
*/
186+
@Override
187+
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
188+
super.collectNewChildDescriptors(newChildDescriptors, object);
189+
}
190+
191+
/**
192+
* Return the resource locator for this item provider's resources.
193+
* <!-- begin-user-doc -->
194+
* <!-- end-user-doc -->
195+
* @generated
196+
*/
197+
@Override
198+
public ResourceLocator getResourceLocator() {
199+
return CountriesEditPlugin.INSTANCE;
200+
}
201+
202+
}

0 commit comments

Comments
 (0)