-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[3429] Add diagram filter view in diagram panel
Bug: #3429 Signed-off-by: Gwendal Daniel <[email protected]>
- Loading branch information
1 parent
36043f5
commit 7530d21
Showing
73 changed files
with
4,331 additions
and
12 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
1 change: 1 addition & 0 deletions
1
...us-components-collaborative-diagrams/src/main/resources/diagram-images/fade.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions
1
...ius-components-collaborative-diagrams/src/main/resources/diagram-images/pin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions
43
...laborative-diagrams/src/main/resources/diagram-images/reveal-faded-elements.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions
1
...s-components-collaborative-diagrams/src/main/resources/diagram-images/unpin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions
48
...rg/eclipse/sirius/components/diagrams/tests/graphql/FadeDiagramElementMutationRunner.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,48 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024, 2024 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.components.diagrams.tests.graphql; | ||
|
||
import java.util.Objects; | ||
|
||
import org.eclipse.sirius.components.collaborative.diagrams.dto.FadeDiagramElementInput; | ||
import org.eclipse.sirius.components.graphql.tests.api.IGraphQLRequestor; | ||
import org.eclipse.sirius.components.graphql.tests.api.IMutationRunner; | ||
import org.springframework.stereotype.Service; | ||
|
||
/** | ||
* Used to fade or reveal faded elements with the GraphQL API. | ||
* | ||
* @author sbegaudeau | ||
*/ | ||
@Service | ||
public class FadeDiagramElementMutationRunner implements IMutationRunner<FadeDiagramElementInput> { | ||
|
||
private static final String FADE_DIAGRAM_ELEMENT_MUTATION = """ | ||
mutation fadeDiagramElement($input: FadeDiagramElementInput!) { | ||
fadeDiagramElement(input: $input) { | ||
__typename | ||
} | ||
} | ||
"""; | ||
|
||
private final IGraphQLRequestor graphQLRequestor; | ||
|
||
public FadeDiagramElementMutationRunner(IGraphQLRequestor graphQLRequestor) { | ||
this.graphQLRequestor = Objects.requireNonNull(graphQLRequestor); | ||
} | ||
|
||
@Override | ||
public String run(FadeDiagramElementInput input) { | ||
return this.graphQLRequestor.execute(FADE_DIAGRAM_ELEMENT_MUTATION, input); | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
...rg/eclipse/sirius/components/diagrams/tests/graphql/HideDiagramElementMutationRunner.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,48 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024, 2024 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.components.diagrams.tests.graphql; | ||
|
||
import java.util.Objects; | ||
|
||
import org.eclipse.sirius.components.collaborative.diagrams.dto.HideDiagramElementInput; | ||
import org.eclipse.sirius.components.graphql.tests.api.IGraphQLRequestor; | ||
import org.eclipse.sirius.components.graphql.tests.api.IMutationRunner; | ||
import org.springframework.stereotype.Service; | ||
|
||
/** | ||
* Used to hide or show faded elements with the GraphQL API. | ||
* | ||
* @author sbegaudeau | ||
*/ | ||
@Service | ||
public class HideDiagramElementMutationRunner implements IMutationRunner<HideDiagramElementInput> { | ||
|
||
private static final String HIDE_DIAGRAM_ELEMENT_MUTATION = """ | ||
mutation hideDiagramElement($input: HideDiagramElementInput!) { | ||
hideDiagramElement(input: $input) { | ||
__typename | ||
} | ||
} | ||
"""; | ||
|
||
private final IGraphQLRequestor graphQLRequestor; | ||
|
||
public HideDiagramElementMutationRunner(IGraphQLRequestor graphQLRequestor) { | ||
this.graphQLRequestor = Objects.requireNonNull(graphQLRequestor); | ||
} | ||
|
||
@Override | ||
public String run(HideDiagramElementInput input) { | ||
return this.graphQLRequestor.execute(HIDE_DIAGRAM_ELEMENT_MUTATION, input); | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
...org/eclipse/sirius/components/diagrams/tests/graphql/PinDiagramElementMutationRunner.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,46 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024, 2024 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.components.diagrams.tests.graphql; | ||
|
||
import org.eclipse.sirius.components.collaborative.diagrams.dto.PinDiagramElementInput; | ||
import org.eclipse.sirius.components.graphql.tests.api.IGraphQLRequestor; | ||
import org.eclipse.sirius.components.graphql.tests.api.IMutationRunner; | ||
import org.springframework.stereotype.Service; | ||
|
||
/** | ||
* Used to pin or unpin elements with the GraphQL API. | ||
* | ||
* @author sbegaudeau | ||
*/ | ||
@Service | ||
public class PinDiagramElementMutationRunner implements IMutationRunner<PinDiagramElementInput> { | ||
|
||
private static final String PIN_DIAGRAM_ELEMENT_MUTATION = """ | ||
mutation pinDiagramElement($input: PinDiagramElementInput!) { | ||
pinDiagramElement(input: $input) { | ||
__typename | ||
} | ||
} | ||
"""; | ||
|
||
private final IGraphQLRequestor graphQLRequestor; | ||
|
||
public PinDiagramElementMutationRunner(IGraphQLRequestor graphQLRequestor) { | ||
this.graphQLRequestor = graphQLRequestor; | ||
} | ||
|
||
@Override | ||
public String run(PinDiagramElementInput input) { | ||
return this.graphQLRequestor.execute(PIN_DIAGRAM_ELEMENT_MUTATION, input); | ||
} | ||
} |
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
20 changes: 20 additions & 0 deletions
20
...ams/frontend/sirius-components-diagrams/src/renderer/panel/DiagramPanelExtensionPoints.ts
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,20 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 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 | ||
*******************************************************************************/ | ||
|
||
import { ComponentExtensionPoint } from '@eclipse-sirius/sirius-components-core'; | ||
import { DiagramPanelActionProps } from './DiagramPanel.types'; | ||
|
||
export const diagramPanelActionExtensionPoint: ComponentExtensionPoint<DiagramPanelActionProps> = { | ||
identifier: 'diagramPanel#action', | ||
FallbackComponent: () => null, | ||
}; |
61 changes: 61 additions & 0 deletions
61
...ava/org/eclipse/sirius/components/forms/tests/graphql/EditTreeCheckboxMutationRunner.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,61 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 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.components.forms.tests.graphql; | ||
|
||
import java.util.Objects; | ||
|
||
import org.eclipse.sirius.components.collaborative.forms.dto.EditTreeCheckboxInput; | ||
import org.eclipse.sirius.components.graphql.tests.api.IGraphQLRequestor; | ||
import org.eclipse.sirius.components.graphql.tests.api.IMutationRunner; | ||
import org.springframework.stereotype.Service; | ||
|
||
/** | ||
* Used to edit a tree checkbox with the GraphQL API. | ||
* | ||
* @author gdaniel | ||
*/ | ||
@Service | ||
public class EditTreeCheckboxMutationRunner implements IMutationRunner<EditTreeCheckboxInput> { | ||
|
||
private static final String EDIT_TREE_CHECKBOX_MUTATION = """ | ||
mutation editTreeCheckbox($input: EditTreeCheckboxInput!) { | ||
editTreeCheckbox(input: $input) { | ||
__typename | ||
... on ErrorPayload { | ||
messages { | ||
body | ||
level | ||
} | ||
} | ||
... on SuccessPayload { | ||
messages { | ||
body | ||
level | ||
} | ||
} | ||
} | ||
} | ||
"""; | ||
|
||
private final IGraphQLRequestor graphQLRequestor; | ||
|
||
public EditTreeCheckboxMutationRunner(IGraphQLRequestor graphQLRequestor) { | ||
this.graphQLRequestor = Objects.requireNonNull(graphQLRequestor); | ||
} | ||
|
||
@Override | ||
public String run(EditTreeCheckboxInput input) { | ||
return this.graphQLRequestor.execute(EDIT_TREE_CHECKBOX_MUTATION, input); | ||
} | ||
|
||
} |
Oops, something went wrong.