Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[1952] Fix regression on View-based Forms creation
Bug: #1952 Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
- Loading branch information
1 parent
4042453
commit efeafbd
Showing
21 changed files
with
645 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
...ain/java/org/eclipse/sirius/web/sample/papaya/view/overviewform/OverviewFormProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2023 Obeo. | ||
* This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v2.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Obeo - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.sirius.web.sample.papaya.view.overviewform; | ||
|
||
import org.eclipse.sirius.components.view.RepresentationDescription; | ||
import org.eclipse.sirius.components.view.ViewFactory; | ||
import org.eclipse.sirius.web.sample.papaya.view.IColorProvider; | ||
import org.eclipse.sirius.web.sample.papaya.view.IRepresentationDescriptionProvider; | ||
|
||
/** | ||
* Used to create the description of the overview form. | ||
* | ||
* @author sbegaudeau | ||
*/ | ||
public class OverviewFormProvider implements IRepresentationDescriptionProvider { | ||
@Override | ||
public RepresentationDescription create(IColorProvider colorProvider) { | ||
var formDescription = ViewFactory.eINSTANCE.createFormDescription(); | ||
formDescription.setDomainType("papaya_core::Root"); | ||
formDescription.setName("Overview Form"); | ||
|
||
var groupDescription = ViewFactory.eINSTANCE.createGroupDescription(); | ||
groupDescription.setName("Group"); | ||
groupDescription.setSemanticCandidatesExpression("aql:self"); | ||
groupDescription.setLabelExpression("Root"); | ||
|
||
formDescription.getGroups().add(groupDescription); | ||
|
||
return formDescription; | ||
} | ||
} |
Oops, something went wrong.