forked from eclipse-sirius/sirius-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[4088] Change tree item context menu entries internal management
Bug: eclipse-sirius#4088 Signed-off-by: Jerome Gout <[email protected]> Signed-off-by: Florian ROUËNÉ <[email protected]>
- Loading branch information
1 parent
9e07dee
commit d10f0c4
Showing
25 changed files
with
538 additions
and
489 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
31 changes: 31 additions & 0 deletions
31
...sirius/components/collaborative/trees/api/IFetchTreeItemContextMenuEntryDataProvider.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,31 @@ | ||
/******************************************************************************* | ||
* 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.collaborative.trees.api; | ||
|
||
import org.eclipse.sirius.components.collaborative.trees.dto.FetchTreeItemContextMenuEntryData; | ||
import org.eclipse.sirius.components.core.api.IEditingContext; | ||
import org.eclipse.sirius.components.trees.Tree; | ||
import org.eclipse.sirius.components.trees.TreeItem; | ||
import org.eclipse.sirius.components.trees.description.TreeDescription; | ||
|
||
/** | ||
* Interface allowing to provide the data of fetch context menu entries necessary to perform the fetch action itself. | ||
* | ||
* @author Jerome Gout | ||
*/ | ||
public interface IFetchTreeItemContextMenuEntryDataProvider { | ||
|
||
boolean canHandle(TreeDescription treeDescription); | ||
|
||
FetchTreeItemContextMenuEntryData handle(IEditingContext editingContext, TreeDescription treeDescription, Tree tree, TreeItem treeItem, String treeItemMenuContextEntryId); | ||
} |
31 changes: 31 additions & 0 deletions
31
...rius/components/collaborative/trees/api/ISingleClickTreeItemContextMenuEntryExecutor.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,31 @@ | ||
/******************************************************************************* | ||
* 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.collaborative.trees.api; | ||
|
||
import org.eclipse.sirius.components.core.api.IEditingContext; | ||
import org.eclipse.sirius.components.representations.IStatus; | ||
import org.eclipse.sirius.components.trees.Tree; | ||
import org.eclipse.sirius.components.trees.TreeItem; | ||
import org.eclipse.sirius.components.trees.description.TreeDescription; | ||
|
||
/** | ||
* Interface allowing to perform single click context menu entries. | ||
* | ||
* @author Jerome Gout | ||
*/ | ||
public interface ISingleClickTreeItemContextMenuEntryExecutor { | ||
|
||
boolean canExecute(TreeDescription treeDescription); | ||
|
||
IStatus execute(IEditingContext editingContext, TreeDescription treeDescription, Tree tree, TreeItem treeItem, String treeItemMenuContextEntryId); | ||
} |
33 changes: 33 additions & 0 deletions
33
.../eclipse/sirius/components/collaborative/trees/api/ITreeItemContextMenuEntryProvider.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,33 @@ | ||
/******************************************************************************* | ||
* 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.collaborative.trees.api; | ||
|
||
import java.util.List; | ||
|
||
import org.eclipse.sirius.components.collaborative.trees.dto.ITreeItemContextMenuEntry; | ||
import org.eclipse.sirius.components.core.api.IEditingContext; | ||
import org.eclipse.sirius.components.trees.Tree; | ||
import org.eclipse.sirius.components.trees.TreeItem; | ||
import org.eclipse.sirius.components.trees.description.TreeDescription; | ||
|
||
/** | ||
* Interface allowing to provide context menu entries for a tree item. | ||
* | ||
* @author Jerome Gout | ||
*/ | ||
public interface ITreeItemContextMenuEntryProvider { | ||
|
||
boolean canHandle(IEditingContext editingContext, TreeDescription treeDescription, Tree tree, TreeItem treeItem); | ||
|
||
List<ITreeItemContextMenuEntry> getTreeItemContextMenuEntries(IEditingContext editingContext, TreeDescription treeDescription, Tree tree, TreeItem treeItem); | ||
} |
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.