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
Building Physics
Building Physics Catalog Editor
Commits
f80d5e31
Commit
f80d5e31
authored
3 years ago
by
Kai-Holger Brassel
Browse files
Options
Download
Email Patches
Plain Diff
Enable creation of categories in master detail tree
parent
19907a34
master
No related merge requests found
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
de.hftstuttgart.buildingphysics.edit/plugin.properties
+3
-3
de.hftstuttgart.buildingphysics.edit/plugin.properties
de.hftstuttgart.buildingphysics.edit/src/de/hftstuttgart/buildingphysics/provider/MaterialCatalogItemProvider.java
+9
-0
...buildingphysics/provider/MaterialCatalogItemProvider.java
de.hftstuttgart.buildingphysics.edit/src/de/hftstuttgart/buildingphysics/provider/WindowCatalogItemProvider.java
+1
-32
...t/buildingphysics/provider/WindowCatalogItemProvider.java
de.hftstuttgart.buildingphysics/model/buildingphysics.ecore
+1
-1
de.hftstuttgart.buildingphysics/model/buildingphysics.ecore
de.hftstuttgart.buildingphysics/model/buildingphysics.genmodel
+3
-3
...tstuttgart.buildingphysics/model/buildingphysics.genmodel
de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/MaterialCatalog.java
+1
-1
.../src/de/hftstuttgart/buildingphysics/MaterialCatalog.java
de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/impl/BuildingPhysicsPackageImpl.java
+1
-1
...gart/buildingphysics/impl/BuildingPhysicsPackageImpl.java
with
19 additions
and
41 deletions
+19
-41
de.hftstuttgart.buildingphysics.edit/plugin.properties
+
3
-
3
View file @
f80d5e31
...
...
@@ -10,16 +10,17 @@ _UI_CreateChild_tooltip = Create New {0} Under {1} Feature
_UI_CreateChild_description
=
Create a new child of type {0} for the {1} feature of the selected {2}.
_UI_CreateSibling_description
=
Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
_UI_PropertyDescriptor_description
=
The
{0} of
the
{1}
_UI_PropertyDescriptor_description
=
{0} of {1}
_UI_BuildingPhysicsCatalog_type
=
Catalog
_UI_WindowType_type
=
Window Type
_UI_Catalog_type
=
Catalog
_UI_WindowCatalog_type
=
Windows
_UI_MaterialCatalog_type
=
Materials and Constructions
_UI_MaterialCategory_type
=
_UI_MaterialCategory_type
=
Material Category
_UI_Material_type
=
Material
_UI_Unknown_type
=
Object
_UI_ConstructionCategory_type
=
Construction Category
_UI_Unknown_datatype
=
Value
...
...
@@ -69,7 +70,6 @@ _UI_Material_constructionDescription_feature = Construction Description
_UI_Material_disposalEnergy_feature
=
Disposal Energy
_UI_Material_disposalCarbon_feature
=
Disposal Carbon
_UI_Material_disposalDescription_feature
=
Disposal Description
_UI_ConstructionCategory_type
=
Constructions
_UI_Mounting_type
=
Mounting
_UI_Layer_type
=
Layer
_UI_MaterialCatalog_constructionCategories_feature
=
Constructions
...
...
This diff is collapsed.
Click to expand it.
de.hftstuttgart.buildingphysics.edit/src/de/hftstuttgart/buildingphysics/provider/MaterialCatalogItemProvider.java
+
9
-
0
View file @
f80d5e31
...
...
@@ -2,6 +2,7 @@
*/
package
de.hftstuttgart.buildingphysics.provider
;
import
de.hftstuttgart.buildingphysics.BuildingPhysicsFactory
;
import
de.hftstuttgart.buildingphysics.BuildingPhysicsPackage
;
import
de.hftstuttgart.buildingphysics.MaterialCatalog
;
...
...
@@ -139,6 +140,14 @@ public class MaterialCatalogItemProvider extends CatalogItemProvider {
@Override
protected
void
collectNewChildDescriptors
(
Collection
<
Object
>
newChildDescriptors
,
Object
object
)
{
super
.
collectNewChildDescriptors
(
newChildDescriptors
,
object
);
newChildDescriptors
.
add
(
createChildParameter
(
BuildingPhysicsPackage
.
Literals
.
MATERIAL_CATALOG__MATERIAL_CATEGORIES
,
BuildingPhysicsFactory
.
eINSTANCE
.
createMaterialCategory
()));
newChildDescriptors
.
add
(
createChildParameter
(
BuildingPhysicsPackage
.
Literals
.
MATERIAL_CATALOG__CONSTRUCTION_CATEGORIES
,
BuildingPhysicsFactory
.
eINSTANCE
.
createConstructionCategory
()));
}
}
This diff is collapsed.
Click to expand it.
de.hftstuttgart.buildingphysics.edit/src/de/hftstuttgart/buildingphysics/provider/WindowCatalogItemProvider.java
+
1
-
32
View file @
f80d5e31
...
...
@@ -10,7 +10,6 @@ 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
;
...
...
@@ -46,36 +45,6 @@ public class WindowCatalogItemProvider extends CatalogItemProvider {
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
(
BuildingPhysicsPackage
.
Literals
.
WINDOW_CATALOG__WINDOW_TYPES
);
}
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 WindowCatalog.gif.
* <!-- begin-user-doc -->
...
...
@@ -121,7 +90,7 @@ public class WindowCatalogItemProvider extends CatalogItemProvider {
switch
(
notification
.
getFeatureID
(
WindowCatalog
.
class
))
{
case
BuildingPhysicsPackage
.
WINDOW_CATALOG__WINDOW_TYPES
:
fireNotifyChanged
(
new
ViewerNotification
(
notification
,
notification
.
getNotifier
(),
true
,
fals
e
));
fireNotifyChanged
(
new
ViewerNotification
(
notification
,
notification
.
getNotifier
(),
false
,
tru
e
));
return
;
}
super
.
notifyChanged
(
notification
);
...
...
This diff is collapsed.
Click to expand it.
de.hftstuttgart.buildingphysics/model/buildingphysics.ecore
+
1
-
1
View file @
f80d5e31
...
...
@@ -61,7 +61,7 @@
<eStructuralFeatures
xsi:type=
"ecore:EReference"
name=
"materialCategories"
upperBound=
"-1"
eType=
"#//MaterialCategory"
containment=
"true"
/>
<eStructuralFeatures
xsi:type=
"ecore:EReference"
name=
"constructionCategories"
lowerBound=
"1"
upperBound=
"-1"
eType=
"#//ConstructionCategory"
containment=
"true"
/>
upperBound=
"-1"
eType=
"#//ConstructionCategory"
containment=
"true"
/>
</eClassifiers>
<eClassifiers
xsi:type=
"ecore:EClass"
name=
"MaterialCategory"
>
<eStructuralFeatures
xsi:type=
"ecore:EReference"
name=
"materials"
upperBound=
"-1"
...
...
This diff is collapsed.
Click to expand it.
de.hftstuttgart.buildingphysics/model/buildingphysics.genmodel
+
3
-
3
View file @
f80d5e31
...
...
@@ -36,11 +36,11 @@
<genFeatures
createChild=
"false"
ecoreFeature=
"ecore:EAttribute buildingphysics.ecore#//Catalog/source"
/>
</genClasses>
<genClasses
ecoreClass=
"buildingphysics.ecore#//WindowCatalog"
>
<genFeatures
property=
"None"
children=
"true"
createChild=
"false"
ecoreFeature=
"ecore:EReference buildingphysics.ecore#//WindowCatalog/windowTypes"
/>
<genFeatures
property=
"None"
createChild=
"false"
ecoreFeature=
"ecore:EReference buildingphysics.ecore#//WindowCatalog/windowTypes"
/>
</genClasses>
<genClasses
ecoreClass=
"buildingphysics.ecore#//MaterialCatalog"
>
<genFeatures
property=
"None"
children=
"true"
createChild=
"
fals
e"
ecoreFeature=
"ecore:EReference buildingphysics.ecore#//MaterialCatalog/materialCategories"
/>
<genFeatures
property=
"None"
children=
"true"
createChild=
"
fals
e"
ecoreFeature=
"ecore:EReference buildingphysics.ecore#//MaterialCatalog/constructionCategories"
/>
<genFeatures
property=
"None"
children=
"true"
createChild=
"
tru
e"
ecoreFeature=
"ecore:EReference buildingphysics.ecore#//MaterialCatalog/materialCategories"
/>
<genFeatures
property=
"None"
children=
"true"
createChild=
"
tru
e"
ecoreFeature=
"ecore:EReference buildingphysics.ecore#//MaterialCatalog/constructionCategories"
/>
</genClasses>
<genClasses
ecoreClass=
"buildingphysics.ecore#//MaterialCategory"
>
<genFeatures
property=
"None"
createChild=
"false"
ecoreFeature=
"ecore:EReference buildingphysics.ecore#//MaterialCategory/materials"
/>
...
...
This diff is collapsed.
Click to expand it.
de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/MaterialCatalog.java
+
1
-
1
View file @
f80d5e31
...
...
@@ -41,7 +41,7 @@ public interface MaterialCatalog extends Catalog {
* <!-- end-user-doc -->
* @return the value of the '<em>Construction Categories</em>' containment reference list.
* @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getMaterialCatalog_ConstructionCategories()
* @model containment="true"
required="true"
* @model containment="true"
* @generated
*/
EList
<
ConstructionCategory
>
getConstructionCategories
();
...
...
This diff is collapsed.
Click to expand it.
de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/impl/BuildingPhysicsPackageImpl.java
+
1
-
1
View file @
f80d5e31
...
...
@@ -887,7 +887,7 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building
null
,
0
,
-
1
,
MaterialCatalog
.
class
,
!
IS_TRANSIENT
,
!
IS_VOLATILE
,
IS_CHANGEABLE
,
IS_COMPOSITE
,
!
IS_RESOLVE_PROXIES
,
!
IS_UNSETTABLE
,
IS_UNIQUE
,
!
IS_DERIVED
,
IS_ORDERED
);
initEReference
(
getMaterialCatalog_ConstructionCategories
(),
this
.
getConstructionCategory
(),
null
,
"constructionCategories"
,
null
,
1
,
-
1
,
MaterialCatalog
.
class
,
!
IS_TRANSIENT
,
!
IS_VOLATILE
,
"constructionCategories"
,
null
,
0
,
-
1
,
MaterialCatalog
.
class
,
!
IS_TRANSIENT
,
!
IS_VOLATILE
,
IS_CHANGEABLE
,
IS_COMPOSITE
,
!
IS_RESOLVE_PROXIES
,
!
IS_UNSETTABLE
,
IS_UNIQUE
,
!
IS_DERIVED
,
IS_ORDERED
);
initEClass
(
materialCategoryEClass
,
MaterialCategory
.
class
,
"MaterialCategory"
,
!
IS_ABSTRACT
,
!
IS_INTERFACE
,
...
...
This diff is collapsed.
Click to expand it.
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