Skip to content

Commit

Permalink
Introducing a User Preferences through a Windows-Preferences page.
Browse files Browse the repository at this point in the history
Specifically, the current settings allow user to choose whether Domain
Specifications should show Vocabulary or Shape terms.
  • Loading branch information
jad-elkhoury committed Mar 28, 2022
1 parent ab9d7b0 commit 800fd42
Show file tree
Hide file tree
Showing 31 changed files with 325 additions and 1,088 deletions.
16 changes: 0 additions & 16 deletions org.eclipse.lyo.oslc4j.adaptormodel/model/adaptorInterface.ecore
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@
containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="configuration" eType="#//SpecificationConfiguration"
containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="userSettings" eType="#//UserSettings"
containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="DomainSpecification">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
Expand Down Expand Up @@ -424,18 +422,4 @@
<eStructuralFeatures xsi:type="ecore:EAttribute" name="update" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" defaultValueLiteral="false"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EEnum" name="UserSettingsViewPrefixes">
<eLiterals name="whenNecessary" literal="whenNecessary"/>
<eLiterals name="always" value="1" literal="always"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EEnum" name="UserSettingsViewLabelAs">
<eLiterals name="shape" literal="shape"/>
<eLiterals name="vocabulary" value="1" literal="vocabulary"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="UserSettings">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="viewPrefixes" eType="#//UserSettingsViewPrefixes"
defaultValueLiteral="whenNecessary"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="viewLabelAs" eType="#//UserSettingsViewLabelAs"
defaultValueLiteral="vocabulary"/>
</eClassifiers>
</ecore:EPackage>
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,6 @@
<genEnumLiterals ecoreEnumLiteral="adaptorInterface.ecore#//ShaclPropertyDataType/Float"/>
<genEnumLiterals ecoreEnumLiteral="adaptorInterface.ecore#//ShaclPropertyDataType/Integer"/>
</genEnums>
<genEnums typeSafeEnumCompatible="false" ecoreEnum="adaptorInterface.ecore#//UserSettingsViewPrefixes">
<genEnumLiterals ecoreEnumLiteral="adaptorInterface.ecore#//UserSettingsViewPrefixes/whenNecessary"/>
<genEnumLiterals ecoreEnumLiteral="adaptorInterface.ecore#//UserSettingsViewPrefixes/always"/>
</genEnums>
<genEnums typeSafeEnumCompatible="false" ecoreEnum="adaptorInterface.ecore#//UserSettingsViewLabelAs">
<genEnumLiterals ecoreEnumLiteral="adaptorInterface.ecore#//UserSettingsViewLabelAs/shape"/>
<genEnumLiterals ecoreEnumLiteral="adaptorInterface.ecore#//UserSettingsViewLabelAs/vocabulary"/>
</genEnums>
<genClasses ecoreClass="adaptorInterface.ecore#//AdaptorInterface">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute adaptorInterface.ecore#//AdaptorInterface/name"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference adaptorInterface.ecore#//AdaptorInterface/serviceProviderCatalog"/>
Expand Down Expand Up @@ -97,7 +89,6 @@
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference adaptorInterface.ecore#//Specification/domainPrefixes"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference adaptorInterface.ecore#//Specification/generationSetting"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference adaptorInterface.ecore#//Specification/configuration"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference adaptorInterface.ecore#//Specification/userSettings"/>
</genClasses>
<genClasses ecoreClass="adaptorInterface.ecore#//DomainSpecification">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute adaptorInterface.ecore#//DomainSpecification/name"/>
Expand Down Expand Up @@ -321,9 +312,5 @@
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute adaptorInterface.ecore#//WebServicePersistence/delete"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute adaptorInterface.ecore#//WebServicePersistence/update"/>
</genClasses>
<genClasses ecoreClass="adaptorInterface.ecore#//UserSettings">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute adaptorInterface.ecore#//UserSettings/viewPrefixes"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute adaptorInterface.ecore#//UserSettings/viewLabelAs"/>
</genClasses>
</genPackages>
</genmodel:GenModel>
Original file line number Diff line number Diff line change
Expand Up @@ -849,29 +849,6 @@ public Adapter createWebServicePersistenceAdapter() {
return webServicePersistenceItemProvider;
}

/**
* This keeps track of the one adapter used for all {@link adaptorinterface.UserSettings} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected UserSettingsItemProvider userSettingsItemProvider;

/**
* This creates an adapter for a {@link adaptorinterface.UserSettings}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Adapter createUserSettingsAdapter() {
if (userSettingsItemProvider == null) {
userSettingsItemProvider = new UserSettingsItemProvider(this);
}

return userSettingsItemProvider;
}

/**
* This returns the root adapter factory that contains this factory.
* <!-- begin-user-doc -->
Expand Down Expand Up @@ -1011,7 +988,6 @@ public void dispose() {
if (sourceBindingItemProvider != null) sourceBindingItemProvider.dispose();
if (oslcServicePersistenceItemProvider != null) oslcServicePersistenceItemProvider.dispose();
if (webServicePersistenceItemProvider != null) webServicePersistenceItemProvider.dispose();
if (userSettingsItemProvider != null) userSettingsItemProvider.dispose();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object objec
childrenFeatures.add(AdaptorinterfacePackage.Literals.SPECIFICATION__DOMAIN_PREFIXES);
childrenFeatures.add(AdaptorinterfacePackage.Literals.SPECIFICATION__GENERATION_SETTING);
childrenFeatures.add(AdaptorinterfacePackage.Literals.SPECIFICATION__CONFIGURATION);
childrenFeatures.add(AdaptorinterfacePackage.Literals.SPECIFICATION__USER_SETTINGS);
}
return childrenFeatures;
}
Expand Down Expand Up @@ -169,7 +168,6 @@ public void notifyChanged(Notification notification) {
case AdaptorinterfacePackage.SPECIFICATION__DOMAIN_PREFIXES:
case AdaptorinterfacePackage.SPECIFICATION__GENERATION_SETTING:
case AdaptorinterfacePackage.SPECIFICATION__CONFIGURATION:
case AdaptorinterfacePackage.SPECIFICATION__USER_SETTINGS:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
Expand Down Expand Up @@ -206,11 +204,6 @@ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors
(createChildParameter
(AdaptorinterfacePackage.Literals.SPECIFICATION__CONFIGURATION,
AdaptorinterfaceFactory.eINSTANCE.createMavenSpecificationConfiguration()));

newChildDescriptors.add
(createChildParameter
(AdaptorinterfacePackage.Literals.SPECIFICATION__USER_SETTINGS,
AdaptorinterfaceFactory.eINSTANCE.createUserSettings()));
}

/**
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -309,15 +309,6 @@ public interface AdaptorinterfaceFactory extends EFactory {
*/
WebServicePersistence createWebServicePersistence();

/**
* Returns a new object of class '<em>User Settings</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>User Settings</em>'.
* @generated
*/
UserSettings createUserSettings();

/**
* Returns a new object of class '<em>Web Service</em>'.
* <!-- begin-user-doc -->
Expand Down
Loading

0 comments on commit 800fd42

Please sign in to comment.