-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[1439] Add support for FormDescriptionEditor toolbar actions on backend
Bug: #1439 Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
- Loading branch information
1 parent
c9f9890
commit 829cfcf
Showing
29 changed files
with
1,628 additions
and
2 deletions.
There are no files selected for viewing
71 changes: 71 additions & 0 deletions
71
...pse/sirius/components/collaborative/formdescriptioneditors/dto/AddToolbarActionInput.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,71 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2022 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.collaborative.formdescriptioneditors.dto; | ||
|
||
import java.text.MessageFormat; | ||
import java.util.Objects; | ||
import java.util.UUID; | ||
|
||
import org.eclipse.sirius.components.collaborative.formdescriptioneditors.api.IFormDescriptionEditorInput; | ||
|
||
/** | ||
* The input for the Form Description Editor add toolbar action mutation. | ||
* | ||
* @author arichard | ||
*/ | ||
public class AddToolbarActionInput implements IFormDescriptionEditorInput { | ||
|
||
private UUID id; | ||
|
||
private String editingContextId; | ||
|
||
private String representationId; | ||
|
||
private String containerId; | ||
|
||
public AddToolbarActionInput() { | ||
// Used by jackson | ||
} | ||
|
||
public AddToolbarActionInput(UUID id, String editingContextId, String representationId, String containerId) { | ||
this.id = Objects.requireNonNull(id); | ||
this.editingContextId = Objects.requireNonNull(editingContextId); | ||
this.representationId = Objects.requireNonNull(representationId); | ||
this.containerId = containerId; | ||
} | ||
|
||
@Override | ||
public UUID getId() { | ||
return this.id; | ||
} | ||
|
||
@Override | ||
public String getRepresentationId() { | ||
return this.representationId; | ||
} | ||
|
||
public String getEditingContextId() { | ||
return this.editingContextId; | ||
} | ||
|
||
public String getContainerId() { | ||
return this.containerId; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
String pattern = "{0} '{'id: {1}, editingContextId: {2}, representationId: {3}, containerId: {4}}'"; //$NON-NLS-1$ | ||
return MessageFormat.format(pattern, this.getClass().getSimpleName(), this.id, this.editingContextId, this.representationId, this.containerId); | ||
} | ||
|
||
} |
44 changes: 44 additions & 0 deletions
44
...s/components/collaborative/formdescriptioneditors/dto/AddToolbarActionSuccessPayload.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,44 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2022 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.collaborative.formdescriptioneditors.dto; | ||
|
||
import java.text.MessageFormat; | ||
import java.util.Objects; | ||
import java.util.UUID; | ||
|
||
import org.eclipse.sirius.components.core.api.IPayload; | ||
|
||
/** | ||
* The payload of the Form Description Editor add toolbar action mutation. | ||
* | ||
* @author arichard | ||
*/ | ||
public class AddToolbarActionSuccessPayload implements IPayload { | ||
private final UUID id; | ||
|
||
public AddToolbarActionSuccessPayload(UUID id) { | ||
this.id = Objects.requireNonNull(id); | ||
} | ||
|
||
@Override | ||
public UUID getId() { | ||
return this.id; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
String pattern = "{0} '{'id: {1}'}'"; //$NON-NLS-1$ | ||
return MessageFormat.format(pattern, this.getClass().getSimpleName(), this.id); | ||
} | ||
|
||
} |
71 changes: 71 additions & 0 deletions
71
.../sirius/components/collaborative/formdescriptioneditors/dto/DeleteToolbarActionInput.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,71 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2022 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.collaborative.formdescriptioneditors.dto; | ||
|
||
import java.text.MessageFormat; | ||
import java.util.Objects; | ||
import java.util.UUID; | ||
|
||
import org.eclipse.sirius.components.collaborative.formdescriptioneditors.api.IFormDescriptionEditorInput; | ||
|
||
/** | ||
* The input for the Form Description Editor delete toolbar action mutation. | ||
* | ||
* @author arichard | ||
*/ | ||
public class DeleteToolbarActionInput implements IFormDescriptionEditorInput { | ||
|
||
private UUID id; | ||
|
||
private String editingContextId; | ||
|
||
private String representationId; | ||
|
||
private String toolbarActionId; | ||
|
||
public DeleteToolbarActionInput() { | ||
// Used by jackson | ||
} | ||
|
||
public DeleteToolbarActionInput(UUID id, String editingContextId, String representationId, String toolbarActionId) { | ||
this.id = Objects.requireNonNull(id); | ||
this.editingContextId = Objects.requireNonNull(editingContextId); | ||
this.representationId = Objects.requireNonNull(representationId); | ||
this.toolbarActionId = Objects.requireNonNull(toolbarActionId); | ||
} | ||
|
||
@Override | ||
public UUID getId() { | ||
return this.id; | ||
} | ||
|
||
@Override | ||
public String getRepresentationId() { | ||
return this.representationId; | ||
} | ||
|
||
public String getEditingContextId() { | ||
return this.editingContextId; | ||
} | ||
|
||
public String getToolbarActionId() { | ||
return this.toolbarActionId; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
String pattern = "{0} '{'id: {1}, editingContextId: {2}, representationId: {3}; toolbarActionId: {4}}'"; //$NON-NLS-1$ | ||
return MessageFormat.format(pattern, this.getClass().getSimpleName(), this.id, this.editingContextId, this.representationId, this.toolbarActionId); | ||
} | ||
|
||
} |
44 changes: 44 additions & 0 deletions
44
...omponents/collaborative/formdescriptioneditors/dto/DeleteToolbarActionSuccessPayload.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,44 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2022 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.collaborative.formdescriptioneditors.dto; | ||
|
||
import java.text.MessageFormat; | ||
import java.util.Objects; | ||
import java.util.UUID; | ||
|
||
import org.eclipse.sirius.components.core.api.IPayload; | ||
|
||
/** | ||
* The payload of the Form Description Editor delete toolbar action mutation. | ||
* | ||
* @author arichard | ||
*/ | ||
public class DeleteToolbarActionSuccessPayload implements IPayload { | ||
private final UUID id; | ||
|
||
public DeleteToolbarActionSuccessPayload(UUID id) { | ||
this.id = Objects.requireNonNull(id); | ||
} | ||
|
||
@Override | ||
public UUID getId() { | ||
return this.id; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
String pattern = "{0} '{'id: {1}'}'"; //$NON-NLS-1$ | ||
return MessageFormat.format(pattern, this.getClass().getSimpleName(), this.id); | ||
} | ||
|
||
} |
85 changes: 85 additions & 0 deletions
85
...se/sirius/components/collaborative/formdescriptioneditors/dto/MoveToolbarActionInput.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,85 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2022 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.collaborative.formdescriptioneditors.dto; | ||
|
||
import java.text.MessageFormat; | ||
import java.util.Objects; | ||
import java.util.UUID; | ||
|
||
import org.eclipse.sirius.components.collaborative.formdescriptioneditors.api.IFormDescriptionEditorInput; | ||
|
||
/** | ||
* The input for the Form Description Editor add toolbar action mutation. | ||
* | ||
* @author arichard | ||
*/ | ||
public class MoveToolbarActionInput implements IFormDescriptionEditorInput { | ||
|
||
private UUID id; | ||
|
||
private String editingContextId; | ||
|
||
private String representationId; | ||
|
||
private String containerId; | ||
|
||
private String toolbarActionId; | ||
|
||
private int index; | ||
|
||
public MoveToolbarActionInput() { | ||
// Used by jackson | ||
} | ||
|
||
public MoveToolbarActionInput(UUID id, String editingContextId, String representationId, String containerId, String toolbarActionId, int index) { | ||
this.id = Objects.requireNonNull(id); | ||
this.editingContextId = Objects.requireNonNull(editingContextId); | ||
this.representationId = Objects.requireNonNull(representationId); | ||
this.containerId = containerId; | ||
this.toolbarActionId = Objects.requireNonNull(toolbarActionId); | ||
this.index = Objects.requireNonNull(index); | ||
} | ||
|
||
@Override | ||
public UUID getId() { | ||
return this.id; | ||
} | ||
|
||
@Override | ||
public String getRepresentationId() { | ||
return this.representationId; | ||
} | ||
|
||
public String getEditingContextId() { | ||
return this.editingContextId; | ||
} | ||
|
||
public String getContainerId() { | ||
return this.containerId; | ||
} | ||
|
||
public String getToolbarActionId() { | ||
return this.toolbarActionId; | ||
} | ||
|
||
public int getIndex() { | ||
return this.index; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
String pattern = "{0} '{'id: {1}, editingContextId: {2}, representationId: {3}, containerId: {4}, toolbarActionId: {5}, index: {6}}'"; //$NON-NLS-1$ | ||
return MessageFormat.format(pattern, this.getClass().getSimpleName(), this.id, this.editingContextId, this.representationId, this.containerId, this.toolbarActionId, this.index); | ||
} | ||
|
||
} |
44 changes: 44 additions & 0 deletions
44
.../components/collaborative/formdescriptioneditors/dto/MoveToolbarActionSuccessPayload.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,44 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2022 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.collaborative.formdescriptioneditors.dto; | ||
|
||
import java.text.MessageFormat; | ||
import java.util.Objects; | ||
import java.util.UUID; | ||
|
||
import org.eclipse.sirius.components.core.api.IPayload; | ||
|
||
/** | ||
* The payload of the Form Description Editor move toolbar action mutation. | ||
* | ||
* @author arichard | ||
*/ | ||
public class MoveToolbarActionSuccessPayload implements IPayload { | ||
private final UUID id; | ||
|
||
public MoveToolbarActionSuccessPayload(UUID id) { | ||
this.id = Objects.requireNonNull(id); | ||
} | ||
|
||
@Override | ||
public UUID getId() { | ||
return this.id; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
String pattern = "{0} '{'id: {1}'}'"; //$NON-NLS-1$ | ||
return MessageFormat.format(pattern, this.getClass().getSimpleName(), this.id); | ||
} | ||
|
||
} |
Oops, something went wrong.