Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
NeqModPlus
Energy Components Catalog
Commits
b2abc6df
Commit
b2abc6df
authored
4 years ago
by
Kai-Holger Brassel
Browse files
Options
Download
Email Patches
Plain Diff
First public version as of Verena Weilers Dissertation
parent
2c40014f
master
No related merge requests found
Changes
291
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/GeothermalHeatExchangerItemProvider.java
+133
-0
...ponents/provider/GeothermalHeatExchangerItemProvider.java
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/HeatExchangerItemProvider.java
+151
-0
.../energycomponents/provider/HeatExchangerItemProvider.java
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/HeatPumpItemProvider.java
+289
-0
...tgart/energycomponents/provider/HeatPumpItemProvider.java
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/HydrocarbonItemProvider.java
+108
-0
...rt/energycomponents/provider/HydrocarbonItemProvider.java
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/HydrogenCompressorItemProvider.java
+187
-0
...gycomponents/provider/HydrogenCompressorItemProvider.java
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/HydrogenItemProvider.java
+149
-0
...tgart/energycomponents/provider/HydrogenItemProvider.java
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/HydrogenStorageItemProvider.java
+169
-0
...nergycomponents/provider/HydrogenStorageItemProvider.java
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/InverterItemProvider.java
+106
-0
...tgart/energycomponents/provider/InverterItemProvider.java
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/LinearCharacteristicItemProvider.java
+165
-0
...components/provider/LinearCharacteristicItemProvider.java
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/LinearFunctionItemProvider.java
+192
-0
...energycomponents/provider/LinearFunctionItemProvider.java
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/ManufacturerItemProvider.java
+189
-0
...t/energycomponents/provider/ManufacturerItemProvider.java
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/MaterialItemProvider.java
+170
-0
...tgart/energycomponents/provider/MaterialItemProvider.java
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/MediumItemProvider.java
+223
-0
...uttgart/energycomponents/provider/MediumItemProvider.java
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/PhotovoltaicModuleItemProvider.java
+223
-0
...gycomponents/provider/PhotovoltaicModuleItemProvider.java
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/PolynomialCharacteristicItemProvider.java
+148
-0
...onents/provider/PolynomialCharacteristicItemProvider.java
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/PolynomialFunctionItemProvider.java
+218
-0
...gycomponents/provider/PolynomialFunctionItemProvider.java
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/PowerCharacteristicItemProvider.java
+148
-0
...ycomponents/provider/PowerCharacteristicItemProvider.java
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/PowerFunctionItemProvider.java
+198
-0
.../energycomponents/provider/PowerFunctionItemProvider.java
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/RegularFuelItemProvider.java
+106
-0
...rt/energycomponents/provider/RegularFuelItemProvider.java
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/SaltHydrateItemProvider.java
+108
-0
...rt/energycomponents/provider/SaltHydrateItemProvider.java
with
3380 additions
and
0 deletions
+3380
-0
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/GeothermalHeatExchangerItemProvider.java
0 → 100644
+
133
-
0
View file @
b2abc6df
/**
*/
package
de.hftstuttgart.energycomponents.provider
;
import
de.hftstuttgart.energycomponents.EnCompPackage
;
import
de.hftstuttgart.energycomponents.GeothermalHeatExchanger
;
import
java.util.Collection
;
import
java.util.List
;
import
org.eclipse.emf.common.notify.AdapterFactory
;
import
org.eclipse.emf.common.notify.Notification
;
import
org.eclipse.emf.edit.provider.ComposeableAdapterFactory
;
import
org.eclipse.emf.edit.provider.IItemPropertyDescriptor
;
import
org.eclipse.emf.edit.provider.ItemPropertyDescriptor
;
import
org.eclipse.emf.edit.provider.ViewerNotification
;
/**
* This is the item provider adapter for a {@link de.hftstuttgart.energycomponents.GeothermalHeatExchanger} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
class
GeothermalHeatExchangerItemProvider
extends
EnergyComponentItemProvider
{
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
GeothermalHeatExchangerItemProvider
(
AdapterFactory
adapterFactory
)
{
super
(
adapterFactory
);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
List
<
IItemPropertyDescriptor
>
getPropertyDescriptors
(
Object
object
)
{
if
(
itemPropertyDescriptors
==
null
)
{
super
.
getPropertyDescriptors
(
object
);
addPipeDiameterPropertyDescriptor
(
object
);
}
return
itemPropertyDescriptors
;
}
/**
* This adds a property descriptor for the Pipe Diameter feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addPipeDiameterPropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_GeothermalHeatExchanger_pipeDiameter_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_GeothermalHeatExchanger_pipeDiameter_feature"
,
"_UI_GeothermalHeatExchanger_type"
),
EnCompPackage
.
Literals
.
GEOTHERMAL_HEAT_EXCHANGER__PIPE_DIAMETER
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
GENERIC_VALUE_IMAGE
,
null
,
null
));
}
/**
* This returns GeothermalHeatExchanger.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
Object
getImage
(
Object
object
)
{
return
overlayImage
(
object
,
getResourceLocator
().
getImage
(
"full/obj16/GeothermalHeatExchanger"
));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
boolean
shouldComposeCreationImage
()
{
return
true
;
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
String
getText
(
Object
object
)
{
String
label
=
((
GeothermalHeatExchanger
)
object
).
getModelName
();
return
label
==
null
||
label
.
length
()
==
0
?
getString
(
"_UI_GeothermalHeatExchanger_type"
)
:
getString
(
"_UI_GeothermalHeatExchanger_type"
)
+
" "
+
label
;
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
void
notifyChanged
(
Notification
notification
)
{
updateChildren
(
notification
);
switch
(
notification
.
getFeatureID
(
GeothermalHeatExchanger
.
class
))
{
case
EnCompPackage
.
GEOTHERMAL_HEAT_EXCHANGER__PIPE_DIAMETER
:
fireNotifyChanged
(
new
ViewerNotification
(
notification
,
notification
.
getNotifier
(),
false
,
true
));
return
;
}
super
.
notifyChanged
(
notification
);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
void
collectNewChildDescriptors
(
Collection
<
Object
>
newChildDescriptors
,
Object
object
)
{
super
.
collectNewChildDescriptors
(
newChildDescriptors
,
object
);
}
}
This diff is collapsed.
Click to expand it.
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/HeatExchangerItemProvider.java
0 → 100644
+
151
-
0
View file @
b2abc6df
/**
*/
package
de.hftstuttgart.energycomponents.provider
;
import
de.hftstuttgart.energycomponents.EnCompPackage
;
import
de.hftstuttgart.energycomponents.HeatExchanger
;
import
java.util.Collection
;
import
java.util.List
;
import
org.eclipse.emf.common.notify.AdapterFactory
;
import
org.eclipse.emf.common.notify.Notification
;
import
org.eclipse.emf.edit.provider.ComposeableAdapterFactory
;
import
org.eclipse.emf.edit.provider.IItemPropertyDescriptor
;
import
org.eclipse.emf.edit.provider.ItemPropertyDescriptor
;
import
org.eclipse.emf.edit.provider.ViewerNotification
;
/**
* This is the item provider adapter for a {@link de.hftstuttgart.energycomponents.HeatExchanger} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
class
HeatExchangerItemProvider
extends
EnergyComponentItemProvider
{
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
HeatExchangerItemProvider
(
AdapterFactory
adapterFactory
)
{
super
(
adapterFactory
);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
List
<
IItemPropertyDescriptor
>
getPropertyDescriptors
(
Object
object
)
{
if
(
itemPropertyDescriptors
==
null
)
{
super
.
getPropertyDescriptors
(
object
);
addHeatRecoveryEfficiencyPropertyDescriptor
(
object
);
addNominalElectricityConsumptionPropertyDescriptor
(
object
);
}
return
itemPropertyDescriptors
;
}
/**
* This adds a property descriptor for the Heat Recovery Efficiency feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addHeatRecoveryEfficiencyPropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(
((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_HeatExchanger_heatRecoveryEfficiency_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_HeatExchanger_heatRecoveryEfficiency_feature"
,
"_UI_HeatExchanger_type"
),
EnCompPackage
.
Literals
.
HEAT_EXCHANGER__HEAT_RECOVERY_EFFICIENCY
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
REAL_VALUE_IMAGE
,
null
,
null
));
}
/**
* This adds a property descriptor for the Nominal Electricity Consumption feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addNominalElectricityConsumptionPropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_HeatExchanger_nominalElectricityConsumption_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_HeatExchanger_nominalElectricityConsumption_feature"
,
"_UI_HeatExchanger_type"
),
EnCompPackage
.
Literals
.
HEAT_EXCHANGER__NOMINAL_ELECTRICITY_CONSUMPTION
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
GENERIC_VALUE_IMAGE
,
null
,
null
));
}
/**
* This returns HeatExchanger.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
Object
getImage
(
Object
object
)
{
return
overlayImage
(
object
,
getResourceLocator
().
getImage
(
"full/obj16/HeatExchanger"
));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
boolean
shouldComposeCreationImage
()
{
return
true
;
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
String
getText
(
Object
object
)
{
String
label
=
((
HeatExchanger
)
object
).
getModelName
();
return
label
==
null
||
label
.
length
()
==
0
?
getString
(
"_UI_HeatExchanger_type"
)
:
getString
(
"_UI_HeatExchanger_type"
)
+
" "
+
label
;
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
void
notifyChanged
(
Notification
notification
)
{
updateChildren
(
notification
);
switch
(
notification
.
getFeatureID
(
HeatExchanger
.
class
))
{
case
EnCompPackage
.
HEAT_EXCHANGER__HEAT_RECOVERY_EFFICIENCY
:
case
EnCompPackage
.
HEAT_EXCHANGER__NOMINAL_ELECTRICITY_CONSUMPTION
:
fireNotifyChanged
(
new
ViewerNotification
(
notification
,
notification
.
getNotifier
(),
false
,
true
));
return
;
}
super
.
notifyChanged
(
notification
);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
void
collectNewChildDescriptors
(
Collection
<
Object
>
newChildDescriptors
,
Object
object
)
{
super
.
collectNewChildDescriptors
(
newChildDescriptors
,
object
);
}
}
This diff is collapsed.
Click to expand it.
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/HeatPumpItemProvider.java
0 → 100644
+
289
-
0
View file @
b2abc6df
/**
*/
package
de.hftstuttgart.energycomponents.provider
;
import
de.hftstuttgart.energycomponents.EnCompFactory
;
import
de.hftstuttgart.energycomponents.EnCompPackage
;
import
de.hftstuttgart.energycomponents.HeatPump
;
import
java.util.Collection
;
import
java.util.List
;
import
org.eclipse.emf.common.notify.AdapterFactory
;
import
org.eclipse.emf.common.notify.Notification
;
import
org.eclipse.emf.ecore.EStructuralFeature
;
import
org.eclipse.emf.edit.provider.ComposeableAdapterFactory
;
import
org.eclipse.emf.edit.provider.IItemPropertyDescriptor
;
import
org.eclipse.emf.edit.provider.ItemPropertyDescriptor
;
import
org.eclipse.emf.edit.provider.ViewerNotification
;
/**
* This is the item provider adapter for a {@link de.hftstuttgart.energycomponents.HeatPump} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
class
HeatPumpItemProvider
extends
ThermalEnergyDeviceItemProvider
{
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
HeatPumpItemProvider
(
AdapterFactory
adapterFactory
)
{
super
(
adapterFactory
);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
List
<
IItemPropertyDescriptor
>
getPropertyDescriptors
(
Object
object
)
{
if
(
itemPropertyDescriptors
==
null
)
{
super
.
getPropertyDescriptors
(
object
);
addHeatSourcePropertyDescriptor
(
object
);
addCoefficientOfPerformancePropertyDescriptor
(
object
);
addPowerInputPropertyDescriptor
(
object
);
addHeatOutputPropertyDescriptor
(
object
);
}
return
itemPropertyDescriptors
;
}
/**
* This adds a property descriptor for the Heat Source feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addHeatSourcePropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_HeatPump_heatSource_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_HeatPump_heatSource_feature"
,
"_UI_HeatPump_type"
),
EnCompPackage
.
Literals
.
HEAT_PUMP__HEAT_SOURCE
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
GENERIC_VALUE_IMAGE
,
null
,
null
));
}
/**
* This adds a property descriptor for the Coefficient Of Performance feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addCoefficientOfPerformancePropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_HeatPump_coefficientOfPerformance_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_HeatPump_coefficientOfPerformance_feature"
,
"_UI_HeatPump_type"
),
EnCompPackage
.
Literals
.
HEAT_PUMP__COEFFICIENT_OF_PERFORMANCE
,
true
,
false
,
false
,
null
,
null
,
null
));
}
/**
* This adds a property descriptor for the Power Input feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addPowerInputPropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_HeatPump_powerInput_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_HeatPump_powerInput_feature"
,
"_UI_HeatPump_type"
),
EnCompPackage
.
Literals
.
HEAT_PUMP__POWER_INPUT
,
true
,
false
,
false
,
null
,
null
,
null
));
}
/**
* This adds a property descriptor for the Heat Output feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addHeatOutputPropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_HeatPump_heatOutput_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_HeatPump_heatOutput_feature"
,
"_UI_HeatPump_type"
),
EnCompPackage
.
Literals
.
HEAT_PUMP__HEAT_OUTPUT
,
true
,
false
,
false
,
null
,
null
,
null
));
}
/**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
Collection
<?
extends
EStructuralFeature
>
getChildrenFeatures
(
Object
object
)
{
if
(
childrenFeatures
==
null
)
{
super
.
getChildrenFeatures
(
object
);
childrenFeatures
.
add
(
EnCompPackage
.
Literals
.
HEAT_PUMP__COEFFICIENT_OF_PERFORMANCE
);
childrenFeatures
.
add
(
EnCompPackage
.
Literals
.
HEAT_PUMP__POWER_INPUT
);
childrenFeatures
.
add
(
EnCompPackage
.
Literals
.
HEAT_PUMP__HEAT_OUTPUT
);
}
return
childrenFeatures
;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
EStructuralFeature
getChildFeature
(
Object
object
,
Object
child
)
{
// Check the type of the specified child object and return the proper feature to use for
// adding (see {@link AddCommand}) it as a child.
return
super
.
getChildFeature
(
object
,
child
);
}
/**
* This returns HeatPump.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
Object
getImage
(
Object
object
)
{
return
overlayImage
(
object
,
getResourceLocator
().
getImage
(
"full/obj16/HeatPump"
));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
boolean
shouldComposeCreationImage
()
{
return
true
;
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
String
getText
(
Object
object
)
{
String
label
=
((
HeatPump
)
object
).
getModelName
();
return
label
==
null
||
label
.
length
()
==
0
?
getString
(
"_UI_HeatPump_type"
)
:
getString
(
"_UI_HeatPump_type"
)
+
" "
+
label
;
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
void
notifyChanged
(
Notification
notification
)
{
updateChildren
(
notification
);
switch
(
notification
.
getFeatureID
(
HeatPump
.
class
))
{
case
EnCompPackage
.
HEAT_PUMP__HEAT_SOURCE
:
fireNotifyChanged
(
new
ViewerNotification
(
notification
,
notification
.
getNotifier
(),
false
,
true
));
return
;
case
EnCompPackage
.
HEAT_PUMP__COEFFICIENT_OF_PERFORMANCE
:
case
EnCompPackage
.
HEAT_PUMP__POWER_INPUT
:
case
EnCompPackage
.
HEAT_PUMP__HEAT_OUTPUT
:
fireNotifyChanged
(
new
ViewerNotification
(
notification
,
notification
.
getNotifier
(),
true
,
false
));
return
;
}
super
.
notifyChanged
(
notification
);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
void
collectNewChildDescriptors
(
Collection
<
Object
>
newChildDescriptors
,
Object
object
)
{
super
.
collectNewChildDescriptors
(
newChildDescriptors
,
object
);
newChildDescriptors
.
add
(
createChildParameter
(
EnCompPackage
.
Literals
.
HEAT_PUMP__COEFFICIENT_OF_PERFORMANCE
,
EnCompFactory
.
eINSTANCE
.
createTableCharacteristic
()));
newChildDescriptors
.
add
(
createChildParameter
(
EnCompPackage
.
Literals
.
HEAT_PUMP__COEFFICIENT_OF_PERFORMANCE
,
EnCompFactory
.
eINSTANCE
.
createLinearCharacteristic
()));
newChildDescriptors
.
add
(
createChildParameter
(
EnCompPackage
.
Literals
.
HEAT_PUMP__COEFFICIENT_OF_PERFORMANCE
,
EnCompFactory
.
eINSTANCE
.
createExponentionalCharacteristic
()));
newChildDescriptors
.
add
(
createChildParameter
(
EnCompPackage
.
Literals
.
HEAT_PUMP__COEFFICIENT_OF_PERFORMANCE
,
EnCompFactory
.
eINSTANCE
.
createPolynomialCharacteristic
()));
newChildDescriptors
.
add
(
createChildParameter
(
EnCompPackage
.
Literals
.
HEAT_PUMP__COEFFICIENT_OF_PERFORMANCE
,
EnCompFactory
.
eINSTANCE
.
createPowerCharacteristic
()));
newChildDescriptors
.
add
(
createChildParameter
(
EnCompPackage
.
Literals
.
HEAT_PUMP__POWER_INPUT
,
EnCompFactory
.
eINSTANCE
.
createTableCharacteristic
()));
newChildDescriptors
.
add
(
createChildParameter
(
EnCompPackage
.
Literals
.
HEAT_PUMP__POWER_INPUT
,
EnCompFactory
.
eINSTANCE
.
createLinearCharacteristic
()));
newChildDescriptors
.
add
(
createChildParameter
(
EnCompPackage
.
Literals
.
HEAT_PUMP__POWER_INPUT
,
EnCompFactory
.
eINSTANCE
.
createExponentionalCharacteristic
()));
newChildDescriptors
.
add
(
createChildParameter
(
EnCompPackage
.
Literals
.
HEAT_PUMP__POWER_INPUT
,
EnCompFactory
.
eINSTANCE
.
createPolynomialCharacteristic
()));
newChildDescriptors
.
add
(
createChildParameter
(
EnCompPackage
.
Literals
.
HEAT_PUMP__POWER_INPUT
,
EnCompFactory
.
eINSTANCE
.
createPowerCharacteristic
()));
newChildDescriptors
.
add
(
createChildParameter
(
EnCompPackage
.
Literals
.
HEAT_PUMP__HEAT_OUTPUT
,
EnCompFactory
.
eINSTANCE
.
createTableCharacteristic
()));
newChildDescriptors
.
add
(
createChildParameter
(
EnCompPackage
.
Literals
.
HEAT_PUMP__HEAT_OUTPUT
,
EnCompFactory
.
eINSTANCE
.
createLinearCharacteristic
()));
newChildDescriptors
.
add
(
createChildParameter
(
EnCompPackage
.
Literals
.
HEAT_PUMP__HEAT_OUTPUT
,
EnCompFactory
.
eINSTANCE
.
createExponentionalCharacteristic
()));
newChildDescriptors
.
add
(
createChildParameter
(
EnCompPackage
.
Literals
.
HEAT_PUMP__HEAT_OUTPUT
,
EnCompFactory
.
eINSTANCE
.
createPolynomialCharacteristic
()));
newChildDescriptors
.
add
(
createChildParameter
(
EnCompPackage
.
Literals
.
HEAT_PUMP__HEAT_OUTPUT
,
EnCompFactory
.
eINSTANCE
.
createPowerCharacteristic
()));
}
/**
* This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
String
getCreateChildText
(
Object
owner
,
Object
feature
,
Object
child
,
Collection
<?>
selection
)
{
Object
childFeature
=
feature
;
Object
childObject
=
child
;
boolean
qualify
=
childFeature
==
EnCompPackage
.
Literals
.
HEAT_PUMP__COEFFICIENT_OF_PERFORMANCE
||
childFeature
==
EnCompPackage
.
Literals
.
HEAT_PUMP__POWER_INPUT
||
childFeature
==
EnCompPackage
.
Literals
.
HEAT_PUMP__HEAT_OUTPUT
;
if
(
qualify
)
{
return
getString
(
"_UI_CreateChild_text2"
,
new
Object
[]
{
getTypeText
(
childObject
),
getFeatureText
(
childFeature
),
getTypeText
(
owner
)
});
}
return
super
.
getCreateChildText
(
owner
,
feature
,
child
,
selection
);
}
}
This diff is collapsed.
Click to expand it.
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/HydrocarbonItemProvider.java
0 → 100644
+
108
-
0
View file @
b2abc6df
/**
*/
package
de.hftstuttgart.energycomponents.provider
;
import
de.hftstuttgart.energycomponents.Hydrocarbon
;
import
de.hftstuttgart.units.NullableQuantity
;
import
java.util.Collection
;
import
java.util.List
;
import
org.eclipse.emf.common.notify.AdapterFactory
;
import
org.eclipse.emf.common.notify.Notification
;
import
org.eclipse.emf.edit.provider.IItemPropertyDescriptor
;
/**
* This is the item provider adapter for a {@link de.hftstuttgart.energycomponents.Hydrocarbon} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
class
HydrocarbonItemProvider
extends
MediumItemProvider
{
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
HydrocarbonItemProvider
(
AdapterFactory
adapterFactory
)
{
super
(
adapterFactory
);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
List
<
IItemPropertyDescriptor
>
getPropertyDescriptors
(
Object
object
)
{
if
(
itemPropertyDescriptors
==
null
)
{
super
.
getPropertyDescriptors
(
object
);
}
return
itemPropertyDescriptors
;
}
/**
* This returns Hydrocarbon.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
Object
getImage
(
Object
object
)
{
return
overlayImage
(
object
,
getResourceLocator
().
getImage
(
"full/obj16/Hydrocarbon"
));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
boolean
shouldComposeCreationImage
()
{
return
true
;
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
String
getText
(
Object
object
)
{
NullableQuantity
labelValue
=
((
Hydrocarbon
)
object
).
getDensity
();
String
label
=
labelValue
==
null
?
null
:
labelValue
.
toString
();
return
label
==
null
||
label
.
length
()
==
0
?
getString
(
"_UI_Hydrocarbon_type"
)
:
getString
(
"_UI_Hydrocarbon_type"
)
+
" "
+
label
;
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
void
notifyChanged
(
Notification
notification
)
{
updateChildren
(
notification
);
super
.
notifyChanged
(
notification
);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
void
collectNewChildDescriptors
(
Collection
<
Object
>
newChildDescriptors
,
Object
object
)
{
super
.
collectNewChildDescriptors
(
newChildDescriptors
,
object
);
}
}
This diff is collapsed.
Click to expand it.
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/HydrogenCompressorItemProvider.java
0 → 100644
+
187
-
0
View file @
b2abc6df
/**
*/
package
de.hftstuttgart.energycomponents.provider
;
import
de.hftstuttgart.energycomponents.EnCompPackage
;
import
de.hftstuttgart.energycomponents.HydrogenCompressor
;
import
java.util.Collection
;
import
java.util.List
;
import
org.eclipse.emf.common.notify.AdapterFactory
;
import
org.eclipse.emf.common.notify.Notification
;
import
org.eclipse.emf.edit.provider.ComposeableAdapterFactory
;
import
org.eclipse.emf.edit.provider.IItemPropertyDescriptor
;
import
org.eclipse.emf.edit.provider.ItemPropertyDescriptor
;
import
org.eclipse.emf.edit.provider.ViewerNotification
;
/**
* This is the item provider adapter for a {@link de.hftstuttgart.energycomponents.HydrogenCompressor} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
class
HydrogenCompressorItemProvider
extends
EnergyComponentItemProvider
{
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
HydrogenCompressorItemProvider
(
AdapterFactory
adapterFactory
)
{
super
(
adapterFactory
);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
List
<
IItemPropertyDescriptor
>
getPropertyDescriptors
(
Object
object
)
{
if
(
itemPropertyDescriptors
==
null
)
{
super
.
getPropertyDescriptors
(
object
);
addEfficiencyPropertyDescriptor
(
object
);
addThermodynamicModePropertyDescriptor
(
object
);
addMaxPressurePropertyDescriptor
(
object
);
addMaxDeliveryRatePropertyDescriptor
(
object
);
}
return
itemPropertyDescriptors
;
}
/**
* This adds a property descriptor for the Efficiency feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addEfficiencyPropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_HydrogenCompressor_efficiency_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_HydrogenCompressor_efficiency_feature"
,
"_UI_HydrogenCompressor_type"
),
EnCompPackage
.
Literals
.
HYDROGEN_COMPRESSOR__EFFICIENCY
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
REAL_VALUE_IMAGE
,
null
,
null
));
}
/**
* This adds a property descriptor for the Thermodynamic Mode feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addThermodynamicModePropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(
((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_HydrogenCompressor_thermodynamicMode_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_HydrogenCompressor_thermodynamicMode_feature"
,
"_UI_HydrogenCompressor_type"
),
EnCompPackage
.
Literals
.
HYDROGEN_COMPRESSOR__THERMODYNAMIC_MODE
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
INTEGRAL_VALUE_IMAGE
,
null
,
null
));
}
/**
* This adds a property descriptor for the Max Pressure feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addMaxPressurePropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(
((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_HydrogenCompressor_maxPressure_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_HydrogenCompressor_maxPressure_feature"
,
"_UI_HydrogenCompressor_type"
),
EnCompPackage
.
Literals
.
HYDROGEN_COMPRESSOR__MAX_PRESSURE
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
GENERIC_VALUE_IMAGE
,
null
,
null
));
}
/**
* This adds a property descriptor for the Max Delivery Rate feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addMaxDeliveryRatePropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(
((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_HydrogenCompressor_maxDeliveryRate_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_HydrogenCompressor_maxDeliveryRate_feature"
,
"_UI_HydrogenCompressor_type"
),
EnCompPackage
.
Literals
.
HYDROGEN_COMPRESSOR__MAX_DELIVERY_RATE
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
GENERIC_VALUE_IMAGE
,
null
,
null
));
}
/**
* This returns HydrogenCompressor.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
Object
getImage
(
Object
object
)
{
return
overlayImage
(
object
,
getResourceLocator
().
getImage
(
"full/obj16/HydrogenCompressor"
));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
boolean
shouldComposeCreationImage
()
{
return
true
;
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
String
getText
(
Object
object
)
{
String
label
=
((
HydrogenCompressor
)
object
).
getModelName
();
return
label
==
null
||
label
.
length
()
==
0
?
getString
(
"_UI_HydrogenCompressor_type"
)
:
getString
(
"_UI_HydrogenCompressor_type"
)
+
" "
+
label
;
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
void
notifyChanged
(
Notification
notification
)
{
updateChildren
(
notification
);
switch
(
notification
.
getFeatureID
(
HydrogenCompressor
.
class
))
{
case
EnCompPackage
.
HYDROGEN_COMPRESSOR__EFFICIENCY
:
case
EnCompPackage
.
HYDROGEN_COMPRESSOR__THERMODYNAMIC_MODE
:
case
EnCompPackage
.
HYDROGEN_COMPRESSOR__MAX_PRESSURE
:
case
EnCompPackage
.
HYDROGEN_COMPRESSOR__MAX_DELIVERY_RATE
:
fireNotifyChanged
(
new
ViewerNotification
(
notification
,
notification
.
getNotifier
(),
false
,
true
));
return
;
}
super
.
notifyChanged
(
notification
);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
void
collectNewChildDescriptors
(
Collection
<
Object
>
newChildDescriptors
,
Object
object
)
{
super
.
collectNewChildDescriptors
(
newChildDescriptors
,
object
);
}
}
This diff is collapsed.
Click to expand it.
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/HydrogenItemProvider.java
0 → 100644
+
149
-
0
View file @
b2abc6df
/**
*/
package
de.hftstuttgart.energycomponents.provider
;
import
de.hftstuttgart.energycomponents.EnCompPackage
;
import
de.hftstuttgart.energycomponents.Hydrogen
;
import
java.util.Collection
;
import
java.util.List
;
import
org.eclipse.emf.common.notify.AdapterFactory
;
import
org.eclipse.emf.common.notify.Notification
;
import
org.eclipse.emf.edit.provider.ComposeableAdapterFactory
;
import
org.eclipse.emf.edit.provider.IItemPropertyDescriptor
;
import
org.eclipse.emf.edit.provider.ItemPropertyDescriptor
;
import
org.eclipse.emf.edit.provider.ViewerNotification
;
/**
* This is the item provider adapter for a {@link de.hftstuttgart.energycomponents.Hydrogen} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
class
HydrogenItemProvider
extends
FuelItemProvider
{
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
HydrogenItemProvider
(
AdapterFactory
adapterFactory
)
{
super
(
adapterFactory
);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
List
<
IItemPropertyDescriptor
>
getPropertyDescriptors
(
Object
object
)
{
if
(
itemPropertyDescriptors
==
null
)
{
super
.
getPropertyDescriptors
(
object
);
addChemicalPurityPropertyDescriptor
(
object
);
addHydrogenForHydrogenStoragePropertyDescriptor
(
object
);
}
return
itemPropertyDescriptors
;
}
/**
* This adds a property descriptor for the Chemical Purity feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addChemicalPurityPropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_Hydrogen_chemicalPurity_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_Hydrogen_chemicalPurity_feature"
,
"_UI_Hydrogen_type"
),
EnCompPackage
.
Literals
.
HYDROGEN__CHEMICAL_PURITY
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
REAL_VALUE_IMAGE
,
null
,
null
));
}
/**
* This adds a property descriptor for the Hydrogen For Hydrogen Storage feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addHydrogenForHydrogenStoragePropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(
((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_Hydrogen_hydrogenForHydrogenStorage_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_Hydrogen_hydrogenForHydrogenStorage_feature"
,
"_UI_Hydrogen_type"
),
EnCompPackage
.
Literals
.
HYDROGEN__HYDROGEN_FOR_HYDROGEN_STORAGE
,
true
,
false
,
true
,
null
,
null
,
null
));
}
/**
* This returns Hydrogen.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
Object
getImage
(
Object
object
)
{
return
overlayImage
(
object
,
getResourceLocator
().
getImage
(
"full/obj16/Hydrogen"
));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
boolean
shouldComposeCreationImage
()
{
return
true
;
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
String
getText
(
Object
object
)
{
String
label
=
((
Hydrogen
)
object
).
getName
();
return
label
==
null
||
label
.
length
()
==
0
?
getString
(
"_UI_Hydrogen_type"
)
:
getString
(
"_UI_Hydrogen_type"
)
+
" "
+
label
;
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
void
notifyChanged
(
Notification
notification
)
{
updateChildren
(
notification
);
switch
(
notification
.
getFeatureID
(
Hydrogen
.
class
))
{
case
EnCompPackage
.
HYDROGEN__CHEMICAL_PURITY
:
fireNotifyChanged
(
new
ViewerNotification
(
notification
,
notification
.
getNotifier
(),
false
,
true
));
return
;
}
super
.
notifyChanged
(
notification
);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
void
collectNewChildDescriptors
(
Collection
<
Object
>
newChildDescriptors
,
Object
object
)
{
super
.
collectNewChildDescriptors
(
newChildDescriptors
,
object
);
}
}
This diff is collapsed.
Click to expand it.
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/HydrogenStorageItemProvider.java
0 → 100644
+
169
-
0
View file @
b2abc6df
/**
*/
package
de.hftstuttgart.energycomponents.provider
;
import
de.hftstuttgart.energycomponents.EnCompPackage
;
import
de.hftstuttgart.energycomponents.HydrogenStorage
;
import
java.util.Collection
;
import
java.util.List
;
import
org.eclipse.emf.common.notify.AdapterFactory
;
import
org.eclipse.emf.common.notify.Notification
;
import
org.eclipse.emf.edit.provider.ComposeableAdapterFactory
;
import
org.eclipse.emf.edit.provider.IItemPropertyDescriptor
;
import
org.eclipse.emf.edit.provider.ItemPropertyDescriptor
;
import
org.eclipse.emf.edit.provider.ViewerNotification
;
/**
* This is the item provider adapter for a {@link de.hftstuttgart.energycomponents.HydrogenStorage} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
class
HydrogenStorageItemProvider
extends
EnergyComponentItemProvider
{
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
HydrogenStorageItemProvider
(
AdapterFactory
adapterFactory
)
{
super
(
adapterFactory
);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
List
<
IItemPropertyDescriptor
>
getPropertyDescriptors
(
Object
object
)
{
if
(
itemPropertyDescriptors
==
null
)
{
super
.
getPropertyDescriptors
(
object
);
addNumberOfCylindersPropertyDescriptor
(
object
);
addCylinderVolumePropertyDescriptor
(
object
);
addNominalPressurePropertyDescriptor
(
object
);
}
return
itemPropertyDescriptors
;
}
/**
* This adds a property descriptor for the Number Of Cylinders feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addNumberOfCylindersPropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(
((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_HydrogenStorage_numberOfCylinders_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_HydrogenStorage_numberOfCylinders_feature"
,
"_UI_HydrogenStorage_type"
),
EnCompPackage
.
Literals
.
HYDROGEN_STORAGE__NUMBER_OF_CYLINDERS
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
INTEGRAL_VALUE_IMAGE
,
null
,
null
));
}
/**
* This adds a property descriptor for the Cylinder Volume feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addCylinderVolumePropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_HydrogenStorage_cylinderVolume_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_HydrogenStorage_cylinderVolume_feature"
,
"_UI_HydrogenStorage_type"
),
EnCompPackage
.
Literals
.
HYDROGEN_STORAGE__CYLINDER_VOLUME
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
GENERIC_VALUE_IMAGE
,
null
,
null
));
}
/**
* This adds a property descriptor for the Nominal Pressure feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addNominalPressurePropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_HydrogenStorage_nominalPressure_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_HydrogenStorage_nominalPressure_feature"
,
"_UI_HydrogenStorage_type"
),
EnCompPackage
.
Literals
.
HYDROGEN_STORAGE__NOMINAL_PRESSURE
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
GENERIC_VALUE_IMAGE
,
null
,
null
));
}
/**
* This returns HydrogenStorage.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
Object
getImage
(
Object
object
)
{
return
overlayImage
(
object
,
getResourceLocator
().
getImage
(
"full/obj16/HydrogenStorage"
));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
boolean
shouldComposeCreationImage
()
{
return
true
;
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
String
getText
(
Object
object
)
{
String
label
=
((
HydrogenStorage
)
object
).
getModelName
();
return
label
==
null
||
label
.
length
()
==
0
?
getString
(
"_UI_HydrogenStorage_type"
)
:
getString
(
"_UI_HydrogenStorage_type"
)
+
" "
+
label
;
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
void
notifyChanged
(
Notification
notification
)
{
updateChildren
(
notification
);
switch
(
notification
.
getFeatureID
(
HydrogenStorage
.
class
))
{
case
EnCompPackage
.
HYDROGEN_STORAGE__NUMBER_OF_CYLINDERS
:
case
EnCompPackage
.
HYDROGEN_STORAGE__CYLINDER_VOLUME
:
case
EnCompPackage
.
HYDROGEN_STORAGE__NOMINAL_PRESSURE
:
fireNotifyChanged
(
new
ViewerNotification
(
notification
,
notification
.
getNotifier
(),
false
,
true
));
return
;
}
super
.
notifyChanged
(
notification
);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
void
collectNewChildDescriptors
(
Collection
<
Object
>
newChildDescriptors
,
Object
object
)
{
super
.
collectNewChildDescriptors
(
newChildDescriptors
,
object
);
}
}
This diff is collapsed.
Click to expand it.
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/InverterItemProvider.java
0 → 100644
+
106
-
0
View file @
b2abc6df
/**
*/
package
de.hftstuttgart.energycomponents.provider
;
import
de.hftstuttgart.energycomponents.Inverter
;
import
java.util.Collection
;
import
java.util.List
;
import
org.eclipse.emf.common.notify.AdapterFactory
;
import
org.eclipse.emf.common.notify.Notification
;
import
org.eclipse.emf.edit.provider.IItemPropertyDescriptor
;
/**
* This is the item provider adapter for a {@link de.hftstuttgart.energycomponents.Inverter} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
class
InverterItemProvider
extends
EnergyComponentItemProvider
{
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
InverterItemProvider
(
AdapterFactory
adapterFactory
)
{
super
(
adapterFactory
);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
List
<
IItemPropertyDescriptor
>
getPropertyDescriptors
(
Object
object
)
{
if
(
itemPropertyDescriptors
==
null
)
{
super
.
getPropertyDescriptors
(
object
);
}
return
itemPropertyDescriptors
;
}
/**
* This returns Inverter.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
Object
getImage
(
Object
object
)
{
return
overlayImage
(
object
,
getResourceLocator
().
getImage
(
"full/obj16/Inverter"
));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
boolean
shouldComposeCreationImage
()
{
return
true
;
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
String
getText
(
Object
object
)
{
String
label
=
((
Inverter
)
object
).
getModelName
();
return
label
==
null
||
label
.
length
()
==
0
?
getString
(
"_UI_Inverter_type"
)
:
getString
(
"_UI_Inverter_type"
)
+
" "
+
label
;
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
void
notifyChanged
(
Notification
notification
)
{
updateChildren
(
notification
);
super
.
notifyChanged
(
notification
);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
void
collectNewChildDescriptors
(
Collection
<
Object
>
newChildDescriptors
,
Object
object
)
{
super
.
collectNewChildDescriptors
(
newChildDescriptors
,
object
);
}
}
This diff is collapsed.
Click to expand it.
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/LinearCharacteristicItemProvider.java
0 → 100644
+
165
-
0
View file @
b2abc6df
/**
*/
package
de.hftstuttgart.energycomponents.provider
;
import
de.hftstuttgart.energycomponents.EnCompFactory
;
import
de.hftstuttgart.energycomponents.EnCompPackage
;
import
de.hftstuttgart.energycomponents.LinearCharacteristic
;
import
java.util.Collection
;
import
java.util.List
;
import
org.eclipse.emf.common.notify.AdapterFactory
;
import
org.eclipse.emf.common.notify.Notification
;
import
org.eclipse.emf.ecore.EStructuralFeature
;
import
org.eclipse.emf.edit.provider.ComposeableAdapterFactory
;
import
org.eclipse.emf.edit.provider.IItemPropertyDescriptor
;
import
org.eclipse.emf.edit.provider.ViewerNotification
;
/**
* This is the item provider adapter for a {@link de.hftstuttgart.energycomponents.LinearCharacteristic} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
class
LinearCharacteristicItemProvider
extends
CharacteristicItemProvider
{
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
LinearCharacteristicItemProvider
(
AdapterFactory
adapterFactory
)
{
super
(
adapterFactory
);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
List
<
IItemPropertyDescriptor
>
getPropertyDescriptors
(
Object
object
)
{
if
(
itemPropertyDescriptors
==
null
)
{
super
.
getPropertyDescriptors
(
object
);
addFunctionsPropertyDescriptor
(
object
);
}
return
itemPropertyDescriptors
;
}
/**
* This adds a property descriptor for the Functions feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addFunctionsPropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_LinearCharacteristic_functions_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_LinearCharacteristic_functions_feature"
,
"_UI_LinearCharacteristic_type"
),
EnCompPackage
.
Literals
.
LINEAR_CHARACTERISTIC__FUNCTIONS
,
true
,
false
,
false
,
null
,
null
,
null
));
}
/**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
Collection
<?
extends
EStructuralFeature
>
getChildrenFeatures
(
Object
object
)
{
if
(
childrenFeatures
==
null
)
{
super
.
getChildrenFeatures
(
object
);
childrenFeatures
.
add
(
EnCompPackage
.
Literals
.
LINEAR_CHARACTERISTIC__FUNCTIONS
);
}
return
childrenFeatures
;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
EStructuralFeature
getChildFeature
(
Object
object
,
Object
child
)
{
// Check the type of the specified child object and return the proper feature to use for
// adding (see {@link AddCommand}) it as a child.
return
super
.
getChildFeature
(
object
,
child
);
}
/**
* This returns LinearCharacteristic.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
Object
getImage
(
Object
object
)
{
return
overlayImage
(
object
,
getResourceLocator
().
getImage
(
"full/obj16/LinearCharacteristic"
));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
boolean
shouldComposeCreationImage
()
{
return
true
;
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
String
getText
(
Object
object
)
{
return
getString
(
"_UI_LinearCharacteristic_type"
);
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
void
notifyChanged
(
Notification
notification
)
{
updateChildren
(
notification
);
switch
(
notification
.
getFeatureID
(
LinearCharacteristic
.
class
))
{
case
EnCompPackage
.
LINEAR_CHARACTERISTIC__FUNCTIONS
:
fireNotifyChanged
(
new
ViewerNotification
(
notification
,
notification
.
getNotifier
(),
true
,
false
));
return
;
}
super
.
notifyChanged
(
notification
);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
void
collectNewChildDescriptors
(
Collection
<
Object
>
newChildDescriptors
,
Object
object
)
{
super
.
collectNewChildDescriptors
(
newChildDescriptors
,
object
);
newChildDescriptors
.
add
(
createChildParameter
(
EnCompPackage
.
Literals
.
LINEAR_CHARACTERISTIC__FUNCTIONS
,
EnCompFactory
.
eINSTANCE
.
createLinearFunction
()));
}
}
This diff is collapsed.
Click to expand it.
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/LinearFunctionItemProvider.java
0 → 100644
+
192
-
0
View file @
b2abc6df
/**
*/
package
de.hftstuttgart.energycomponents.provider
;
import
de.hftstuttgart.energycomponents.EnCompPackage
;
import
de.hftstuttgart.energycomponents.LinearFunction
;
import
java.util.Collection
;
import
java.util.List
;
import
org.eclipse.emf.common.notify.AdapterFactory
;
import
org.eclipse.emf.common.notify.Notification
;
import
org.eclipse.emf.common.util.ResourceLocator
;
import
org.eclipse.emf.edit.provider.ComposeableAdapterFactory
;
import
org.eclipse.emf.edit.provider.IEditingDomainItemProvider
;
import
org.eclipse.emf.edit.provider.IItemLabelProvider
;
import
org.eclipse.emf.edit.provider.IItemPropertyDescriptor
;
import
org.eclipse.emf.edit.provider.IItemPropertySource
;
import
org.eclipse.emf.edit.provider.IStructuredItemContentProvider
;
import
org.eclipse.emf.edit.provider.ITreeItemContentProvider
;
import
org.eclipse.emf.edit.provider.ItemPropertyDescriptor
;
import
org.eclipse.emf.edit.provider.ItemProviderAdapter
;
import
org.eclipse.emf.edit.provider.ViewerNotification
;
/**
* This is the item provider adapter for a {@link de.hftstuttgart.energycomponents.LinearFunction} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
class
LinearFunctionItemProvider
extends
ItemProviderAdapter
implements
IEditingDomainItemProvider
,
IStructuredItemContentProvider
,
ITreeItemContentProvider
,
IItemLabelProvider
,
IItemPropertySource
{
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
LinearFunctionItemProvider
(
AdapterFactory
adapterFactory
)
{
super
(
adapterFactory
);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
List
<
IItemPropertyDescriptor
>
getPropertyDescriptors
(
Object
object
)
{
if
(
itemPropertyDescriptors
==
null
)
{
super
.
getPropertyDescriptors
(
object
);
addKeyPropertyDescriptor
(
object
);
addParameterMPropertyDescriptor
(
object
);
addParameterCPropertyDescriptor
(
object
);
}
return
itemPropertyDescriptors
;
}
/**
* This adds a property descriptor for the Key feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addKeyPropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_LinearFunction_key_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_LinearFunction_key_feature"
,
"_UI_LinearFunction_type"
),
EnCompPackage
.
Literals
.
LINEAR_FUNCTION__KEY
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
GENERIC_VALUE_IMAGE
,
null
,
null
));
}
/**
* This adds a property descriptor for the Parameter M feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addParameterMPropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_LinearFunction_parameterM_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_LinearFunction_parameterM_feature"
,
"_UI_LinearFunction_type"
),
EnCompPackage
.
Literals
.
LINEAR_FUNCTION__PARAMETER_M
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
REAL_VALUE_IMAGE
,
null
,
null
));
}
/**
* This adds a property descriptor for the Parameter C feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addParameterCPropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_LinearFunction_parameterC_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_LinearFunction_parameterC_feature"
,
"_UI_LinearFunction_type"
),
EnCompPackage
.
Literals
.
LINEAR_FUNCTION__PARAMETER_C
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
REAL_VALUE_IMAGE
,
null
,
null
));
}
/**
* This returns LinearFunction.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
Object
getImage
(
Object
object
)
{
return
overlayImage
(
object
,
getResourceLocator
().
getImage
(
"full/obj16/LinearFunction"
));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
boolean
shouldComposeCreationImage
()
{
return
true
;
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
@Override
public
String
getText
(
Object
object
)
{
final
LinearFunction
linearFunction
=
(
LinearFunction
)
object
;
final
StringBuilder
txt
=
new
StringBuilder
(
"Parameter "
);
txt
.
append
(
String
.
valueOf
(
linearFunction
.
getKey
()));
txt
.
append
(
": "
);
txt
.
append
(
" y = "
);
txt
.
append
(
String
.
valueOf
(
linearFunction
.
getParameterM
()));
txt
.
append
(
"*x + "
);
txt
.
append
(
String
.
valueOf
(
linearFunction
.
getParameterC
()));
return
txt
.
toString
();
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
void
notifyChanged
(
Notification
notification
)
{
updateChildren
(
notification
);
switch
(
notification
.
getFeatureID
(
LinearFunction
.
class
))
{
case
EnCompPackage
.
LINEAR_FUNCTION__KEY
:
case
EnCompPackage
.
LINEAR_FUNCTION__PARAMETER_M
:
case
EnCompPackage
.
LINEAR_FUNCTION__PARAMETER_C
:
fireNotifyChanged
(
new
ViewerNotification
(
notification
,
notification
.
getNotifier
(),
false
,
true
));
return
;
}
super
.
notifyChanged
(
notification
);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
void
collectNewChildDescriptors
(
Collection
<
Object
>
newChildDescriptors
,
Object
object
)
{
super
.
collectNewChildDescriptors
(
newChildDescriptors
,
object
);
}
/**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
ResourceLocator
getResourceLocator
()
{
return
EnergyComponentsEditPlugin
.
INSTANCE
;
}
}
This diff is collapsed.
Click to expand it.
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/ManufacturerItemProvider.java
0 → 100644
+
189
-
0
View file @
b2abc6df
/**
*/
package
de.hftstuttgart.energycomponents.provider
;
import
de.hftstuttgart.energycomponents.EnCompPackage
;
import
de.hftstuttgart.energycomponents.Manufacturer
;
import
java.util.Collection
;
import
java.util.List
;
import
org.eclipse.emf.common.notify.AdapterFactory
;
import
org.eclipse.emf.common.notify.Notification
;
import
org.eclipse.emf.common.util.ResourceLocator
;
import
org.eclipse.emf.edit.provider.ComposeableAdapterFactory
;
import
org.eclipse.emf.edit.provider.IEditingDomainItemProvider
;
import
org.eclipse.emf.edit.provider.IItemLabelProvider
;
import
org.eclipse.emf.edit.provider.IItemPropertyDescriptor
;
import
org.eclipse.emf.edit.provider.IItemPropertySource
;
import
org.eclipse.emf.edit.provider.IStructuredItemContentProvider
;
import
org.eclipse.emf.edit.provider.ITreeItemContentProvider
;
import
org.eclipse.emf.edit.provider.ItemPropertyDescriptor
;
import
org.eclipse.emf.edit.provider.ItemProviderAdapter
;
import
org.eclipse.emf.edit.provider.ViewerNotification
;
/**
* This is the item provider adapter for a {@link de.hftstuttgart.energycomponents.Manufacturer} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
class
ManufacturerItemProvider
extends
ItemProviderAdapter
implements
IEditingDomainItemProvider
,
IStructuredItemContentProvider
,
ITreeItemContentProvider
,
IItemLabelProvider
,
IItemPropertySource
{
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
ManufacturerItemProvider
(
AdapterFactory
adapterFactory
)
{
super
(
adapterFactory
);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
List
<
IItemPropertyDescriptor
>
getPropertyDescriptors
(
Object
object
)
{
if
(
itemPropertyDescriptors
==
null
)
{
super
.
getPropertyDescriptors
(
object
);
addManufacturerNamePropertyDescriptor
(
object
);
addCountryPropertyDescriptor
(
object
);
addOutOfBusinessSincePropertyDescriptor
(
object
);
}
return
itemPropertyDescriptors
;
}
/**
* This adds a property descriptor for the Manufacturer Name feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addManufacturerNamePropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_Manufacturer_manufacturerName_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_Manufacturer_manufacturerName_feature"
,
"_UI_Manufacturer_type"
),
EnCompPackage
.
Literals
.
MANUFACTURER__MANUFACTURER_NAME
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
GENERIC_VALUE_IMAGE
,
null
,
null
));
}
/**
* This adds a property descriptor for the Country feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addCountryPropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_Manufacturer_country_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_Manufacturer_country_feature"
,
"_UI_Manufacturer_type"
),
EnCompPackage
.
Literals
.
MANUFACTURER__COUNTRY
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
GENERIC_VALUE_IMAGE
,
null
,
null
));
}
/**
* This adds a property descriptor for the Out Of Business Since feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addOutOfBusinessSincePropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_Manufacturer_outOfBusinessSince_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_Manufacturer_outOfBusinessSince_feature"
,
"_UI_Manufacturer_type"
),
EnCompPackage
.
Literals
.
MANUFACTURER__OUT_OF_BUSINESS_SINCE
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
INTEGRAL_VALUE_IMAGE
,
null
,
null
));
}
/**
* This returns Manufacturer.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
Object
getImage
(
Object
object
)
{
return
overlayImage
(
object
,
getResourceLocator
().
getImage
(
"full/obj16/Manufacturer"
));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
boolean
shouldComposeCreationImage
()
{
return
true
;
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
String
getText
(
Object
object
)
{
String
label
=
((
Manufacturer
)
object
).
getManufacturerName
();
return
label
==
null
||
label
.
length
()
==
0
?
getString
(
"_UI_Manufacturer_type"
)
:
getString
(
"_UI_Manufacturer_type"
)
+
" "
+
label
;
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
void
notifyChanged
(
Notification
notification
)
{
updateChildren
(
notification
);
switch
(
notification
.
getFeatureID
(
Manufacturer
.
class
))
{
case
EnCompPackage
.
MANUFACTURER__MANUFACTURER_NAME
:
case
EnCompPackage
.
MANUFACTURER__COUNTRY
:
case
EnCompPackage
.
MANUFACTURER__OUT_OF_BUSINESS_SINCE
:
fireNotifyChanged
(
new
ViewerNotification
(
notification
,
notification
.
getNotifier
(),
false
,
true
));
return
;
}
super
.
notifyChanged
(
notification
);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
void
collectNewChildDescriptors
(
Collection
<
Object
>
newChildDescriptors
,
Object
object
)
{
super
.
collectNewChildDescriptors
(
newChildDescriptors
,
object
);
}
/**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
ResourceLocator
getResourceLocator
()
{
return
EnergyComponentsEditPlugin
.
INSTANCE
;
}
}
This diff is collapsed.
Click to expand it.
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/MaterialItemProvider.java
0 → 100644
+
170
-
0
View file @
b2abc6df
/**
*/
package
de.hftstuttgart.energycomponents.provider
;
import
de.hftstuttgart.energycomponents.EnCompPackage
;
import
de.hftstuttgart.energycomponents.Material
;
import
java.util.Collection
;
import
java.util.List
;
import
org.eclipse.emf.common.notify.AdapterFactory
;
import
org.eclipse.emf.common.notify.Notification
;
import
org.eclipse.emf.common.util.ResourceLocator
;
import
org.eclipse.emf.edit.provider.ComposeableAdapterFactory
;
import
org.eclipse.emf.edit.provider.IEditingDomainItemProvider
;
import
org.eclipse.emf.edit.provider.IItemLabelProvider
;
import
org.eclipse.emf.edit.provider.IItemPropertyDescriptor
;
import
org.eclipse.emf.edit.provider.IItemPropertySource
;
import
org.eclipse.emf.edit.provider.IStructuredItemContentProvider
;
import
org.eclipse.emf.edit.provider.ITreeItemContentProvider
;
import
org.eclipse.emf.edit.provider.ItemPropertyDescriptor
;
import
org.eclipse.emf.edit.provider.ItemProviderAdapter
;
import
org.eclipse.emf.edit.provider.ViewerNotification
;
/**
* This is the item provider adapter for a {@link de.hftstuttgart.energycomponents.Material} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
class
MaterialItemProvider
extends
ItemProviderAdapter
implements
IEditingDomainItemProvider
,
IStructuredItemContentProvider
,
ITreeItemContentProvider
,
IItemLabelProvider
,
IItemPropertySource
{
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
MaterialItemProvider
(
AdapterFactory
adapterFactory
)
{
super
(
adapterFactory
);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
List
<
IItemPropertyDescriptor
>
getPropertyDescriptors
(
Object
object
)
{
if
(
itemPropertyDescriptors
==
null
)
{
super
.
getPropertyDescriptors
(
object
);
addThermalConductivityPropertyDescriptor
(
object
);
addNamePropertyDescriptor
(
object
);
}
return
itemPropertyDescriptors
;
}
/**
* This adds a property descriptor for the Thermal Conductivity feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addThermalConductivityPropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_Material_thermalConductivity_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_Material_thermalConductivity_feature"
,
"_UI_Material_type"
),
EnCompPackage
.
Literals
.
MATERIAL__THERMAL_CONDUCTIVITY
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
GENERIC_VALUE_IMAGE
,
null
,
null
));
}
/**
* This adds a property descriptor for the Name feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addNamePropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_Material_name_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_Material_name_feature"
,
"_UI_Material_type"
),
EnCompPackage
.
Literals
.
MATERIAL__NAME
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
GENERIC_VALUE_IMAGE
,
null
,
null
));
}
/**
* This returns Material.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
Object
getImage
(
Object
object
)
{
return
overlayImage
(
object
,
getResourceLocator
().
getImage
(
"full/obj16/Material"
));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
boolean
shouldComposeCreationImage
()
{
return
true
;
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
String
getText
(
Object
object
)
{
String
label
=
((
Material
)
object
).
getName
();
return
label
==
null
||
label
.
length
()
==
0
?
getString
(
"_UI_Material_type"
)
:
getString
(
"_UI_Material_type"
)
+
" "
+
label
;
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
void
notifyChanged
(
Notification
notification
)
{
updateChildren
(
notification
);
switch
(
notification
.
getFeatureID
(
Material
.
class
))
{
case
EnCompPackage
.
MATERIAL__THERMAL_CONDUCTIVITY
:
case
EnCompPackage
.
MATERIAL__NAME
:
fireNotifyChanged
(
new
ViewerNotification
(
notification
,
notification
.
getNotifier
(),
false
,
true
));
return
;
}
super
.
notifyChanged
(
notification
);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
void
collectNewChildDescriptors
(
Collection
<
Object
>
newChildDescriptors
,
Object
object
)
{
super
.
collectNewChildDescriptors
(
newChildDescriptors
,
object
);
}
/**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
ResourceLocator
getResourceLocator
()
{
return
EnergyComponentsEditPlugin
.
INSTANCE
;
}
}
This diff is collapsed.
Click to expand it.
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/MediumItemProvider.java
0 → 100644
+
223
-
0
View file @
b2abc6df
/**
*/
package
de.hftstuttgart.energycomponents.provider
;
import
de.hftstuttgart.energycomponents.EnCompPackage
;
import
de.hftstuttgart.energycomponents.Medium
;
import
java.util.Collection
;
import
java.util.List
;
import
org.eclipse.emf.common.notify.AdapterFactory
;
import
org.eclipse.emf.common.notify.Notification
;
import
org.eclipse.emf.common.util.ResourceLocator
;
import
org.eclipse.emf.edit.provider.ComposeableAdapterFactory
;
import
org.eclipse.emf.edit.provider.IEditingDomainItemProvider
;
import
org.eclipse.emf.edit.provider.IItemLabelProvider
;
import
org.eclipse.emf.edit.provider.IItemPropertyDescriptor
;
import
org.eclipse.emf.edit.provider.IItemPropertySource
;
import
org.eclipse.emf.edit.provider.IStructuredItemContentProvider
;
import
org.eclipse.emf.edit.provider.ITreeItemContentProvider
;
import
org.eclipse.emf.edit.provider.ItemPropertyDescriptor
;
import
org.eclipse.emf.edit.provider.ItemProviderAdapter
;
import
org.eclipse.emf.edit.provider.ViewerNotification
;
/**
* This is the item provider adapter for a {@link de.hftstuttgart.energycomponents.Medium} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
class
MediumItemProvider
extends
ItemProviderAdapter
implements
IEditingDomainItemProvider
,
IStructuredItemContentProvider
,
ITreeItemContentProvider
,
IItemLabelProvider
,
IItemPropertySource
{
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
MediumItemProvider
(
AdapterFactory
adapterFactory
)
{
super
(
adapterFactory
);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
List
<
IItemPropertyDescriptor
>
getPropertyDescriptors
(
Object
object
)
{
if
(
itemPropertyDescriptors
==
null
)
{
super
.
getPropertyDescriptors
(
object
);
addDensityPropertyDescriptor
(
object
);
addHeatCapacityPropertyDescriptor
(
object
);
addEvaporationTemperaturePropertyDescriptor
(
object
);
addMeltingTemperaturePropertyDescriptor
(
object
);
addNamePropertyDescriptor
(
object
);
}
return
itemPropertyDescriptors
;
}
/**
* This adds a property descriptor for the Density feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addDensityPropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_Medium_density_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_Medium_density_feature"
,
"_UI_Medium_type"
),
EnCompPackage
.
Literals
.
MEDIUM__DENSITY
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
GENERIC_VALUE_IMAGE
,
null
,
null
));
}
/**
* This adds a property descriptor for the Heat Capacity feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addHeatCapacityPropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_Medium_heatCapacity_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_Medium_heatCapacity_feature"
,
"_UI_Medium_type"
),
EnCompPackage
.
Literals
.
MEDIUM__HEAT_CAPACITY
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
GENERIC_VALUE_IMAGE
,
null
,
null
));
}
/**
* This adds a property descriptor for the Evaporation Temperature feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addEvaporationTemperaturePropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_Medium_evaporationTemperature_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_Medium_evaporationTemperature_feature"
,
"_UI_Medium_type"
),
EnCompPackage
.
Literals
.
MEDIUM__EVAPORATION_TEMPERATURE
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
GENERIC_VALUE_IMAGE
,
null
,
null
));
}
/**
* This adds a property descriptor for the Melting Temperature feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addMeltingTemperaturePropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_Medium_meltingTemperature_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_Medium_meltingTemperature_feature"
,
"_UI_Medium_type"
),
EnCompPackage
.
Literals
.
MEDIUM__MELTING_TEMPERATURE
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
GENERIC_VALUE_IMAGE
,
null
,
null
));
}
/**
* This adds a property descriptor for the Name feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addNamePropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_Medium_name_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_Medium_name_feature"
,
"_UI_Medium_type"
),
EnCompPackage
.
Literals
.
MEDIUM__NAME
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
GENERIC_VALUE_IMAGE
,
null
,
null
));
}
/**
* This returns Medium.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
Object
getImage
(
Object
object
)
{
return
overlayImage
(
object
,
getResourceLocator
().
getImage
(
"full/obj16/Medium"
));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
boolean
shouldComposeCreationImage
()
{
return
true
;
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
String
getText
(
Object
object
)
{
String
label
=
((
Medium
)
object
).
getName
();
return
label
==
null
||
label
.
length
()
==
0
?
getString
(
"_UI_Medium_type"
)
:
getString
(
"_UI_Medium_type"
)
+
" "
+
label
;
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
void
notifyChanged
(
Notification
notification
)
{
updateChildren
(
notification
);
switch
(
notification
.
getFeatureID
(
Medium
.
class
))
{
case
EnCompPackage
.
MEDIUM__DENSITY
:
case
EnCompPackage
.
MEDIUM__HEAT_CAPACITY
:
case
EnCompPackage
.
MEDIUM__EVAPORATION_TEMPERATURE
:
case
EnCompPackage
.
MEDIUM__MELTING_TEMPERATURE
:
case
EnCompPackage
.
MEDIUM__NAME
:
fireNotifyChanged
(
new
ViewerNotification
(
notification
,
notification
.
getNotifier
(),
false
,
true
));
return
;
}
super
.
notifyChanged
(
notification
);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
void
collectNewChildDescriptors
(
Collection
<
Object
>
newChildDescriptors
,
Object
object
)
{
super
.
collectNewChildDescriptors
(
newChildDescriptors
,
object
);
}
/**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
ResourceLocator
getResourceLocator
()
{
return
EnergyComponentsEditPlugin
.
INSTANCE
;
}
}
This diff is collapsed.
Click to expand it.
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/PhotovoltaicModuleItemProvider.java
0 → 100644
+
223
-
0
View file @
b2abc6df
/**
*/
package
de.hftstuttgart.energycomponents.provider
;
import
de.hftstuttgart.energycomponents.EnCompPackage
;
import
de.hftstuttgart.energycomponents.PhotovoltaicModule
;
import
java.util.Collection
;
import
java.util.List
;
import
org.eclipse.emf.common.notify.AdapterFactory
;
import
org.eclipse.emf.common.notify.Notification
;
import
org.eclipse.emf.edit.provider.ComposeableAdapterFactory
;
import
org.eclipse.emf.edit.provider.IItemPropertyDescriptor
;
import
org.eclipse.emf.edit.provider.ItemPropertyDescriptor
;
import
org.eclipse.emf.edit.provider.ViewerNotification
;
/**
* This is the item provider adapter for a {@link de.hftstuttgart.energycomponents.PhotovoltaicModule} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
class
PhotovoltaicModuleItemProvider
extends
EnergyComponentItemProvider
{
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
PhotovoltaicModuleItemProvider
(
AdapterFactory
adapterFactory
)
{
super
(
adapterFactory
);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
List
<
IItemPropertyDescriptor
>
getPropertyDescriptors
(
Object
object
)
{
if
(
itemPropertyDescriptors
==
null
)
{
super
.
getPropertyDescriptors
(
object
);
addCellTypePropertyDescriptor
(
object
);
addNominalPowerPropertyDescriptor
(
object
);
addMppVoltagePropertyDescriptor
(
object
);
addMppCurrentPropertyDescriptor
(
object
);
addNominalEfficiencyPropertyDescriptor
(
object
);
addModuleAreaPropertyDescriptor
(
object
);
}
return
itemPropertyDescriptors
;
}
/**
* This adds a property descriptor for the Cell Type feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addCellTypePropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_PhotovoltaicModule_cellType_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_PhotovoltaicModule_cellType_feature"
,
"_UI_PhotovoltaicModule_type"
),
EnCompPackage
.
Literals
.
PHOTOVOLTAIC_MODULE__CELL_TYPE
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
GENERIC_VALUE_IMAGE
,
null
,
null
));
}
/**
* This adds a property descriptor for the Nominal Power feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addNominalPowerPropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(
((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_PhotovoltaicModule_nominalPower_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_PhotovoltaicModule_nominalPower_feature"
,
"_UI_PhotovoltaicModule_type"
),
EnCompPackage
.
Literals
.
PHOTOVOLTAIC_MODULE__NOMINAL_POWER
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
GENERIC_VALUE_IMAGE
,
null
,
null
));
}
/**
* This adds a property descriptor for the Mpp Voltage feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addMppVoltagePropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_PhotovoltaicModule_mppVoltage_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_PhotovoltaicModule_mppVoltage_feature"
,
"_UI_PhotovoltaicModule_type"
),
EnCompPackage
.
Literals
.
PHOTOVOLTAIC_MODULE__MPP_VOLTAGE
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
GENERIC_VALUE_IMAGE
,
null
,
null
));
}
/**
* This adds a property descriptor for the Mpp Current feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addMppCurrentPropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_PhotovoltaicModule_mppCurrent_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_PhotovoltaicModule_mppCurrent_feature"
,
"_UI_PhotovoltaicModule_type"
),
EnCompPackage
.
Literals
.
PHOTOVOLTAIC_MODULE__MPP_CURRENT
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
GENERIC_VALUE_IMAGE
,
null
,
null
));
}
/**
* This adds a property descriptor for the Nominal Efficiency feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addNominalEfficiencyPropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(
((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_PhotovoltaicModule_nominalEfficiency_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_PhotovoltaicModule_nominalEfficiency_feature"
,
"_UI_PhotovoltaicModule_type"
),
EnCompPackage
.
Literals
.
PHOTOVOLTAIC_MODULE__NOMINAL_EFFICIENCY
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
REAL_VALUE_IMAGE
,
null
,
null
));
}
/**
* This adds a property descriptor for the Module Area feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addModuleAreaPropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_PhotovoltaicModule_moduleArea_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_PhotovoltaicModule_moduleArea_feature"
,
"_UI_PhotovoltaicModule_type"
),
EnCompPackage
.
Literals
.
PHOTOVOLTAIC_MODULE__MODULE_AREA
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
GENERIC_VALUE_IMAGE
,
null
,
null
));
}
/**
* This returns PhotovoltaicModule.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
Object
getImage
(
Object
object
)
{
return
overlayImage
(
object
,
getResourceLocator
().
getImage
(
"full/obj16/PhotovoltaicModule"
));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
boolean
shouldComposeCreationImage
()
{
return
true
;
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
String
getText
(
Object
object
)
{
String
label
=
((
PhotovoltaicModule
)
object
).
getModelName
();
return
label
==
null
||
label
.
length
()
==
0
?
getString
(
"_UI_PhotovoltaicModule_type"
)
:
getString
(
"_UI_PhotovoltaicModule_type"
)
+
" "
+
label
;
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
void
notifyChanged
(
Notification
notification
)
{
updateChildren
(
notification
);
switch
(
notification
.
getFeatureID
(
PhotovoltaicModule
.
class
))
{
case
EnCompPackage
.
PHOTOVOLTAIC_MODULE__CELL_TYPE
:
case
EnCompPackage
.
PHOTOVOLTAIC_MODULE__NOMINAL_POWER
:
case
EnCompPackage
.
PHOTOVOLTAIC_MODULE__MPP_VOLTAGE
:
case
EnCompPackage
.
PHOTOVOLTAIC_MODULE__MPP_CURRENT
:
case
EnCompPackage
.
PHOTOVOLTAIC_MODULE__NOMINAL_EFFICIENCY
:
case
EnCompPackage
.
PHOTOVOLTAIC_MODULE__MODULE_AREA
:
fireNotifyChanged
(
new
ViewerNotification
(
notification
,
notification
.
getNotifier
(),
false
,
true
));
return
;
}
super
.
notifyChanged
(
notification
);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
void
collectNewChildDescriptors
(
Collection
<
Object
>
newChildDescriptors
,
Object
object
)
{
super
.
collectNewChildDescriptors
(
newChildDescriptors
,
object
);
}
}
This diff is collapsed.
Click to expand it.
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/PolynomialCharacteristicItemProvider.java
0 → 100644
+
148
-
0
View file @
b2abc6df
/**
*/
package
de.hftstuttgart.energycomponents.provider
;
import
de.hftstuttgart.energycomponents.EnCompFactory
;
import
de.hftstuttgart.energycomponents.EnCompPackage
;
import
de.hftstuttgart.energycomponents.PolynomialCharacteristic
;
import
java.util.Collection
;
import
java.util.List
;
import
org.eclipse.emf.common.notify.AdapterFactory
;
import
org.eclipse.emf.common.notify.Notification
;
import
org.eclipse.emf.ecore.EStructuralFeature
;
import
org.eclipse.emf.edit.provider.IItemPropertyDescriptor
;
import
org.eclipse.emf.edit.provider.ViewerNotification
;
/**
* This is the item provider adapter for a {@link de.hftstuttgart.energycomponents.PolynomialCharacteristic} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
class
PolynomialCharacteristicItemProvider
extends
CharacteristicItemProvider
{
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
PolynomialCharacteristicItemProvider
(
AdapterFactory
adapterFactory
)
{
super
(
adapterFactory
);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
List
<
IItemPropertyDescriptor
>
getPropertyDescriptors
(
Object
object
)
{
if
(
itemPropertyDescriptors
==
null
)
{
super
.
getPropertyDescriptors
(
object
);
}
return
itemPropertyDescriptors
;
}
/**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
Collection
<?
extends
EStructuralFeature
>
getChildrenFeatures
(
Object
object
)
{
if
(
childrenFeatures
==
null
)
{
super
.
getChildrenFeatures
(
object
);
childrenFeatures
.
add
(
EnCompPackage
.
Literals
.
POLYNOMIAL_CHARACTERISTIC__FUNCTIONS
);
}
return
childrenFeatures
;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
EStructuralFeature
getChildFeature
(
Object
object
,
Object
child
)
{
// Check the type of the specified child object and return the proper feature to use for
// adding (see {@link AddCommand}) it as a child.
return
super
.
getChildFeature
(
object
,
child
);
}
/**
* This returns PolynomialCharacteristic.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
Object
getImage
(
Object
object
)
{
return
overlayImage
(
object
,
getResourceLocator
().
getImage
(
"full/obj16/PolynomialCharacteristic"
));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
boolean
shouldComposeCreationImage
()
{
return
true
;
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
String
getText
(
Object
object
)
{
return
getString
(
"_UI_PolynomialCharacteristic_type"
);
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
void
notifyChanged
(
Notification
notification
)
{
updateChildren
(
notification
);
switch
(
notification
.
getFeatureID
(
PolynomialCharacteristic
.
class
))
{
case
EnCompPackage
.
POLYNOMIAL_CHARACTERISTIC__FUNCTIONS
:
fireNotifyChanged
(
new
ViewerNotification
(
notification
,
notification
.
getNotifier
(),
true
,
false
));
return
;
}
super
.
notifyChanged
(
notification
);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
void
collectNewChildDescriptors
(
Collection
<
Object
>
newChildDescriptors
,
Object
object
)
{
super
.
collectNewChildDescriptors
(
newChildDescriptors
,
object
);
newChildDescriptors
.
add
(
createChildParameter
(
EnCompPackage
.
Literals
.
POLYNOMIAL_CHARACTERISTIC__FUNCTIONS
,
EnCompFactory
.
eINSTANCE
.
createPolynomialFunction
()));
}
}
This diff is collapsed.
Click to expand it.
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/PolynomialFunctionItemProvider.java
0 → 100644
+
218
-
0
View file @
b2abc6df
/**
*/
package
de.hftstuttgart.energycomponents.provider
;
import
de.hftstuttgart.energycomponents.EnCompPackage
;
import
de.hftstuttgart.energycomponents.PolynomialFunction
;
import
java.util.Collection
;
import
java.util.List
;
import
org.eclipse.emf.common.notify.AdapterFactory
;
import
org.eclipse.emf.common.notify.Notification
;
import
org.eclipse.emf.common.util.ResourceLocator
;
import
org.eclipse.emf.edit.provider.ComposeableAdapterFactory
;
import
org.eclipse.emf.edit.provider.IEditingDomainItemProvider
;
import
org.eclipse.emf.edit.provider.IItemLabelProvider
;
import
org.eclipse.emf.edit.provider.IItemPropertyDescriptor
;
import
org.eclipse.emf.edit.provider.IItemPropertySource
;
import
org.eclipse.emf.edit.provider.IStructuredItemContentProvider
;
import
org.eclipse.emf.edit.provider.ITreeItemContentProvider
;
import
org.eclipse.emf.edit.provider.ItemPropertyDescriptor
;
import
org.eclipse.emf.edit.provider.ItemProviderAdapter
;
import
org.eclipse.emf.edit.provider.ViewerNotification
;
/**
* This is the item provider adapter for a {@link de.hftstuttgart.energycomponents.PolynomialFunction} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
class
PolynomialFunctionItemProvider
extends
ItemProviderAdapter
implements
IEditingDomainItemProvider
,
IStructuredItemContentProvider
,
ITreeItemContentProvider
,
IItemLabelProvider
,
IItemPropertySource
{
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
PolynomialFunctionItemProvider
(
AdapterFactory
adapterFactory
)
{
super
(
adapterFactory
);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
List
<
IItemPropertyDescriptor
>
getPropertyDescriptors
(
Object
object
)
{
if
(
itemPropertyDescriptors
==
null
)
{
super
.
getPropertyDescriptors
(
object
);
addKeyPropertyDescriptor
(
object
);
addParameterAPropertyDescriptor
(
object
);
addParameterBPropertyDescriptor
(
object
);
addParameterCPropertyDescriptor
(
object
);
}
return
itemPropertyDescriptors
;
}
/**
* This adds a property descriptor for the Key feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addKeyPropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_PolynomialFunction_key_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_PolynomialFunction_key_feature"
,
"_UI_PolynomialFunction_type"
),
EnCompPackage
.
Literals
.
POLYNOMIAL_FUNCTION__KEY
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
GENERIC_VALUE_IMAGE
,
null
,
null
));
}
/**
* This adds a property descriptor for the Parameter A feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addParameterAPropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_PolynomialFunction_parameterA_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_PolynomialFunction_parameterA_feature"
,
"_UI_PolynomialFunction_type"
),
EnCompPackage
.
Literals
.
POLYNOMIAL_FUNCTION__PARAMETER_A
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
REAL_VALUE_IMAGE
,
null
,
null
));
}
/**
* This adds a property descriptor for the Parameter B feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addParameterBPropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_PolynomialFunction_parameterB_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_PolynomialFunction_parameterB_feature"
,
"_UI_PolynomialFunction_type"
),
EnCompPackage
.
Literals
.
POLYNOMIAL_FUNCTION__PARAMETER_B
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
REAL_VALUE_IMAGE
,
null
,
null
));
}
/**
* This adds a property descriptor for the Parameter C feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addParameterCPropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_PolynomialFunction_parameterC_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_PolynomialFunction_parameterC_feature"
,
"_UI_PolynomialFunction_type"
),
EnCompPackage
.
Literals
.
POLYNOMIAL_FUNCTION__PARAMETER_C
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
REAL_VALUE_IMAGE
,
null
,
null
));
}
/**
* This returns PolynomialFunction.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
Object
getImage
(
Object
object
)
{
return
overlayImage
(
object
,
getResourceLocator
().
getImage
(
"full/obj16/PolynomialFunction"
));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
boolean
shouldComposeCreationImage
()
{
return
true
;
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
@Override
public
String
getText
(
Object
object
)
{
final
PolynomialFunction
polynomialFunction
=
(
PolynomialFunction
)
object
;
final
StringBuilder
txt
=
new
StringBuilder
(
"Parameter "
);
txt
.
append
(
String
.
valueOf
(
polynomialFunction
.
getKey
()));
txt
.
append
(
": "
);
txt
.
append
(
" y = "
);
txt
.
append
(
String
.
valueOf
(
polynomialFunction
.
getParameterA
()));
txt
.
append
(
" * "
);
txt
.
append
(
"x^2"
);
txt
.
append
(
" + "
);
txt
.
append
(
String
.
valueOf
(
polynomialFunction
.
getParameterB
()));
txt
.
append
(
"x"
);
txt
.
append
(
" + "
);
txt
.
append
(
String
.
valueOf
(
polynomialFunction
.
getParameterC
()));
return
txt
.
toString
();
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
void
notifyChanged
(
Notification
notification
)
{
updateChildren
(
notification
);
switch
(
notification
.
getFeatureID
(
PolynomialFunction
.
class
))
{
case
EnCompPackage
.
POLYNOMIAL_FUNCTION__KEY
:
case
EnCompPackage
.
POLYNOMIAL_FUNCTION__PARAMETER_A
:
case
EnCompPackage
.
POLYNOMIAL_FUNCTION__PARAMETER_B
:
case
EnCompPackage
.
POLYNOMIAL_FUNCTION__PARAMETER_C
:
fireNotifyChanged
(
new
ViewerNotification
(
notification
,
notification
.
getNotifier
(),
false
,
true
));
return
;
}
super
.
notifyChanged
(
notification
);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
void
collectNewChildDescriptors
(
Collection
<
Object
>
newChildDescriptors
,
Object
object
)
{
super
.
collectNewChildDescriptors
(
newChildDescriptors
,
object
);
}
/**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
ResourceLocator
getResourceLocator
()
{
return
EnergyComponentsEditPlugin
.
INSTANCE
;
}
}
This diff is collapsed.
Click to expand it.
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/PowerCharacteristicItemProvider.java
0 → 100644
+
148
-
0
View file @
b2abc6df
/**
*/
package
de.hftstuttgart.energycomponents.provider
;
import
de.hftstuttgart.energycomponents.EnCompFactory
;
import
de.hftstuttgart.energycomponents.EnCompPackage
;
import
de.hftstuttgart.energycomponents.PowerCharacteristic
;
import
java.util.Collection
;
import
java.util.List
;
import
org.eclipse.emf.common.notify.AdapterFactory
;
import
org.eclipse.emf.common.notify.Notification
;
import
org.eclipse.emf.ecore.EStructuralFeature
;
import
org.eclipse.emf.edit.provider.IItemPropertyDescriptor
;
import
org.eclipse.emf.edit.provider.ViewerNotification
;
/**
* This is the item provider adapter for a {@link de.hftstuttgart.energycomponents.PowerCharacteristic} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
class
PowerCharacteristicItemProvider
extends
CharacteristicItemProvider
{
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
PowerCharacteristicItemProvider
(
AdapterFactory
adapterFactory
)
{
super
(
adapterFactory
);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
List
<
IItemPropertyDescriptor
>
getPropertyDescriptors
(
Object
object
)
{
if
(
itemPropertyDescriptors
==
null
)
{
super
.
getPropertyDescriptors
(
object
);
}
return
itemPropertyDescriptors
;
}
/**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
Collection
<?
extends
EStructuralFeature
>
getChildrenFeatures
(
Object
object
)
{
if
(
childrenFeatures
==
null
)
{
super
.
getChildrenFeatures
(
object
);
childrenFeatures
.
add
(
EnCompPackage
.
Literals
.
POWER_CHARACTERISTIC__FUNCTIONS
);
}
return
childrenFeatures
;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
EStructuralFeature
getChildFeature
(
Object
object
,
Object
child
)
{
// Check the type of the specified child object and return the proper feature to use for
// adding (see {@link AddCommand}) it as a child.
return
super
.
getChildFeature
(
object
,
child
);
}
/**
* This returns PowerCharacteristic.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
Object
getImage
(
Object
object
)
{
return
overlayImage
(
object
,
getResourceLocator
().
getImage
(
"full/obj16/PowerCharacteristic"
));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
boolean
shouldComposeCreationImage
()
{
return
true
;
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
String
getText
(
Object
object
)
{
return
getString
(
"_UI_PowerCharacteristic_type"
);
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
void
notifyChanged
(
Notification
notification
)
{
updateChildren
(
notification
);
switch
(
notification
.
getFeatureID
(
PowerCharacteristic
.
class
))
{
case
EnCompPackage
.
POWER_CHARACTERISTIC__FUNCTIONS
:
fireNotifyChanged
(
new
ViewerNotification
(
notification
,
notification
.
getNotifier
(),
true
,
false
));
return
;
}
super
.
notifyChanged
(
notification
);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
void
collectNewChildDescriptors
(
Collection
<
Object
>
newChildDescriptors
,
Object
object
)
{
super
.
collectNewChildDescriptors
(
newChildDescriptors
,
object
);
newChildDescriptors
.
add
(
createChildParameter
(
EnCompPackage
.
Literals
.
POWER_CHARACTERISTIC__FUNCTIONS
,
EnCompFactory
.
eINSTANCE
.
createPowerFunction
()));
}
}
This diff is collapsed.
Click to expand it.
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/PowerFunctionItemProvider.java
0 → 100644
+
198
-
0
View file @
b2abc6df
/**
*/
package
de.hftstuttgart.energycomponents.provider
;
import
de.hftstuttgart.energycomponents.EnCompPackage
;
import
de.hftstuttgart.energycomponents.PowerFunction
;
import
java.util.Collection
;
import
java.util.List
;
import
org.eclipse.emf.common.notify.AdapterFactory
;
import
org.eclipse.emf.common.notify.Notification
;
import
org.eclipse.emf.common.util.ResourceLocator
;
import
org.eclipse.emf.edit.provider.ComposeableAdapterFactory
;
import
org.eclipse.emf.edit.provider.IEditingDomainItemProvider
;
import
org.eclipse.emf.edit.provider.IItemLabelProvider
;
import
org.eclipse.emf.edit.provider.IItemPropertyDescriptor
;
import
org.eclipse.emf.edit.provider.IItemPropertySource
;
import
org.eclipse.emf.edit.provider.IStructuredItemContentProvider
;
import
org.eclipse.emf.edit.provider.ITreeItemContentProvider
;
import
org.eclipse.emf.edit.provider.ItemPropertyDescriptor
;
import
org.eclipse.emf.edit.provider.ItemProviderAdapter
;
import
org.eclipse.emf.edit.provider.ViewerNotification
;
/**
* This is the item provider adapter for a {@link de.hftstuttgart.energycomponents.PowerFunction} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
class
PowerFunctionItemProvider
extends
ItemProviderAdapter
implements
IEditingDomainItemProvider
,
IStructuredItemContentProvider
,
ITreeItemContentProvider
,
IItemLabelProvider
,
IItemPropertySource
{
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
PowerFunctionItemProvider
(
AdapterFactory
adapterFactory
)
{
super
(
adapterFactory
);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
List
<
IItemPropertyDescriptor
>
getPropertyDescriptors
(
Object
object
)
{
if
(
itemPropertyDescriptors
==
null
)
{
super
.
getPropertyDescriptors
(
object
);
addKeyPropertyDescriptor
(
object
);
addParameterAPropertyDescriptor
(
object
);
addParameterBPropertyDescriptor
(
object
);
}
return
itemPropertyDescriptors
;
}
/**
* This adds a property descriptor for the Key feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addKeyPropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_PowerFunction_key_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_PowerFunction_key_feature"
,
"_UI_PowerFunction_type"
),
EnCompPackage
.
Literals
.
POWER_FUNCTION__KEY
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
GENERIC_VALUE_IMAGE
,
null
,
null
));
}
/**
* This adds a property descriptor for the Parameter A feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addParameterAPropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_PowerFunction_parameterA_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_PowerFunction_parameterA_feature"
,
"_UI_PowerFunction_type"
),
EnCompPackage
.
Literals
.
POWER_FUNCTION__PARAMETER_A
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
REAL_VALUE_IMAGE
,
null
,
null
));
}
/**
* This adds a property descriptor for the Parameter B feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected
void
addParameterBPropertyDescriptor
(
Object
object
)
{
itemPropertyDescriptors
.
add
(
createItemPropertyDescriptor
(((
ComposeableAdapterFactory
)
adapterFactory
).
getRootAdapterFactory
(),
getResourceLocator
(),
getString
(
"_UI_PowerFunction_parameterB_feature"
),
getString
(
"_UI_PropertyDescriptor_description"
,
"_UI_PowerFunction_parameterB_feature"
,
"_UI_PowerFunction_type"
),
EnCompPackage
.
Literals
.
POWER_FUNCTION__PARAMETER_B
,
true
,
false
,
false
,
ItemPropertyDescriptor
.
REAL_VALUE_IMAGE
,
null
,
null
));
}
/**
* This returns PowerFunction.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
Object
getImage
(
Object
object
)
{
return
overlayImage
(
object
,
getResourceLocator
().
getImage
(
"full/obj16/PowerFunction"
));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
boolean
shouldComposeCreationImage
()
{
return
true
;
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
@Override
public
String
getText
(
Object
object
)
{
final
PowerFunction
powerFunction
=
(
PowerFunction
)
object
;
final
StringBuilder
txt
=
new
StringBuilder
(
"Parameter "
);
txt
.
append
(
String
.
valueOf
(
powerFunction
.
getKey
()));
txt
.
append
(
": "
);
txt
.
append
(
" y = "
);
txt
.
append
(
String
.
valueOf
(
powerFunction
.
getParameterA
()));
txt
.
append
(
" * "
);
txt
.
append
(
"x^"
);
txt
.
append
(
String
.
valueOf
(
powerFunction
.
getParameterB
()));
return
txt
.
toString
();
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
void
notifyChanged
(
Notification
notification
)
{
updateChildren
(
notification
);
switch
(
notification
.
getFeatureID
(
PowerFunction
.
class
))
{
case
EnCompPackage
.
POWER_FUNCTION__KEY
:
case
EnCompPackage
.
POWER_FUNCTION__PARAMETER_A
:
case
EnCompPackage
.
POWER_FUNCTION__PARAMETER_B
:
fireNotifyChanged
(
new
ViewerNotification
(
notification
,
notification
.
getNotifier
(),
false
,
true
));
return
;
}
super
.
notifyChanged
(
notification
);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
void
collectNewChildDescriptors
(
Collection
<
Object
>
newChildDescriptors
,
Object
object
)
{
super
.
collectNewChildDescriptors
(
newChildDescriptors
,
object
);
}
/**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
ResourceLocator
getResourceLocator
()
{
return
EnergyComponentsEditPlugin
.
INSTANCE
;
}
}
This diff is collapsed.
Click to expand it.
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/RegularFuelItemProvider.java
0 → 100644
+
106
-
0
View file @
b2abc6df
/**
*/
package
de.hftstuttgart.energycomponents.provider
;
import
de.hftstuttgart.energycomponents.RegularFuel
;
import
java.util.Collection
;
import
java.util.List
;
import
org.eclipse.emf.common.notify.AdapterFactory
;
import
org.eclipse.emf.common.notify.Notification
;
import
org.eclipse.emf.edit.provider.IItemPropertyDescriptor
;
/**
* This is the item provider adapter for a {@link de.hftstuttgart.energycomponents.RegularFuel} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
class
RegularFuelItemProvider
extends
FuelItemProvider
{
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
RegularFuelItemProvider
(
AdapterFactory
adapterFactory
)
{
super
(
adapterFactory
);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
List
<
IItemPropertyDescriptor
>
getPropertyDescriptors
(
Object
object
)
{
if
(
itemPropertyDescriptors
==
null
)
{
super
.
getPropertyDescriptors
(
object
);
}
return
itemPropertyDescriptors
;
}
/**
* This returns RegularFuel.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
Object
getImage
(
Object
object
)
{
return
overlayImage
(
object
,
getResourceLocator
().
getImage
(
"full/obj16/RegularFuel"
));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
boolean
shouldComposeCreationImage
()
{
return
true
;
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
String
getText
(
Object
object
)
{
String
label
=
((
RegularFuel
)
object
).
getName
();
return
label
==
null
||
label
.
length
()
==
0
?
getString
(
"_UI_RegularFuel_type"
)
:
getString
(
"_UI_RegularFuel_type"
)
+
" "
+
label
;
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
void
notifyChanged
(
Notification
notification
)
{
updateChildren
(
notification
);
super
.
notifyChanged
(
notification
);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
void
collectNewChildDescriptors
(
Collection
<
Object
>
newChildDescriptors
,
Object
object
)
{
super
.
collectNewChildDescriptors
(
newChildDescriptors
,
object
);
}
}
This diff is collapsed.
Click to expand it.
de.hftstuttgart.energycomponents.edit/src-gen/de/hftstuttgart/energycomponents/provider/SaltHydrateItemProvider.java
0 → 100644
+
108
-
0
View file @
b2abc6df
/**
*/
package
de.hftstuttgart.energycomponents.provider
;
import
de.hftstuttgart.energycomponents.SaltHydrate
;
import
de.hftstuttgart.units.NullableQuantity
;
import
java.util.Collection
;
import
java.util.List
;
import
org.eclipse.emf.common.notify.AdapterFactory
;
import
org.eclipse.emf.common.notify.Notification
;
import
org.eclipse.emf.edit.provider.IItemPropertyDescriptor
;
/**
* This is the item provider adapter for a {@link de.hftstuttgart.energycomponents.SaltHydrate} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
class
SaltHydrateItemProvider
extends
MediumItemProvider
{
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public
SaltHydrateItemProvider
(
AdapterFactory
adapterFactory
)
{
super
(
adapterFactory
);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
List
<
IItemPropertyDescriptor
>
getPropertyDescriptors
(
Object
object
)
{
if
(
itemPropertyDescriptors
==
null
)
{
super
.
getPropertyDescriptors
(
object
);
}
return
itemPropertyDescriptors
;
}
/**
* This returns SaltHydrate.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
Object
getImage
(
Object
object
)
{
return
overlayImage
(
object
,
getResourceLocator
().
getImage
(
"full/obj16/SaltHydrate"
));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
boolean
shouldComposeCreationImage
()
{
return
true
;
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
String
getText
(
Object
object
)
{
NullableQuantity
labelValue
=
((
SaltHydrate
)
object
).
getDensity
();
String
label
=
labelValue
==
null
?
null
:
labelValue
.
toString
();
return
label
==
null
||
label
.
length
()
==
0
?
getString
(
"_UI_SaltHydrate_type"
)
:
getString
(
"_UI_SaltHydrate_type"
)
+
" "
+
label
;
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public
void
notifyChanged
(
Notification
notification
)
{
updateChildren
(
notification
);
super
.
notifyChanged
(
notification
);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected
void
collectNewChildDescriptors
(
Collection
<
Object
>
newChildDescriptors
,
Object
object
)
{
super
.
collectNewChildDescriptors
(
newChildDescriptors
,
object
);
}
}
This diff is collapsed.
Click to expand it.
Prev
1
2
3
4
5
6
7
8
9
10
…
15
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets