Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[2343] Add icons on new object modals
Bug: #2343 Signed-off-by: Florian ROUËNÉ <florian.rouene@obeosoft.com>
- Loading branch information
1 parent
1b57f6f
commit b3afc08
Showing
12 changed files
with
144 additions
and
19 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
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
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
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
35 changes: 35 additions & 0 deletions
35
...g/eclipse/sirius/web/graphql/datafetchers/ChildCreationDescriptionIconURLDataFetcher.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,35 @@ | ||
/******************************************************************************* | ||
* 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.graphql.datafetchers; | ||
|
||
import org.eclipse.sirius.components.annotations.spring.graphql.QueryDataFetcher; | ||
import org.eclipse.sirius.components.core.api.ChildCreationDescription; | ||
import org.eclipse.sirius.components.graphql.api.IDataFetcherWithFieldCoordinates; | ||
import org.eclipse.sirius.components.graphql.api.URLConstants; | ||
|
||
import graphql.schema.DataFetchingEnvironment; | ||
|
||
/** | ||
* The data fetcher used to concatenate the server image URL to the childCreationDescription icon image path. | ||
* | ||
* @author pcdavid | ||
*/ | ||
@QueryDataFetcher(type = "ChildCreationDescription", field = "iconURL") | ||
public class ChildCreationDescriptionIconURLDataFetcher implements IDataFetcherWithFieldCoordinates<String> { | ||
|
||
@Override | ||
public String get(DataFetchingEnvironment environment) throws Exception { | ||
ChildCreationDescription childCreationDescription = environment.getSource(); | ||
return URLConstants.IMAGE_BASE_PATH + childCreationDescription.getIconURL(); | ||
} | ||
} |
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
Oops, something went wrong.